Rename parameters to be less cryptic

This commit is contained in:
Leo40Git
2021-08-12 22:35:11 +03:00
parent c8f7904481
commit 64be307c1b
3 changed files with 9 additions and 9 deletions

View File

@@ -11,14 +11,14 @@ public final class AxeItemHooks {
private AxeItemHooks() {
}
public static void addStrippingRecipe(Block src, Block dst) {
if (!src.defaultBlockState().hasProperty(RotatedPillarBlock.AXIS))
throw new IllegalArgumentException("Source block is missing required 'AXIS' property!");
if (!dst.defaultBlockState().hasProperty(RotatedPillarBlock.AXIS))
throw new IllegalArgumentException("Destination block is missing required 'AXIS' property!");
public static void addStrippingRecipe(Block input, Block result) {
if (!input.defaultBlockState().hasProperty(RotatedPillarBlock.AXIS))
throw new IllegalArgumentException("Input block is missing required 'AXIS' property!");
if (!result.defaultBlockState().hasProperty(RotatedPillarBlock.AXIS))
throw new IllegalArgumentException("Result block is missing required 'AXIS' property!");
if (AxeItem.STRIPPABLES instanceof ImmutableMap) {
AxeItem.STRIPPABLES = new HashMap<>(AxeItem.STRIPPABLES);
}
AxeItem.STRIPPABLES.put(src, dst);
AxeItem.STRIPPABLES.put(input, result);
}
}

View File

@@ -10,7 +10,7 @@ import java.util.HashMap;
import java.util.function.Consumer;
import java.util.function.Predicate;
public class HoeItemHooks {
public final class HoeItemHooks {
private HoeItemHooks() {
}

View File

@@ -11,10 +11,10 @@ public final class ShovelItemHooks {
private ShovelItemHooks() {
}
public static void addFlatteningRecipe(Block src, BlockState dst) {
public static void addFlatteningRecipe(Block input, BlockState result) {
if (ShovelItem.FLATTENABLES instanceof ImmutableMap) {
ShovelItem.FLATTENABLES = new HashMap<>(ShovelItem.FLATTENABLES);
}
ShovelItem.FLATTENABLES.put(src, dst);
ShovelItem.FLATTENABLES.put(input, result);
}
}