protected totems from dropping to fix a bug where the player dies whilst holding one

This commit is contained in:
2026-07-30 17:08:23 +02:00
parent c179f37a06
commit 319dcaaed7
2 changed files with 2 additions and 0 deletions
@@ -32,6 +32,7 @@ public abstract class EquipmentMixin {
Map.Entry<EquipmentSlot, ItemStack> entry = it.next();
ItemStack stack = entry.getValue();
if (stack.isEmpty()) continue;
if (stack.is(net.minecraft.world.item.Items.TOTEM_OF_UNDYING)) continue;
if (RANDOM.nextInt(100) < LootLossConfig.lossPercentage) {
dropper.drop(stack, true, false);
@@ -30,6 +30,7 @@ public abstract class InventoryMixin {
for (int i = 0; i < this.items.size(); i++) {
ItemStack stack = this.items.get(i);
if (stack.isEmpty()) continue;
if (stack.is(net.minecraft.world.item.Items.TOTEM_OF_UNDYING)) continue;
if (RANDOM.nextInt(100) < LootLossConfig.lossPercentage) {
this.player.drop(stack, true, false);