diff --git a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 index 40e742fb5..00a389f80 100644 --- a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 +++ b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 @@ -1,8 +1,8 @@ -// 1.21 2024-08-16T00:14:23.9239195 Registries +// 1.21 2024-11-06T14:48:57.830265 Registries 65c8c67a4ec7ef0ce6846fb2f4d921cc6ceb02e2 data/deeperdarker/damage_type/bite.json 0b65c61bd1e5086d0f3685566cc6cecf6e324516 data/deeperdarker/damage_type/ring.json dede162345c14db637f3dd9a20ca9319e037ae9d data/deeperdarker/dimension/otherside.json -67f8cd0621b1c3614da8c1910f6b7bcb61660293 data/deeperdarker/dimension_type/otherside.json +0f715fda6f60117cf74eadf94c1590aea34761a3 data/deeperdarker/dimension_type/otherside.json ad453d5b708fe189495a8e5d4ce2531d9898a555 data/deeperdarker/enchantment/catalysis.json d5b5b78cce29a3e1eec213a0d1540c21d58a3d34 data/deeperdarker/enchantment/sculk_smite.json 729673e1d51f7ee33e7f94cff8b59ee030844d8b data/deeperdarker/painting_variant/abstraction.json diff --git a/src/generated/resources/data/deeperdarker/dimension_type/otherside.json b/src/generated/resources/data/deeperdarker/dimension_type/otherside.json index 80e44eda9..2ca3fa2f5 100644 --- a/src/generated/resources/data/deeperdarker/dimension_type/otherside.json +++ b/src/generated/resources/data/deeperdarker/dimension_type/otherside.json @@ -2,7 +2,7 @@ "ambient_light": 0.05, "bed_works": true, "coordinate_scale": 1.0, - "effects": "minecraft:the_nether", + "effects": "deeperdarker:otherside_effects", "fixed_time": 18000, "has_ceiling": true, "has_raids": false, diff --git a/src/main/java/com/kyanite/deeperdarker/DeeperDarker.java b/src/main/java/com/kyanite/deeperdarker/DeeperDarker.java index d267ac171..758ae2bc3 100644 --- a/src/main/java/com/kyanite/deeperdarker/DeeperDarker.java +++ b/src/main/java/com/kyanite/deeperdarker/DeeperDarker.java @@ -17,6 +17,7 @@ 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; @@ -31,6 +32,7 @@ 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; @@ -72,6 +74,7 @@ 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); } @@ -134,6 +137,10 @@ 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); } diff --git a/src/main/java/com/kyanite/deeperdarker/world/otherside/OthersideDimension.java b/src/main/java/com/kyanite/deeperdarker/world/otherside/OthersideDimension.java index a1434848a..b1f21c74e 100644 --- a/src/main/java/com/kyanite/deeperdarker/world/otherside/OthersideDimension.java +++ b/src/main/java/com/kyanite/deeperdarker/world/otherside/OthersideDimension.java @@ -7,10 +7,10 @@ import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; import net.minecraft.util.valueproviders.ConstantInt; import net.minecraft.world.entity.ai.village.poi.PoiType; import net.minecraft.world.level.Level; -import net.minecraft.world.level.dimension.BuiltinDimensionTypes; import net.minecraft.world.level.dimension.DimensionType; import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredRegister; @@ -20,9 +20,10 @@ public class OthersideDimension { public static final ResourceKey OTHERSIDE_LEVEL = ResourceKey.create(Registries.DIMENSION, DeeperDarker.rl("otherside")); public static final ResourceKey OTHERSIDE = ResourceKey.create(Registries.DIMENSION_TYPE, DeeperDarker.rl("otherside")); + public static final ResourceLocation OTHERSIDE_EFFECTS = DeeperDarker.rl("otherside_effects"); public static void bootstrap(BootstrapContext context) { - context.register(OTHERSIDE, new DimensionType(OptionalLong.of(18000L), false, true, false, true, 1, true, false, 0, 128, 128, DDTags.Blocks.INFINIBURN_OTHERSIDE, BuiltinDimensionTypes.NETHER_EFFECTS, 0.05f, new DimensionType.MonsterSettings(true, false, ConstantInt.of(7), 15))); + context.register(OTHERSIDE, new DimensionType(OptionalLong.of(18000L), false, true, false, true, 1, true, false, 0, 128, 128, DDTags.Blocks.INFINIBURN_OTHERSIDE, OTHERSIDE_EFFECTS, 0.05f, new DimensionType.MonsterSettings(true, false, ConstantInt.of(7), 15))); } public static final DeferredRegister POI = DeferredRegister.create(Registries.POINT_OF_INTEREST_TYPE, DeeperDarker.MOD_ID);