protected totems from dropping to fix a bug where the player dies whilst holding one
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user