From 2c1ef901ba00c47cf5e9cbb5a96d1bc5b61e6e6c Mon Sep 17 00:00:00 2001 From: Thiakil Date: Tue, 3 Sep 2024 09:46:23 +0800 Subject: [PATCH] use chunkpos unpacking helper methods for consistency --- .../common/tile/component/TileComponentChunkLoader.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/mekanism/common/tile/component/TileComponentChunkLoader.java b/src/main/java/mekanism/common/tile/component/TileComponentChunkLoader.java index bca9e90e96e..54192192766 100644 --- a/src/main/java/mekanism/common/tile/component/TileComponentChunkLoader.java +++ b/src/main/java/mekanism/common/tile/component/TileComponentChunkLoader.java @@ -66,7 +66,7 @@ private void releaseChunkTickets(@NotNull ServerLevel world, @NotNull BlockPos p LOGGER.debug("Attempting to remove {} chunk tickets. Pos: {} World: {}", tickets, pos, world.dimension().location()); if (tickets > 0) { for (long chunkPos : chunkSet) { - TICKET_CONTROLLER.forceChunk(world, pos, (int) chunkPos, (int) (chunkPos >> 32), false, forceTicks); + TICKET_CONTROLLER.forceChunk(world, pos, ChunkPos.getX(chunkPos), ChunkPos.getZ(chunkPos), false, forceTicks); } chunkSet.clear(); markDirty(); @@ -146,7 +146,7 @@ private void refreshChunkTickets(@NotNull ServerLevel world, @NotNull BlockPos p if (!newChunks.contains(chunkPos)) { //If the chunk is no longer in our chunks we want loaded // then we need to unforce the chunk and remove it - TICKET_CONTROLLER.forceChunk(world, pos, (int) chunkPos, (int) (chunkPos >> 32), false, forceTicks); + TICKET_CONTROLLER.forceChunk(world, pos, ChunkPos.getX(chunkPos), ChunkPos.getZ(chunkPos), false, forceTicks); chunkIt.remove(); removed++; } @@ -156,7 +156,7 @@ private void refreshChunkTickets(@NotNull ServerLevel world, @NotNull BlockPos p if (chunkSet.add(chunkPos)) { //If we didn't already have it in our chunk set and added actually added it as it is new // then we also need to force the chunk - TICKET_CONTROLLER.forceChunk(world, pos, (int) chunkPos, (int) (chunkPos >> 32), true, forceTicks); + TICKET_CONTROLLER.forceChunk(world, pos, ChunkPos.getX(chunkPos), ChunkPos.getZ(chunkPos), true, forceTicks); added++; } } @@ -323,7 +323,7 @@ private void validateTickets(ServerLevel world, ResourceLocation worldName, Bloc if (chunkLoader.chunkSet.add(chunkPos) || ticking != chunkLoader.forceTicks) { //If we didn't already have it in our chunk set and added, or we had removed it due to it fully ticking changing, // then we also need to force the chunk - TICKET_CONTROLLER.forceChunk(world, pos, (int) chunkPos, (int) (chunkPos >> 32), true, chunkLoader.forceTicks); + TICKET_CONTROLLER.forceChunk(world, pos, ChunkPos.getX(chunkPos), ChunkPos.getZ(chunkPos), true, chunkLoader.forceTicks); added++; } }