Jump to content

myoKun345

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by myoKun345

  1. Well, it only half fixed it. Saving and reloading the world just breaks it again, meaning the client version of the tile entity is not being saved between loads. EDIT: And then placing a new instance of this block in the world both breaks any further updates and crashes the game after a while of ticking.
  2. That did it. Thank you for the help!
  3. I'm trying to update a render (and collision box/bounding box) of a block with a short value stored in a Tile Entity. It was not updating, so I added debug outputs to all related methods (renderWorldBlock in my rendering handler class and getCollisionBoundingBoxFromPool and getBoundingBoxFromPool in my block class), and, lo and behold, only the method that is being given an instance of World and not IBlockAccess was getting the short value correctly. My theory at this point is that either IBlockAccess's getBlockTileEntity is broken or I am casting the tile entity wrongly. What is confusing to me is that it would update the render properly before I made the render update on a random tick, but not now. Related code: https://github.com/myoKun345/Ars-Herbologica/blob/master/herbologica_common/herbologica/block/crop/BlockHerbologicaBush.java https://github.com/myoKun345/Ars-Herbologica/blob/master/herbologica_common/herbologica/render/BushRender.java https://github.com/myoKun345/Ars-Herbologica/blob/master/herbologica_common/herbologica/tileentity/crop/TileEntityBush.java The rest of the code is in the repository if needed. Thanks in advance.
  4. Ah, ok. I now have it so the tileentity variable is defined with world.getBlockTileEntity(x,y,z) cast to TileEntityBush whenever setBlockBoundsBasedOnState and onBlockActivated are called. It works now, thank you!
  5. Hello everyone, I am having some trouble reading an NBT value from a tile entity attached to instances of my blocks; I have it set temporarily that right clicking on the block will increment the value stored in NBT. This works, but every instance of the block also gets the resulting effects of the NBT change because while every block instance creates a new tile entity, they all are only checking the first one that was created. I am sure I just made a newbie mistake, but I haven't been able to determine what is wrong in the code. Related code: https://github.com/myoKun345/Ars-Herbologica/blob/master/herbologica_common/herbologica/block/crop/BlockHerbologicaBush.java https://github.com/myoKun345/Ars-Herbologica/blob/master/herbologica_common/herbologica/tileentity/crop/TileEntityBush.java The rest of the code is in the repository if you need to check something else. Thanks in advance!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.