2015-01-05 22:14:01 +01:00
|
|
|
package ellpeck.someprettytechystuff.tile;
|
2014-12-12 15:40:01 +01:00
|
|
|
|
2014-12-18 19:24:06 +01:00
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
2015-01-05 22:14:01 +01:00
|
|
|
import ellpeck.someprettytechystuff.util.Util;
|
2014-12-12 15:40:01 +01:00
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
|
|
import net.minecraft.network.NetworkManager;
|
|
|
|
import net.minecraft.network.Packet;
|
|
|
|
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
|
|
|
|
public class TileEntityBase extends TileEntity{
|
|
|
|
|
|
|
|
public Packet getDescriptionPacket(){
|
|
|
|
NBTTagCompound compound = new NBTTagCompound();
|
|
|
|
this.writeToNBT(compound);
|
|
|
|
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, this.getBlockMetadata(), compound);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet){
|
|
|
|
super.onDataPacket(net, packet);
|
|
|
|
this.readFromNBT(packet.func_148857_g());
|
|
|
|
}
|
|
|
|
|
2014-12-18 19:24:06 +01:00
|
|
|
public static void init(){
|
|
|
|
GameRegistry.registerTileEntity(TileEntityCrucible.class, Util.MOD_ID + "tileEntityCrucible");
|
|
|
|
GameRegistry.registerTileEntity(TileEntityCrucibleFire.class, Util.MOD_ID + "tileEntityCrucibleFire");
|
|
|
|
}
|
2014-12-12 15:40:01 +01:00
|
|
|
}
|