only register the WailaRenderEvent listener client side
@@ -46,8 +46,10 @@ import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.state.BlockState;
+import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.ModList;
+import net.minecraftforge.fml.loading.FMLEnvironment;
import net.minecraftforge.registries.RegistryObject;
@WailaPlugin(SecurityCraft.MODID)
@@ -65,6 +67,7 @@ public class WailaDataProvider implements IWailaPlugin, IComponentProvider, IEnt
private static final MutableComponent SPEED_MODULE = new TextComponent("- ").append(new TranslatableComponent(ModuleType.SPEED.getTranslationKey())).withStyle(Utils.GRAY_STYLE);
static {
+ if (FMLEnvironment.dist == Dist.CLIENT)
MinecraftForge.EVENT_BUS.addListener(WailaDataProvider::onWailaRender);
}
