Skip to content

Commit 50cabbe

Browse files
Update for Cobweb 1.3.0 and SSP 2.0.0.
1 parent faaaf93 commit 50cabbe

File tree

6 files changed

+12
-3
lines changed

6 files changed

+12
-3
lines changed

common/src/main/java/it/crystalnest/nightworld/Constants.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package it.crystalnest.nightworld;
22

3+
import net.minecraft.core.registries.Registries;
4+
import net.minecraft.resources.ResourceKey;
5+
import net.minecraft.resources.ResourceLocation;
6+
import net.minecraft.world.level.Level;
37
import org.jetbrains.annotations.ApiStatus;
48
import org.slf4j.Logger;
59
import org.slf4j.LoggerFactory;
@@ -14,6 +18,11 @@ public final class Constants {
1418
*/
1519
public static final String MOD_ID = "nightworld";
1620

21+
/**
22+
* Nightworld dimension {@link ResourceKey}.
23+
*/
24+
public static final ResourceKey<Level> NIGHTWORLD = ResourceKey.create(Registries.DIMENSION, ResourceLocation.fromNamespaceAndPath(MOD_ID, "nightworld"));
25+
1726
/**
1827
* Mod logger.
1928
*/

common/src/main/java/it/crystalnest/nightworld/mixin/NetherPortalBlockMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private NetherPortalBlockMixin() {
4242
@SuppressWarnings({"JavadocReference", "StatementWithEmptyBody"})
4343
@Inject(method = "randomTick", at = @At(value = "HEAD"), cancellable = true)
4444
private void onRandomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random, CallbackInfo ci) {
45-
if (level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && random.nextInt(500) < level.getDifficulty().getId() && CustomPortalChecker.isPortalForDimension(level, pos.above(), Constants.MOD_ID)) {
45+
if (level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && random.nextInt(500) < level.getDifficulty().getId() && CustomPortalChecker.isPortalForDimension(level, pos.above(), Constants.NIGHTWORLD)) {
4646
BlockPos bottom;
4747
for (bottom = pos; level.getBlockState(bottom).is(this); bottom = bottom.below());
4848
if (random.nextInt(0, 10) < 5) {

common/src/main/resources/data/server_sided_portals/dimension/nightworld.json renamed to common/src/main/resources/data/nightworld/dimension/nightworld.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"type": "server_sided_portals:nightworld",
2+
"type": "nightworld:nightworld",
33
"generator": {
44
"type": "minecraft:noise",
55
"settings": "minecraft:overworld",

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ neoforge_loader_version_range = [21.4,)
3030

3131
# Dependencies
3232
cobweb_version = 1.3.0
33-
server_sided_portals_version = 1.1.1
33+
server_sided_portals_version = 2.0.0
3434

3535
# Gradle
3636
org.gradle.jvmargs = -Xmx4G

0 commit comments

Comments
 (0)