meteor-client icon indicating copy to clipboard operation
meteor-client copied to clipboard

Update StorageBlockListSettingScreen.java to use reflection

Open tympanicblock61 opened this issue 1 year ago • 1 comments

How Has This Been Tested?

me

Checklist:

  • [ maybe] My code follows the style guidelines of this project.
  • [ nope] I have added comments to my code in more complex areas.
  • [ yes] I have tested the code in both development and production environments.

accept this if you want i dont really care

tympanicblock61 avatar Jun 24 '24 01:06 tympanicblock61

Opened the code to check it out but I got an idea that could be much better than reflection. The BlockEntityType class contains a set of Blocks. So we could just get the block from that set, get the item for the block and create the name from it's id. The only problem are shulker boxes, since those are the only block entities that have more blocks associated with the type because of colors. So there would have to be special code for that to make sure it picks the one without a color. But imo it would be a nicer approach than reflection which depends on the development mappings.

MineGame159 avatar Jul 16 '24 09:07 MineGame159