From f36019b4ef33d353396efdd030e0b231814d8c67 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 3 Jan 2024 23:50:05 +0700 Subject: [PATCH] Subscribe to these vents only when running client --- src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt index cd582a85f..9ab9f2306 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt @@ -48,6 +48,7 @@ import ru.dbotthepony.mc.otm.core.math.BlockRotationFreedom import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.math.RGBAColor import ru.dbotthepony.mc.otm.data.DecimalProvider +import ru.dbotthepony.mc.otm.isClient import ru.dbotthepony.mc.otm.item.weapon.EnergySwordItem import ru.dbotthepony.mc.otm.matter.AbstractRegistryAction import ru.dbotthepony.mc.otm.matter.IMatterFunction @@ -291,8 +292,8 @@ object MRegistry { bus.addListener(this::initializeCommon) bus.addListener(MStats::registerVanilla) bus.addListener(this::registerEvent) - bus.addListener(this::registerItemColorHandlers) - bus.addListener(this::registerItemDecorators) + if (isClient) bus.addListener(this::registerItemColorHandlers) + if (isClient) bus.addListener(this::registerItemDecorators) MCreativeTabs.initialize(bus)