Posted October 6, 201410 yr I want to set a nbt variable (or whatever they're called) as a TileEntity, is this possible? or would I have to store the x/y/z coords of the block. The proud(ish) developer of Ancients
October 6, 201410 yr You can't save a tileEntity by itself, however you can do this: SomeTileEntity tileEntity = ......; NBTTagCompound compound = new NBTTagCompound(); tileEntity.writeToNBT(compound); Then later, to get the tileEntity back NBTTagCompound compound = //retrieve the compound SomeTileEntity tileEntity = new SomeTileEntity(); tileEntity.readFromNBT(compound); BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.