diff --git a/src/main/java/anightdazingzoroark/prift/RiftInitialize.java b/src/main/java/anightdazingzoroark/prift/RiftInitialize.java index 821e6845..dfd60cca 100644 --- a/src/main/java/anightdazingzoroark/prift/RiftInitialize.java +++ b/src/main/java/anightdazingzoroark/prift/RiftInitialize.java @@ -5,6 +5,7 @@ import anightdazingzoroark.prift.server.commands.RiftBleedCommand; import anightdazingzoroark.prift.server.entity.RiftEntities; import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; diff --git a/src/main/java/anightdazingzoroark/prift/compat/simpledifficulty/ModifierDimetrodon.java b/src/main/java/anightdazingzoroark/prift/compat/simpledifficulty/ModifierDimetrodon.java index 7053d0d4..3dccd705 100644 --- a/src/main/java/anightdazingzoroark/prift/compat/simpledifficulty/ModifierDimetrodon.java +++ b/src/main/java/anightdazingzoroark/prift/compat/simpledifficulty/ModifierDimetrodon.java @@ -7,14 +7,11 @@ import com.google.common.base.Predicate; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import javax.annotation.Nullable; diff --git a/src/main/java/anightdazingzoroark/prift/server/ServerProxy.java b/src/main/java/anightdazingzoroark/prift/server/ServerProxy.java index b742211f..8f362dc3 100644 --- a/src/main/java/anightdazingzoroark/prift/server/ServerProxy.java +++ b/src/main/java/anightdazingzoroark/prift/server/ServerProxy.java @@ -19,6 +19,7 @@ import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.Optional; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -43,9 +44,7 @@ public void preInit(FMLPreInitializationEvent e) { RiftRecipes.registerSmelting(); MinecraftForge.EVENT_BUS.register(new RiftItems()); RiftEntities.registerEntities(); - if (Loader.isModLoaded(RiftInitialize.SIMPLE_DIFFICULTY_MOD_ID)) { - TemperatureRegistry.registerModifier(new ModifierDimetrodon()); - } + if (Loader.isModLoaded(RiftInitialize.SIMPLE_DIFFICULTY_MOD_ID)) loadTemperatureRegistry(); } public void init(FMLInitializationEvent event) { @@ -56,6 +55,11 @@ public void postInit(FMLPostInitializationEvent event) {} public void spawnParticle(String name, double x, double y, double z, double motX, double motY, double motZ) {} + @Optional.Method(modid = RiftInitialize.SIMPLE_DIFFICULTY_MOD_ID) + private void loadTemperatureRegistry() { + TemperatureRegistry.registerModifier(new ModifierDimetrodon()); + } + @SubscribeEvent public static void registerBlocks(RegistryEvent.Register event) {}