Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

myoKun345

Members
  • 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. 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.
  3. 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!
  4. 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!

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.