From 664b3bb8677e50078567b5ba01036b0eb8e01c95 Mon Sep 17 00:00:00 2001 From: IThundxr Date: Sat, 23 Mar 2024 21:54:59 -0400 Subject: [PATCH] Fix #4739 --- changelog.txt | 3 ++- .../violetmoon/quark/content/mobs/entity/Forgotten.java | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index ea52531a84..960adf4a3b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1 +1,2 @@ -- Fix crash with optifine \ No newline at end of file +- Fix crash with optifine +- Fix crash with Dye Depot \ No newline at end of file diff --git a/src/main/java/org/violetmoon/quark/content/mobs/entity/Forgotten.java b/src/main/java/org/violetmoon/quark/content/mobs/entity/Forgotten.java index 5713827437..707207a212 100644 --- a/src/main/java/org/violetmoon/quark/content/mobs/entity/Forgotten.java +++ b/src/main/java/org/violetmoon/quark/content/mobs/entity/Forgotten.java @@ -152,7 +152,7 @@ public boolean canPickUpLoot() { } @Override - protected void populateDefaultEquipmentSlots(RandomSource rand, @NotNull DifficultyInstance difficulty) { + protected void populateDefaultEquipmentSlots(@NotNull RandomSource rand, @NotNull DifficultyInstance difficulty) { super.populateDefaultEquipmentSlots(rand, difficulty); prepareEquipment(); @@ -169,8 +169,10 @@ public void prepareEquipment() { DyeColor color = DyeColor.values()[random.nextInt(DyeColor.values().length)]; RuneColor rune = RuneColor.byDyeColor(color); - ColorRunesModule.withRune(bow, rune); - ColorRunesModule.withRune(sheathed, rune); + if (rune != null) { + ColorRunesModule.withRune(bow, rune); + ColorRunesModule.withRune(sheathed, rune); + } } setItemSlot(EquipmentSlot.MAINHAND, bow);