mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
Fix #1043 Crash from mods spawning wood items with wildcard metadata
This commit is contained in:
1 parent
e0c1c538aa
commit
9f2f2ed85b
2 files changed
+10
-1
No files matched your search
@@ -121,7 +121,7 @@ public class ItemBlockWood extends ItemBlockForestry {
|
||||
if (ordinal >= 0 && ordinal < EnumWoodType.VALUES.length) {
|
||||
return EnumWoodType.VALUES[ordinal];
|
||||
}
|
||||
return null;
|
||||
return EnumWoodType.LARCH;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -40,16 +40,25 @@ public abstract class IconProviderWood {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getPlankIcon(EnumWoodType woodType) {
|
||||
if (woodType == null) {
|
||||
woodType = EnumWoodType.LARCH;
|
||||
}
|
||||
return icons[0][woodType.ordinal()];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getBarkIcon(EnumWoodType woodType) {
|
||||
if (woodType == null) {
|
||||
woodType = EnumWoodType.LARCH;
|
||||
}
|
||||
return icons[1][woodType.ordinal()];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon getHeartIcon(EnumWoodType woodType) {
|
||||
if (woodType == null) {
|
||||
woodType = EnumWoodType.LARCH;
|
||||
}
|
||||
return icons[2][woodType.ordinal()];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user