Forbidden and Arcanus

Forbidden and Arcanus

33M Downloads

[1.16.4] Bone Hoe Crash

Salamance73 opened this issue ยท 5 comments

commented

Hi I used a bone hoe (enchanted with eternal stella so its indestructable) on a piece of overgrown stone (from Oh the Biomes You'll Go) and got a crash. I'm playing with other mods on All the Mods 6.

https://pastebin.com/XMG2CGcr

Edit: The crash seems to be from tilling something that cannot be tilled. I attempted it again with regular dirt and it tilled it on the first click but on the second click I got the crash again.

commented

The bone hoe still crashes the client

Minecraft 1.16.5
F&A 16.2.0-beta-4
Forge 36.2.0

https://paste.ee/p/bftQf

commented

Bone Tools have been removed in 16.2.0.

commented

Getting the same error with the same item, though I was using it on standard wheat on standard tilled soil. Not sure if this makes any difference, but it DOES grow the wheat before it crashes. When you load back in, the plant has grown.

commented

Another crash report for this.

Here's the line causing the crash:

if (ModUtils.applyBonemeal(context.getItem(), (ServerWorld) world, blockpos, context.getPlayer())) {

It errors because on a client connected to a server, ItemUseContext,getWorld() is returning a net.minecraft.world.client.ClientWorld. While ClientWorld likely shares a parent class with net.minecraft.world.server.ServerWorld it cannot be cast to it directly.

It only reaches this code if the block type isn't in net.minecraft.item.HoeItem.HOE_LOOKUP.

The call to BoneHoeItem.onItemUse() is triggered by an ASM hook in Apotheosis:

https://github.com/Shadows-of-Fire/Apotheosis/blob/a457c5f778a8fb54445447f91c6b2abfed73fd3e/src/main/java/shadows/apotheosis/deadly/asm/DeadlyHooks.java#L118-L123

It looks like this hook is being removed in the next release of the mod. Though any other mod could potentially trigger the crash.

commented

I guess this is a me-too moment.

Adding the bone hoe to a quest in my mod pack and when I tested to the client crashed

Minecraft 1.16.5
F&A 16.2.0-beta-3
Forge 36.1.0

https://paste.ee/p/tNZun