Posted September 14, 201411 yr So, this is just a simple question I have, and couldn't find anything on google about it, what are the parameters of createNewTileEntity, I know the world parameter, but what is the second one? Is it metadata? I hope so, because I have a metadata block, and would like to have a different tile for each one. If it isn't I have ways of working round it, and using one tileentity, I could use the getMetadata method in the tileentity. Thanks. I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.
September 14, 201411 yr Yes, that second parameter is the metadata of the block. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
September 14, 201411 yr Author Okay, thanks I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.
August 12, 201510 yr And does it correspond to the created block's metadata, or the used ItemStack's damage? Also, can I work around this method completely? I'd rather have my ItemBlock class do the work.
August 12, 201510 yr Yeah, but what I thought I'd do is like: w.setBlock(x, y, z, machineBlock); w.setTileEntity(x, y, z, MachineRegistry.getMachineClass(itemStack.getStackDamage()).newInstance());
August 12, 201510 yr I'll beat Dies to it. No, NO, No, no, NO Now, joking aside. In your block that has a tileentity associated with it, it should automatically create the tile when the block is placed. You place the block, the tile is instantly placed also. also, it is more like w.setblockstate(pos, machineBlock.getdefaultstate); [that is for 1.8] - oops for 1.7, you are fine for block placement, same comment on tile. Long time Bukkit & Forge Programmer Happy to try and help
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.