mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-27 15:22:57 +00:00
Fix #1666 Crash 1.11.2
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user