Temporary fix for #1429.

This commit is contained in:
drcrazy 2018-03-06 02:48:08 +03:00
parent 111ee7630a
commit 6b68a8aef2

View file

@ -66,7 +66,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor
public int maxProgress = 120; public int maxProgress = 120;
public int euTick = 10; public int euTick = 10;
public Pair<ResourceLocation, IRecipe> cachedRecipe; public Pair<ResourceLocation, IRecipe> cachedRecipe;
public boolean customRecipe = true; public boolean customRecipe = false;
InventoryCrafting inventoryCrafting = null; InventoryCrafting inventoryCrafting = null;
IRecipe lastCustomRecipe = null; IRecipe lastCustomRecipe = null;
@ -77,13 +77,17 @@ public class TileAutoCraftingTable extends TilePowerAcceptor
currentRecipe = null; currentRecipe = null;
} }
this.customRecipe = customRecipe; // Disabled due to performance issues
//this.customRecipe = customRecipe;
this.customRecipe = false;
cachedRecipe = null; cachedRecipe = null;
} }
public void setCurrentRecipe(ResourceLocation recipe, boolean customRecipe) { public void setCurrentRecipe(ResourceLocation recipe, boolean customRecipe) {
currentRecipe = recipe; currentRecipe = recipe;
this.customRecipe = customRecipe; // Disabled due to performance issues
//this.customRecipe = customRecipe;
this.customRecipe = false;
cachedRecipe = null; cachedRecipe = null;
} }
@ -373,7 +377,9 @@ public class TileAutoCraftingTable extends TilePowerAcceptor
if (currentRecipe != null) { if (currentRecipe != null) {
tag.setString("currentRecipe", currentRecipe.toString()); tag.setString("currentRecipe", currentRecipe.toString());
} }
tag.setBoolean("customRecipe", customRecipe); // Disable due to performance issues
// tag.setBoolean("customRecipe", customRecipe);
tag.setBoolean("customRecipe", false);
return super.writeToNBT(tag); return super.writeToNBT(tag);
} }
@ -382,7 +388,9 @@ public class TileAutoCraftingTable extends TilePowerAcceptor
if (tag.hasKey("currentRecipe")) { if (tag.hasKey("currentRecipe")) {
currentRecipe = new ResourceLocation(tag.getString("currentRecipe")); currentRecipe = new ResourceLocation(tag.getString("currentRecipe"));
} }
customRecipe = tag.getBoolean("customRecipe"); // Disabled due to performance issues
//customRecipe = tag.getBoolean("customRecipe");
customRecipe = false;
super.readFromNBT(tag); super.readFromNBT(tag);
} }