From ead74c418ab60f34c71abe53aced332061140828 Mon Sep 17 00:00:00 2001 From: Majrusz Date: Sun, 3 Dec 2023 13:19:49 +0100 Subject: [PATCH] Fixed crash when using Undead Battle Standard on server --- changelog.md | 1 + .../com/majruszsdifficulty/items/UndeadBattleStandard.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index fa62c88ed..609ae35aa 100644 --- a/changelog.md +++ b/changelog.md @@ -1,2 +1,3 @@ +- fixed crash when using Undead Battle Standard on server - fixed bug with thunder not working properly during Undead Army - fixed bug with Soul Jar damage bonus being calculated incorrectly \ No newline at end of file diff --git a/common/src/main/java/com/majruszsdifficulty/items/UndeadBattleStandard.java b/common/src/main/java/com/majruszsdifficulty/items/UndeadBattleStandard.java index 7c5126216..a18acac96 100644 --- a/common/src/main/java/com/majruszsdifficulty/items/UndeadBattleStandard.java +++ b/common/src/main/java/com/majruszsdifficulty/items/UndeadBattleStandard.java @@ -3,6 +3,7 @@ import com.majruszlibrary.events.OnItemTooltip; import com.majruszlibrary.events.OnPlayerInteracted; import com.majruszlibrary.item.ItemHelper; +import com.majruszlibrary.platform.Side; import com.majruszlibrary.text.TextHelper; import com.majruszsdifficulty.undeadarmy.UndeadArmyHelper; import net.minecraft.ChatFormatting; @@ -23,10 +24,11 @@ public UndeadBattleStandard() { } private static void tryToSpawn( OnPlayerInteracted data ) { - if( UndeadArmyHelper.tryToSpawn( data.player ) ) { + if( Side.isLogicalServer() && UndeadArmyHelper.tryToSpawn( data.player ) ) { ItemHelper.consumeItemOnUse( data.itemStack, data.player ); - data.finish(); } + + data.finish(); } private static void addTooltip( OnItemTooltip data ) {