Sync MRS NBT to client
This commit is contained in:
parent
fa030a1d43
commit
8b3c91d77e
1 changed files with 18 additions and 0 deletions
|
@ -19,6 +19,9 @@ import lombok.Setter;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
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;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.BlockPos;
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
@ -221,4 +224,19 @@ public class TileMasterRitualStone extends TileEntity implements IMasterRitualSt
|
||||||
{
|
{
|
||||||
return super.getPos();
|
return super.getPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Packet getDescriptionPacket()
|
||||||
|
{
|
||||||
|
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||||
|
writeToNBT(nbttagcompound);
|
||||||
|
return new S35PacketUpdateTileEntity(pos, this.getBlockMetadata(), nbttagcompound);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet)
|
||||||
|
{
|
||||||
|
super.onDataPacket(net, packet);
|
||||||
|
readFromNBT(packet.getNbtCompound());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue