Skip to content

Commit

Permalink
final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ANightDazingZoroark committed Feb 14, 2024
1 parent 436d75c commit 87b38f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/anightdazingzoroark/prift/server/ServerProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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<Block> event) {}

Expand Down

0 comments on commit 87b38f5

Please sign in to comment.