Highly-specific bug relating to item comparing blocks and item element stack size modification

Started by alttest255671 on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 18:03, 9. Sep 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Highly-specific bug relating to item comparing blocks and item element stack size modification

I was making a science-oriented mod, and one of the items was a pipette for taking water samples and then analyzing them. It stores what biome it was last used in via the "custom_data" component (standard behavior from MCreator).

I also wanted a visual change whenever the pipette was full/empty, so I used a durability-dependant itemstate for this. It worked as intended.

Then, I realised I wanted the stack size to be greater than 1, so I switched to a custom property for the itemstate and set the stack size back to 64.

For some reason, it stopped working. The analysis returned empty. I tried removing the itemstate, same thing. Restart MCreator? Nothing.

After using the custom code snippet block to dot my entire analysis procedure with "System.out.println" after each block, I found out that the Red Item Equals Block was failing to find the pipette.

It was able to find any other item, even ones that I gave a biome to in their custom data with commands, but not the pipette, be it crafted, from creative, used or unused, it didn't detect it. Using registry names, tags and other custom properties didn't work either.

What solved it was to make an entirely new item with a different registry name ("water sampler") and readding the needed behaviors manually. This fixed everything.

What this tell me is that this is likely MCreator's issue, somewhere.

This bug must be quite rare, and is likely not very high in you guys' priorities, but I wanted to record it somewhere.