mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-02-03 14:01:45 +01:00
f541b93c6a
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: 76777f0 Updated Upstream (Paper) 6465aba Merge branch 'master' of https://github.com/Spottedleaf/Tuinity into ver/1.16.3 ba4dbb6 Do not allow ticket level changes while unloading playerchunks e0e7144 Aggressive state checking in region manager Purpur Changes: 0743d38 PaperPR - Add hex color code support for console logging 081f5a7 Oopsie, lets fix these snowballs :3 4895a88 Improve output of plugins command 3424c40 Minor changes to projectile despawn rate patch 9d49a31 Updated Upstream (Paper) 09e0103 add snowball to despawn rate config Rainforest Changes: 5a187d6 Update to 1.16.3.
42 lines
2.8 KiB
Diff
42 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ivan Pekov <ivan@mrivanplays.com>
|
|
Date: Wed, 26 Aug 2020 21:01:33 +0300
|
|
Subject: [PATCH] Load also the chunk that you're teleporting to
|
|
|
|
Fixes Tuinity-178
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
index 87fbc28847a3a6232861d36f3fa2f038c4664239..a21322ffd0bbb0c24b45cac9e2992c44d9c2977a 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -225,7 +225,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
return true;
|
|
}
|
|
|
|
- public final void loadChunksForMoveAsync(AxisAlignedBB axisalignedbb, double toX, double toZ,
|
|
+ public final void loadChunksForMoveAsync(AxisAlignedBB axisalignedbb, int toX, int toZ, // Yatopia
|
|
java.util.function.Consumer<List<IChunkAccess>> onLoad) {
|
|
if (Thread.currentThread() != this.serverThread) {
|
|
this.getChunkProvider().serverThreadQueue.execute(() -> {
|
|
@@ -282,6 +282,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
chunkProvider.getChunkAtAsynchronously(cx, cz, ChunkStatus.FULL, true, false, consumer);
|
|
}
|
|
}
|
|
+ chunkProvider.getChunkAtAsynchronously(toX >> 4, toZ >> 4, ChunkStatus.FULL, true, false, consumer); // Yatopia
|
|
}
|
|
// Tuinity end
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
index 407c03408a312d54ab16a80ccdee5308af43c62f..f938732a64e8672873b8387d20776a5a73f4c01b 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -545,7 +545,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
net.minecraft.server.WorldServer world = ((CraftWorld)locationClone.getWorld()).getHandle();
|
|
java.util.concurrent.CompletableFuture<Boolean> ret = new java.util.concurrent.CompletableFuture<>();
|
|
|
|
- world.loadChunksForMoveAsync(getHandle().getBoundingBoxAt(locationClone.getX(), locationClone.getY(), locationClone.getZ()), location.getX(), location.getZ(), (list) -> {
|
|
+ world.loadChunksForMoveAsync(getHandle().getBoundingBoxAt(locationClone.getX(), locationClone.getY(), locationClone.getZ()), location.getBlockX(), location.getBlockZ(), (list) -> { // Yatopia
|
|
net.minecraft.server.ChunkProviderServer chunkProviderServer = world.getChunkProvider();
|
|
for (net.minecraft.server.IChunkAccess chunk : list) {
|
|
chunkProviderServer.addTicketAtLevel(net.minecraft.server.TicketType.POST_TELEPORT, chunk.getPos(), 33, CraftEntity.this.getEntityId());
|