mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-25 22:44:38 +00:00
Improve code readability in binnie.extratrees package
This commit is contained in:
1 parent
adccdd181a
commit
96e4814ae3
225 files changed
+8968
-9306
No files matched your search
@@ -1,55 +1,48 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.extratrees.machines;
|
||||
|
||||
import binnie.extratrees.api.IDesignMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import binnie.core.machines.inventory.SlotValidator;
|
||||
import binnie.core.machines.inventory.ValidatorIcon;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.core.machines.inventory.SlotValidator;
|
||||
import binnie.extratrees.api.IDesignMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class Validators
|
||||
{
|
||||
public static class SlotValidatorBeeswax extends SlotValidator
|
||||
{
|
||||
DesignerType type;
|
||||
public class Validators {
|
||||
public static class SlotValidatorBeeswax extends SlotValidator {
|
||||
protected DesignerType type;
|
||||
|
||||
public SlotValidatorBeeswax(final DesignerType type) {
|
||||
public SlotValidatorBeeswax(DesignerType type) {
|
||||
super(new ValidatorIcon(ExtraTrees.instance, "validator/polish.0", "validator/polish.1"));
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(final ItemStack itemStack) {
|
||||
return this.type.getSystem().getAdhesive().isItemEqual(itemStack);
|
||||
public boolean isValid(ItemStack itemStack) {
|
||||
return type.getSystem().getAdhesive().isItemEqual(itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return this.type.getSystem().getAdhesive().getDisplayName();
|
||||
return type.getSystem().getAdhesive().getDisplayName();
|
||||
}
|
||||
}
|
||||
|
||||
public static class SlotValidatorPlanks extends SlotValidator
|
||||
{
|
||||
DesignerType type;
|
||||
public static class SlotValidatorPlanks extends SlotValidator {
|
||||
protected DesignerType type;
|
||||
|
||||
public SlotValidatorPlanks(final DesignerType type) {
|
||||
public SlotValidatorPlanks(DesignerType type) {
|
||||
super(SlotValidator.IconBlock);
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(final ItemStack itemStack) {
|
||||
final IDesignMaterial mat = this.type.getSystem().getMaterial(itemStack);
|
||||
public boolean isValid(ItemStack itemStack) {
|
||||
IDesignMaterial mat = type.getSystem().getMaterial(itemStack);
|
||||
return itemStack != null && mat != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return this.type.getMaterialTooltip();
|
||||
return type.getMaterialTooltip();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user