Fixed generator not storing inv

This commit is contained in:
gigabit101 2016-03-06 15:20:38 +00:00
parent e7b7e44a48
commit b7212bec69

View file

@ -5,6 +5,7 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.IChatComponent; import net.minecraft.util.IChatComponent;
@ -214,4 +215,15 @@ public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IIn
return new ItemStack(ModBlocks.Generator); 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);
}
} }