From e728d1a572c5c16b505a4ae802e203a0d43efcd7 Mon Sep 17 00:00:00 2001 From: Crystal Spider Date: Sun, 15 Sep 2024 11:02:30 +0200 Subject: [PATCH] Update SSP dependency to 1.1.0 --- .../main/java/it/crystalnest/nightworld/Constants.java | 9 --------- .../nightworld/mixin/NetherPortalBlockMixin.java | 2 +- gradle.properties | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/common/src/main/java/it/crystalnest/nightworld/Constants.java b/common/src/main/java/it/crystalnest/nightworld/Constants.java index 1ef025d..72d55c3 100644 --- a/common/src/main/java/it/crystalnest/nightworld/Constants.java +++ b/common/src/main/java/it/crystalnest/nightworld/Constants.java @@ -1,9 +1,5 @@ package it.crystalnest.nightworld; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.level.Level; import org.jetbrains.annotations.ApiStatus; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -18,11 +14,6 @@ public final class Constants { */ public static final String MOD_ID = "nightworld"; - /** - * {@link ResourceKey} for the dimension. - */ - public static final ResourceKey NIGHTWORLD = ResourceKey.create(Registries.DIMENSION, new ResourceLocation("server_sided_portals", "nightworld")); - /** * Mod logger. */ diff --git a/common/src/main/java/it/crystalnest/nightworld/mixin/NetherPortalBlockMixin.java b/common/src/main/java/it/crystalnest/nightworld/mixin/NetherPortalBlockMixin.java index 5e8b880..96b4c5d 100644 --- a/common/src/main/java/it/crystalnest/nightworld/mixin/NetherPortalBlockMixin.java +++ b/common/src/main/java/it/crystalnest/nightworld/mixin/NetherPortalBlockMixin.java @@ -35,7 +35,7 @@ public abstract class NetherPortalBlockMixin { */ @Inject(method = "randomTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;isValidSpawn(Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/entity/EntityType;)Z", shift = Shift.BEFORE)) private void onRandomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random, CallbackInfo ci) { - if (CustomPortalChecker.isPortalForDimension(level, pos.above(), Constants.NIGHTWORLD)) { + if (CustomPortalChecker.isPortalForDimension(level, pos.above(), Constants.MOD_ID)) { if (random.nextInt(0, 100) < 50) { this.handleSpawnEntity(EntityType.ZOMBIE, level, pos); } else { diff --git a/gradle.properties b/gradle.properties index 6615cfc..777b7b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,7 +25,7 @@ forge_loader_version_range = [47,) # Dependencies cobweb_version = 1.0.0 -server_sided_portals_version = 1.0.0 +server_sided_portals_version = 1.1.0 # Gradle org.gradle.jvmargs = -Xmx4G