Skip to content

Commit

Permalink
fixed incorrect dimension effects registration server-side
Browse files Browse the repository at this point in the history
fixes #389
  • Loading branch information
NewJumper committed Nov 16, 2024
1 parent 5f458e9 commit 796d7dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main/java/com/kyanite/deeperdarker/DeeperDarker.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.kyanite.deeperdarker.world.DDFeatures;
import com.kyanite.deeperdarker.world.otherside.OthersideDimension;
import com.mojang.logging.LogUtils;
import net.minecraft.client.renderer.DimensionSpecialEffects;
import net.minecraft.core.HolderLookup;
import net.minecraft.data.DataGenerator;
import net.minecraft.data.PackOutput;
Expand All @@ -32,7 +31,6 @@
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.neoforge.client.event.RegisterDimensionSpecialEffectsEvent;
import net.neoforged.neoforge.common.data.AdvancementProvider;
import net.neoforged.neoforge.common.data.ExistingFileHelper;
import net.neoforged.neoforge.data.event.GatherDataEvent;
Expand Down Expand Up @@ -74,7 +72,6 @@ public DeeperDarker(IEventBus eventBus, ModContainer container) {
eventBus.addListener(this::registerPayloads);
eventBus.addListener(this::registerAttributes);
eventBus.addListener(this::registerSpawnPlacements);
eventBus.addListener(this::registerDimensionEffects);

container.registerConfig(ModConfig.Type.COMMON, DeeperDarkerConfig.SPEC);
}
Expand Down Expand Up @@ -137,10 +134,6 @@ private void registerSpawnPlacements(final RegisterSpawnPlacementsEvent event) {
event.register(DDEntities.SLUDGE.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Mob::checkMobSpawnRules, RegisterSpawnPlacementsEvent.Operation.REPLACE);
}

private void registerDimensionEffects(final RegisterDimensionSpecialEffectsEvent event) {
event.register(OthersideDimension.OTHERSIDE_EFFECTS, new DimensionSpecialEffects.NetherEffects());
}

public static ResourceLocation rl(String path) {
return ResourceLocation.fromNamespaceAndPath(MOD_ID, path);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
import com.kyanite.deeperdarker.network.UseTransmitterPacket;
import com.kyanite.deeperdarker.util.DDArmorMaterials;
import com.kyanite.deeperdarker.util.DDTags;
import com.kyanite.deeperdarker.world.otherside.OthersideDimension;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import net.minecraft.client.model.BoatModel;
import net.minecraft.client.model.ChestBoatModel;
import net.minecraft.client.renderer.DimensionSpecialEffects;
import net.minecraft.client.renderer.Sheets;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderers;
import net.minecraft.client.renderer.blockentity.HangingSignRenderer;
Expand Down Expand Up @@ -66,6 +68,7 @@
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
import net.neoforged.neoforge.client.event.EntityRenderersEvent;
import net.neoforged.neoforge.client.event.InputEvent;
import net.neoforged.neoforge.client.event.RegisterDimensionSpecialEffectsEvent;
import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent;
import net.neoforged.neoforge.event.AnvilUpdateEvent;
import net.neoforged.neoforge.event.brewing.RegisterBrewingRecipesEvent;
Expand Down Expand Up @@ -288,6 +291,11 @@ public static void clientSetup(final FMLClientSetupEvent event) {
EntityRenderers.register(DDEntities.STALKER.get(), StalkerRenderer::new);
}

@SubscribeEvent
public static void registerDimensionEffects(final RegisterDimensionSpecialEffectsEvent event) {
event.register(OthersideDimension.OTHERSIDE_EFFECTS, new DimensionSpecialEffects.NetherEffects());
}

@SubscribeEvent
public static void registerKeybinds(final RegisterKeyMappingsEvent event) {
event.register(Keybinds.BOOST);
Expand Down

0 comments on commit 796d7dd

Please sign in to comment.