Fix crash with auto crafter
This commit is contained in:
parent
9477797ec7
commit
3a0c5a6f31
1 changed files with 6 additions and 2 deletions
|
@ -227,13 +227,17 @@ public class TileAutoCraftingTable extends TilePowerAcceptor implements IContain
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NBTTagCompound writeToNBT(NBTTagCompound tag) {
|
public NBTTagCompound writeToNBT(NBTTagCompound tag) {
|
||||||
|
if(currentRecipe != null){
|
||||||
tag.setString("currentRecipe", currentRecipe.toString());
|
tag.setString("currentRecipe", currentRecipe.toString());
|
||||||
|
}
|
||||||
return super.writeToNBT(tag);
|
return super.writeToNBT(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound tag) {
|
public void readFromNBT(NBTTagCompound tag) {
|
||||||
|
if(tag.hasKey("currentRecipe")){
|
||||||
currentRecipe = new ResourceLocation(tag.getString("currentRecipe"));
|
currentRecipe = new ResourceLocation(tag.getString("currentRecipe"));
|
||||||
|
}
|
||||||
super.readFromNBT(tag);
|
super.readFromNBT(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue