From 9d769a88c06a12ea5beaece053708a5f3003e959 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 2 May 2023 15:09:35 -0500 Subject: [PATCH] Dedicated Server Crash Hotfix Should Fix #15 --- build.gradle | 2 +- .../io/redspace/ironsspellbooks/tetra/TetraActualImpl.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 08859b2d7..c7d4cf787 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ apply plugin: 'org.spongepowered.mixin' apply plugin: 'org.parchmentmc.librarian.forgegradle' apply plugin: 'maven-publish' -version = '1.0.4' +version = '1.0.5' group = 'io.redspace.ironsspellbooks' archivesBaseName = 'irons_spellbooks' diff --git a/src/main/java/io/redspace/ironsspellbooks/tetra/TetraActualImpl.java b/src/main/java/io/redspace/ironsspellbooks/tetra/TetraActualImpl.java index 3dd869dac..5ae795500 100644 --- a/src/main/java/io/redspace/ironsspellbooks/tetra/TetraActualImpl.java +++ b/src/main/java/io/redspace/ironsspellbooks/tetra/TetraActualImpl.java @@ -6,6 +6,8 @@ import io.redspace.ironsspellbooks.tetra.effects.ManaSiphonTetraEffect; import net.minecraft.world.entity.ai.attributes.Attribute; import net.minecraft.world.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.event.entity.living.LivingAttackEvent; import se.mickelus.tetra.blocks.workbench.gui.WorkbenchStatsGui; import se.mickelus.tetra.gui.stats.StatsHelper; @@ -16,6 +18,7 @@ public class TetraActualImpl implements ITetraProxy { + @OnlyIn(Dist.CLIENT) @Override public void initClient() { @@ -61,7 +64,7 @@ public void handleLivingAttackEvent(LivingAttackEvent event) { FreezeTetraEffect.handleLivingAttackEvent(event); ManaSiphonTetraEffect.handleLivingAttackEvent(event); } - + @OnlyIn(Dist.CLIENT) private static void createPercentAttributeBar(Attribute attribute, String languageKey) { IStatGetter statGetter = new StatGetterPercentAttribute(attribute); GuiStatBar statBar = new GuiStatBar(0, 0, StatsHelper.barLength, attribute.getDescriptionId(), 0, 100, false,