Ender Pickaxe with Direct crashes mining red gem from erebus.
KitKat31337 opened this issue ยท 3 comments
Issue Description:
Ender Pickaxe with Direct crashes mining red gem from erebus.
What happens:
server crash
What you expected to happen:
mine the gem
Steps to reproduce:
get Ender Pickaxe with Direct Upgrade
2.Mine Red Gem in Erebus dimension
Affected Versions (Do not use "latest"):
EnderIO: 5.0.40
EnderCore:1.12.2-0.5.45
Minecraft:1.12.2
Forge: 14.23.5.2808
SpongeForge? no
Optifine? no
Server
Your most recent log file where the issue was present:
TheErebus/src/main/java/erebus/blocks/BlockRedGem.java
Lines 61 to 69 in 8c6ecfa
EIO tries to change to drop to 0 then adds it to the players inventory but its in a NonNullable List
To be more precise, it is a fixed-size, array-backed NonNullList. Those don't support remove().
The list returned from getDrops() is used in the HarvestDropsEvent, which explicitly states that changing the drops list by removing or adding stacks is not only supported but the main purpose of the event. So handing out a list from getDrops() that can not be modified is wrong.