Siphalor / nbt-crafting

A 1.15+ fabric Minecraft mod to enable nbt related recipe stuff
https://modrinth.com/mod/nbt-crafting
Apache License 2.0
49 stars 26 forks source link

[bug] Fwd: areTagsEqualReturn1() NPE #98

Open vlad2305m opened 2 years ago

vlad2305m commented 2 years ago

see https://github.com/vlad2305m/AkashicTomeOfToolsFabric/issues/5

Additional context areTagsEqualReturn1() yet again causes NPE

Siphalor commented 2 years ago

Ok, just to clear a few things up.

This issue is only mildly related to #64 in the aspect that it's caused by the same injection.

I'm also curious how you came to the conclusion that I swept that one under the carpet. I don't see anything wrong in how I handled that issue and a response time of less than a day is really nothing you can complain about - If you do, then just go away.

Furthermore, I don't even understand how this thing is caused, since mixin reports a correct injection in my test environment:

    public static boolean areNbtEqual(ItemStack left, ItemStack right) {
        if (left.isEmpty() && right.isEmpty()) {
            return true;
        } else if (!left.isEmpty() && !right.isEmpty()) {
            if (left.nbt == null && right.nbt != null) {
                CallbackInfoReturnable callbackInfo2 = false;
                CallbackInfoReturnable callbackInfo2 = new CallbackInfoReturnable("areNbtEqual", true, callbackInfo2);
                handler$zce000$areTagsEqualReturn1(left, right, callbackInfo2);
                return callbackInfo2.isCancelled() ? callbackInfo2.getReturnValueZ() : false;

https://github.com/Siphalor/nbt-crafting/blob/f529396be723df648cf4c6189acb5dfd2ffcd534/src/main/java/de/siphalor/nbtcrafting/mixin/MixinItemStack.java#L36-L40

I'm going to ask the author of the original issue to do some more debugging - in the current situation I can only do wild guesses what's going wrong.

Just to clarify: I appreciate that you report this back to me, I just don't think the tone that you used is appropriate. Don't imply bad intentions if there are no indications for them.

vlad2305m commented 2 years ago

I'm sorry about any aggressive tone I used.

Issues in modpacks are indeed both difficult and interesting to look into. This one, for example, has 3 differen mods in the stack trace that made it happen, and it is also rather strange that it didn't happen straightaway.

github-actions[bot] commented 2 years ago

This issue has been marked as stale because of inactivity. Comment on this issue or it will be closed in 14 days.