Skip to content

Commit

Permalink
Fixed crash when using Undead Battle Standard on server
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz committed Dec 3, 2023
1 parent ca60526 commit ead74c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 ) {
Expand Down

0 comments on commit ead74c4

Please sign in to comment.