Fix #1666 Crash 1.11.2

This commit is contained in:
Nedelosk committed 2017-04-21 22:34:00 +02:00
1 parent 834e3ed55a
commit 853355062e
1 file changed
+8
@@ -152,6 +152,10 @@ public class GeneticsUtil {
IBlockState blockState = world.getBlockState(pos);
Block block = blockState.getBlock();
if(TreeManager.treeRoot == null){
return null;
}
IIndividualTranslator<IIndividual, IBlockState> leafTranslator = TreeManager.treeRoot.getTranslator(block);
if (leafTranslator == null) {
return null;
@@ -166,6 +170,10 @@ public class GeneticsUtil {
if (item instanceof ItemGE) {
return ((ItemGE) item).getIndividual(itemStack);
}
if(TreeManager.treeRoot == null){
return null;
}
IIndividualTranslator<IIndividual, ItemStack> saplingTranslator = TreeManager.treeRoot.getTranslator(item);
if (saplingTranslator == null) {