Nbt Crafting (Fabric)

Nbt Crafting (Fabric)

630k Downloads

[bug] Fwd: areTagsEqualReturn1() NPE

vlad2305m opened this issue ยท 3 comments

commented

see vlad2305m/AkashicTomeOfToolsFabric#5

Additional context
areTagsEqualReturn1() yet again causes NPE

commented

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;

@Inject(method = "areNbtEqual", at = @At(value = "RETURN", ordinal = 2), cancellable = true)
private static void areTagsEqualReturn1(ItemStack stack1, ItemStack stack2, CallbackInfoReturnable<Boolean> callbackInfoReturnable) {
if (stack2.getNbt().isEmpty())
callbackInfoReturnable.setReturnValue(true);
}

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.

commented

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.

commented

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