Curios API (Forge/NeoForge)

Curios API (Forge/NeoForge)

140M Downloads

[Bug]: Blocks do not drop their loot tables after destroying

Tiviacz1337 opened this issue ยท 2 comments

commented

Minecraft Version

1.20.6

What happened?

I was implementing compatibility for my mod and noticed that curios breaks ability to destroy blocks throwing an error.
Seems like you try to set experience drop everytime and it throws an error when block drops 0 experience, because value must be positive

How do you trigger this bug?

  1. Install Curios API
  2. Set survival game mode
  3. Destroy any block
  4. Block do not drop, error prints in console

Loader

NeoForge

Loader Version

NeoForge - 20.6.119

Mod Version

Curios 8.0.1+1.20.6

Relevant Log Outputs

https://hastebin.com/share/emabusawen.perl

commented

This is rather strange, because the code that's being referenced shouldn't exist in your version of NeoForge. This was a bug that they fixed in 20.6.116.

https://github.com/neoforged/NeoForge/blob/6c2f2b017e7e194fba32905392a70077ea2d0508/src/main/java/net/neoforged/neoforge/event/level/BlockDropsEvent.java#L126

It now only checks for a non-negative value, so 0 is valid. In addition, I've just tested this myself and cannot reproduce this issue. But I do see in your log that it seems like you're loading 20.6.119, so I honestly can't explain the discrepancy. Maybe remove and refresh the dependency? Or maybe the block you're destroying is returning a negative value for some reason?

commented

I'll refresh the environment to load proper neo and update here