mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 03:49:07 +00:00
Fix #229 Game Crash from looking at wood in JEI
This commit is contained in:
1 parent
c9d3001b47
commit
68ed8a1511
2 files changed
+15
No files matched your search
@@ -9,6 +9,7 @@ import forestry.arboriculture.blocks.BlockForestrySlab;
|
||||
|
||||
import binnie.Constants;
|
||||
import binnie.extratrees.block.EnumETLog;
|
||||
import binnie.extratrees.block.WoodManager;
|
||||
import binnie.extratrees.block.property.PropertyETWoodType;
|
||||
|
||||
public abstract class BlockETSlab extends BlockForestrySlab<EnumETLog> {
|
||||
@@ -26,6 +27,12 @@ public abstract class BlockETSlab extends BlockForestrySlab<EnumETLog> {
|
||||
setUnlocalizedName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(int meta) {
|
||||
EnumETLog woodType = getWoodType(meta);
|
||||
return WoodManager.getDisplayName(this, woodType);
|
||||
}
|
||||
|
||||
public static List<BlockETSlab> create(boolean fireproof, final boolean doubleSlab) {
|
||||
List<BlockETSlab> blocks = new ArrayList<>();
|
||||
PropertyETWoodType[] variants = PropertyETWoodType.create("variant", VARIANTS_PER_BLOCK, false);
|
||||
|
||||
@@ -21,4 +21,12 @@ public class ItemETSlab extends ItemSlab {
|
||||
IWoodType woodType = wood.getWoodType(meta);
|
||||
return WoodManager.getDisplayName(wood, woodType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
BlockETSlab wood = (BlockETSlab) getBlock();
|
||||
int meta = stack.getMetadata();
|
||||
IWoodType woodType = wood.getWoodType(meta);
|
||||
return WoodManager.getDisplayName(wood, woodType);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user