Fixed generator not storing inv
This commit is contained in:
parent
e7b7e44a48
commit
b7212bec69
1 changed files with 12 additions and 0 deletions
|
@ -5,6 +5,7 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
|
@ -214,4 +215,15 @@ public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IIn
|
|||
return new ItemStack(ModBlocks.Generator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tagCompound) {
|
||||
super.readFromNBT(tagCompound);
|
||||
inventory.readFromNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tagCompound) {
|
||||
super.writeToNBT(tagCompound);
|
||||
inventory.writeToNBT(tagCompound);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue