Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void readEntityFromNBT(NBTTagCompound compound)
- {
- super.readEntityFromNBT(compound);
- inventory.readFromNBT(compound);
- if (compound.hasKey(Names.NBT.TileEntityPosition))
- {
- int[] pos = compound.getIntArray(Names.NBT.TileEntityPosition);
- buildingBlockPos = new BlockPos(pos[0], pos[1], pos[2]);
- }
- }
- @Override
- public void writeEntityToNBT(NBTTagCompound compound)
- {
- super.writeEntityToNBT(compound);
- inventory.writeToNBT(compound);
- if (buildingBlockPos != null)
- {
- int[] pos =
- { buildingBlockPos.getX(), buildingBlockPos.getY(), buildingBlockPos.getZ() };
- compound.setIntArray(Names.NBT.TileEntityPosition, pos);
- }
- }
- public FactionBuilding getFactionBuilding()
- {
- return ((TileEntityBuilding) world.getTileEntity(buildingBlockPos)).getFactionBuilding();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement