diff --git a/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/DistanceManagerMixin.java b/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/DistanceManagerMixin.java index b7a115d5..af78d2a5 100644 --- a/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/DistanceManagerMixin.java +++ b/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/DistanceManagerMixin.java @@ -86,8 +86,7 @@ public abstract class DistanceManagerMixin implements ChunkSystemDistanceManager value = "RETURN" ) ) - private void destroyFields(final Executor executor, final Executor executor2, - final CallbackInfo ci) { + private void destroyFields(final CallbackInfo ci) { this.tickets = null; this.ticketTracker = null; this.tickingTicketsTracker = null; diff --git a/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/ServerChunkCacheMixin.java b/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/ServerChunkCacheMixin.java index 54472225..c17034c1 100644 --- a/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/ServerChunkCacheMixin.java +++ b/src/main/java/ca/spottedleaf/moonrise/mixin/chunk_system/ServerChunkCacheMixin.java @@ -16,6 +16,7 @@ import net.minecraft.server.level.FullChunkStatus; import net.minecraft.server.level.ServerChunkCache; import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.chunk.ChunkAccess; import net.minecraft.world.level.chunk.ChunkSource; import net.minecraft.world.level.chunk.LevelChunk; @@ -298,4 +299,36 @@ private void midTickChunks(final CallbackInfo ci) { ((ChunkSystemMinecraftServer)this.level.getServer()).moonrise$executeMidTickTasks(); } + + /** + * @reason In the chunk system, ticking chunks always have loaded entities. Of course, they are also always + * marked to be as ticking as well. + * @author Spottedleaf + */ + @Redirect( + method = "tickChunks", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/server/level/ServerLevel;isNaturalSpawningAllowed(Lnet/minecraft/world/level/ChunkPos;)Z" + ) + ) + private boolean shortNaturalSpawning(final ServerLevel instance, final ChunkPos chunkPos) { + return true; + } + + /** + * @reason In the chunk system, ticking chunks always have loaded entities. Of course, they are also always + * marked to be as ticking as well. + * @author Spottedleaf + */ + @Redirect( + method = "tickChunks", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/server/level/ServerLevel;shouldTickBlocksAt(J)Z" + ) + ) + private boolean shortShouldTickBlocks(final ServerLevel instance, final long pos) { + return true; + } }