Fixed ghost item drops when hitting an entity. Closes #513

This commit is contained in:
Sollace 2024-11-01 14:11:13 +00:00
parent 1920233090
commit 5d8f9e37b4
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -167,11 +167,11 @@ public class PhysicsBodyProjectileEntity extends PersistentProjectileEntity impl
stack.damage(1 + random.nextInt(10), sw, null, i -> {
playSound(USounds.Vanilla.ENTITY_ITEM_BREAK, 1, 1);
});
if (!stack.isEmpty()) {
dropStack(stack);
}
discard();
}
if (!stack.isEmpty()) {
dropStack(stack);
}
setStack(ItemStack.EMPTY);
}
}
super.onEntityHit(hit);