1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-04 23:40:00 +00:00

Merge branch 'mc-1.16.x' into mc-1.17.x

This commit is contained in:
Jonathan Coates 2022-03-23 08:39:39 +00:00
commit 70c5cbafec
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
4 changed files with 11 additions and 8 deletions

View File

@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx3G org.gradle.jvmargs=-Xmx3G
# Mod properties # Mod properties
mod_version=1.100.3 mod_version=1.100.4
# Minecraft properties (update mods.toml when changing) # Minecraft properties (update mods.toml when changing)
mc_version=1.17.1 mc_version=1.17.1

View File

@ -15,7 +15,6 @@ import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.chunk.ChunkStatus;
import net.minecraft.world.level.chunk.LevelChunk; import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.world.ChunkWatchEvent; import net.minecraftforge.event.world.ChunkWatchEvent;
@ -47,8 +46,10 @@ public final class MonitorWatcher
@SubscribeEvent @SubscribeEvent
public static void onWatch( ChunkWatchEvent.Watch event ) public static void onWatch( ChunkWatchEvent.Watch event )
{ {
// Get the current chunk if it has been loaded. This is safe as, if the chunk hasn't been loaded yet, then the
// monitor will have no contents, and so we won't need to send an update anyway.
ChunkPos chunkPos = event.getPos(); ChunkPos chunkPos = event.getPos();
LevelChunk chunk = (LevelChunk) event.getWorld().getChunk( chunkPos.x, chunkPos.z, ChunkStatus.FULL, false ); LevelChunk chunk = event.getWorld().getChunkSource().getChunkNow( chunkPos.x, chunkPos.z );
if( chunk == null ) return; if( chunk == null ) return;
for( BlockEntity te : chunk.getBlockEntities().values() ) for( BlockEntity te : chunk.getBlockEntities().values() )

View File

@ -1,3 +1,8 @@
# New features in CC: Tweaked 1.100.4
Several bug fixes:
* Fix the monitor watching blocking the main thread when chunks are slow to load.
# New features in CC: Tweaked 1.100.3 # New features in CC: Tweaked 1.100.3
Several bug fixes: Several bug fixes:

View File

@ -1,9 +1,6 @@
New features in CC: Tweaked 1.100.3 New features in CC: Tweaked 1.100.4
Several bug fixes: Several bug fixes:
* Fix client disconnect when uploading large files. * Fix the monitor watching blocking the main thread when chunks are slow to load.
* Correctly handling empty computer ID file.
* Fix the normal turtle recipe not being unlocked.
* Remove turtle fake EntityType.
Type "help changelog" to see the full version history. Type "help changelog" to see the full version history.