Posted February 26, 201510 yr Hi, How can I get an existing TileEntity by item right-click? This code get always myTile = null: myTileEntity myTile = (myTileEntity)world.getTileEntity(x, y, z); Instead on own block onUpdateTick event, the same code work fine o_O please help ...
February 26, 201510 yr Show where you got the x, y, and z coordinates from. Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
February 27, 201510 yr Author ok, sorry for delay, I moved all my code into the "onBlockActivate" event: public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if (player.isSneaking()) { if (player.getCurrentEquippedItem() != null) TileEntityPortalSticky tileentitySticky = (TileEntityPortalSticky)world.getTileEntity(x, y, z); } return false; } But seems dont call the event when the player is sneaked ... is it possible?
February 27, 201510 yr 1. Are you registering your tileentity? 2. Show your creation of the tileentity
February 27, 201510 yr Sneak pypasses block activation. Im not sure if you can change that for your block. I am the author of Draconic Evolution
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.