mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-28 07:55:54 +00:00
POH. TAY. TOES.
This commit is contained in:
1 parent
3e2661c743
commit
12f82e3cb7
14 files changed
+445
-28
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package fox.spiteful.avaritia.tile;
|
||||
|
||||
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 TileLudicrous extends TileEntity {
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
super.writeToNBT(tag);
|
||||
writeCustomNBT(tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
super.readFromNBT(tag);
|
||||
readCustomNBT(tag);
|
||||
}
|
||||
|
||||
public void writeCustomNBT(NBTTagCompound tag) {}
|
||||
public void readCustomNBT(NBTTagCompound tag) {}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
writeCustomNBT(tag);
|
||||
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, -999, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
|
||||
super.onDataPacket(net, packet);
|
||||
readCustomNBT(packet.func_148857_g());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user