diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5c2cab7..c80fb33 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'zulu' diff --git a/gradle.properties b/gradle.properties index cf53283..9a7cbd4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ org.gradle.daemon=false group=net.permutated mod_id=pylons -version=2.0.0 +version=2.0.1 diff --git a/src/main/java/net/permutated/pylons/tile/ExpulsionPylonTile.java b/src/main/java/net/permutated/pylons/tile/ExpulsionPylonTile.java index 33a74db..58215c2 100644 --- a/src/main/java/net/permutated/pylons/tile/ExpulsionPylonTile.java +++ b/src/main/java/net/permutated/pylons/tile/ExpulsionPylonTile.java @@ -134,11 +134,6 @@ private void doRespawn(MinecraftServer server, ServerPlayer player) { ServerPlayer dummyPlayer = new ServerPlayer(server, actualLevel, player.getGameProfile()); if (optional.isPresent()) { - // player has a spawn position, is this in the same chunk? - if (sameChunk(actualLevel, dummyPlayer.blockPosition())) { - return; - } - BlockState blockstate = actualLevel.getBlockState(respawnPosition); boolean isAnchor = blockstate.is(Blocks.RESPAWN_ANCHOR); Vec3 spawnPos = optional.get(); @@ -151,6 +146,11 @@ private void doRespawn(MinecraftServer server, ServerPlayer player) { } dummyPlayer.moveTo(spawnPos.x, spawnPos.y, spawnPos.z, actualAngle, 0.0F); + + // player has a spawn position, is this in the same chunk? + if (sameChunk(actualLevel, dummyPlayer.blockPosition())) { + return; + } } else { int spawnRadius = server.getSpawnRadius(actualLevel);