Hookshot

Hookshot

2M Downloads

Hookshot crashing issue

funnycat2016 opened this issue · 14 comments

commented

so atm i run a mc server using v26 in 1.19.2 its using the Better mc mod pack version 17.5 and i have Hookshot, infusion tables and mythic mounts. the issue is that every time someone hookshots an entity they crash and if they hookshot another player most of the time they both crash. is there any chance you know what's causing this?

commented

so will you update the mod and then i add it to my server again?

commented

when i can get around to it

commented

awesome thanks

commented

The game crashed whilst saving entity nbt
Error: java.lang.NullPointerException: Cannot invoke "net.minecraft.item.ItemStack.writeNbt(net.minecraft.nbt.NbtCompound)" because "this.stack" is null

is this what you mean?

commented

Could you add the related crashlogs please?

commented

No, Minecraft creates actual crash reports when it crashes, file location on the client should be %AppData%/.minecraft/crash-reports
In case there are no crash reports, normal logs are in .minecraft/logs iirc

commented

it doesn't let me send the crash note file so do you want me to copy what it says instead

commented

Not exactly sure what you mean but you can just make a pastebin post

commented

https://pastebin.com/kynyFs5s sorry ive never really used github so didnt know

commented

ah, I know what the problem is. yeah, I can make a fix in a little bit, its just one line.

commented

Someone reported this issue to me but there isn't anything I can do on my Bumblezone side since the hookshot entity crashes when trying to save itself to nbt. Just giving you a heads up that I'm starting to get reports of this issue

commented

Confirming, now getting the same issue:
crash-2023-07-19_22.58.21-client.txt

Wanted to originally create a ticket for both The Bumblezon as well 😄 as well as Hookshot. But I see it's all already known.

At first it's weird that it happens in The Bumblezone's Twilight Forest compat when I try to Hookshot a Better Nether Firefly in the Nether, inside a isTeleportHandled() method. This sounds like something that should not be happening at all. But it looks like there is no other way for that check to work.

commented

@noncom its because twilight forest’s teleporting bows assign a value to the arrow’s nbt so they know the arrow was from the bow at impact. I save the projectile to nbt to check for that boolean so I can run my compat code if it is a teleporting bow shot arrow and teleport player to Bumblezone if it hit a beehive.

Hookshot projectile apparently crashes when saved to nbt. Ideally it wouldn’t so that if twilight forest expands what their bow can shoot, I can work with any projectile that is shot from the bow

commented

Yeah, as far as I was able to gather from looking at Projectile, there's no other inherent way to attribute a projectile to something. So the same problem would spread to any other code that wants to know what the projectile is.