Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public NBTTagCompound writeToNBT(NBTTagCompound tagCompound){
- super.writeToNBT(tagCompound);
- tagCompound.setFloat("degrees", this.degrees);
- return tagCompound;
- }
- @Override
- public void readFromNBT(NBTTagCompound tagCompound){
- super.readFromNBT(tagCompound);
- this.degrees = tagCompound.getInteger("degrees");
- }
- @Override
- @Nullable
- public SPacketUpdateTileEntity getUpdatePacket(){
- NBTTagCompound tagCompound = new NBTTagCompound();
- writeToNBT(tagCompound);
- return new SPacketUpdateTileEntity(this.pos, 1, tagCompound);
- }
- @Override
- public void onDataPacket(net.minecraft.network.NetworkManager net, net.minecraft.network.play.server.SPacketUpdateTileEntity pkt){
- NBTTagCompound tag = pkt.getNbtCompound();
- readFromNBT(tag);
- }
Advertisement
Add Comment
Please, Sign In to add comment