From f33bc26ac7db51fd0b29a75fd72d1f65e1b4fa6b Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 6 Oct 2024 19:53:26 +0100 Subject: [PATCH] Exclude spawn bonus chests from mimics --- .../com/minelittlepony/unicopia/entity/mob/MimicEntity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/mob/MimicEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/mob/MimicEntity.java index 7013d8d3..6ea22c39 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/mob/MimicEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/mob/MimicEntity.java @@ -71,6 +71,7 @@ public class MimicEntity extends PathAwareEntity { return false; } + // TODO: Local difficulty? int difficulty = world.getDifficulty().ordinal() - 1; float threshold = 0.35F * ((EnchantmentUtil.getLuck(0, player) / 20F) + 0.5F); return difficulty > 0 && world.random.nextFloat() < (difficulty / 3F) * threshold; @@ -103,7 +104,8 @@ public class MimicEntity extends PathAwareEntity { && lootTable.getValue().getPath().indexOf("village") == -1 && lootTable.getValue().getPath().indexOf("bastion") == -1 && lootTable.getValue().getPath().indexOf("underwater") == -1 - && lootTable.getValue().getPath().indexOf("shipwreck") == -1; + && lootTable.getValue().getPath().indexOf("shipwreck") == -1 + && !LootTables.SPAWN_BONUS_CHEST.equals(lootTable); } MimicEntity(EntityType type, World world) {