Guard against null item entities in LivingDropsEvent, fixes #464

This commit is contained in:
Electroblob77
2021-01-17 17:19:07 +00:00
parent 3b55728c75
commit 8a9d88c9ac
@@ -45,7 +45,8 @@ public interface Imbuement {
public static void onLivingDropsEvent(LivingDropsEvent event){
// Instantly disenchants an imbued weapon if it is dropped when the player dies.
for(EntityItem item : event.getDrops()){
removeImbuements(item.getItem());
// Apparently some mods don't behave and shove null items in the list, quite why I have no idea
if(item != null) removeImbuements(item.getItem());
}
}