Started by
bl4dele4f
on
Topic category: Troubleshooting, bugs, and solutions
I made "Deal 100 damage to item in slot 0 when button pressed" procedure, and "deal damage" block do nothing.
This is auto-generated code:
package net.mcreator.flowerreflect.procedures;
/* imports omitted */
public class MendProcedureProcedure {
public static void execute(Entity entity) {
if (entity == null)
return;
if (entity instanceof Player _player && _player.level() instanceof ServerLevel _serverLevel && _player.containerMenu instanceof FlowerreflectModMenus.MenuAccessor _menu) {
ItemStack stack = _menu.getSlots().get(0).getItem();
if (stack != null) {
stack.hurtAndBreak(100, _serverLevel, null, _stkprov -> {
});
_player.containerMenu.broadcastChanges();
}
}
}
}
I don't know Java, so I don't know what happened to auto-generated code.
But i'm sure this is bug. In 2024.3, that block worked well!
(OK... I found same bug in 2024.3....)
Edited by bl4dele4f on Tue, 03/10/2026 - 12:02
Oh my. why video is so laggy :(
OK I found more info
If GUI opened by Item's "Open bound GUI on right click?" thing, this bug happens!
Seen this on GitHub, we will check it out!