Skip to content

Commit dd255d2

Browse files
authored
1.21.4 (#722)
* First stab at 1.21.3 * Update to 1.21.4
1 parent ed545b8 commit dd255d2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Movecraft/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ hangarPublish {
6666
platforms {
6767
register(io.papermc.hangarpublishplugin.model.Platforms.PAPER) {
6868
jar.set(tasks.shadowJar.flatMap { it.archiveFile })
69-
platformVersions.set(listOf("1.20.6", "1.21.1"))
69+
platformVersions.set(listOf("1.20.6", "1.21.4"))
7070
}
7171
}
7272
}

v1_21/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(21)
77

88
dependencies {
99
api(project(":movecraft-api"))
10-
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
10+
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
1111
}
1212

1313
description = "Movecraft-v1_21"

v1_21/src/main/java/net/countercraft/movecraft/compat/v1_21/IWorldHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.countercraft.movecraft.compat.v1_21;
22

3+
import ca.spottedleaf.moonrise.common.util.WorldUtil;
34
import net.countercraft.movecraft.MovecraftLocation;
45
import net.countercraft.movecraft.MovecraftRotation;
56
import net.countercraft.movecraft.WorldHandler;
@@ -51,7 +52,7 @@ public class IWorldHandler extends WorldHandler {
5152

5253
public IWorldHandler() {
5354
String version = Bukkit.getServer().getMinecraftVersion();
54-
if (!version.equals("1.21.1"))
55+
if (!version.equals("1.21.4"))
5556
throw new IllegalStateException("Movecraft is not compatible with this version of Minecraft: " + version);
5657
}
5758

@@ -237,7 +238,7 @@ private BlockPos locationToPosition(@NotNull MovecraftLocation loc) {
237238

238239
private void setBlockFast(@NotNull Level world, @NotNull BlockPos position, @NotNull BlockState data) {
239240
LevelChunk chunk = world.getChunkAt(position);
240-
int chunkSection = (position.getY() >> 4) - chunk.getMinSection();
241+
int chunkSection = (position.getY() >> 4) - WorldUtil.getMinSection(world);
241242
LevelChunkSection section = chunk.getSections()[chunkSection];
242243
if (section == null) {
243244
// Put a GLASS block to initialize the section. It will be replaced next with the real block.
@@ -251,7 +252,7 @@ private void setBlockFast(@NotNull Level world, @NotNull BlockPos position, @Not
251252
section.setBlockState(position.getX() & 15, position.getY() & 15, position.getZ() & 15, data);
252253
world.sendBlockUpdated(position, data, data, 3);
253254
world.getLightEngine().checkBlock(position); // boolean corresponds to if chunk section empty
254-
chunk.setUnsaved(true);
255+
chunk.markUnsaved();
255256
}
256257

257258
@Override

0 commit comments

Comments
 (0)