Merge 1.19.2 into 1.19.4
This commit is contained in:
commit
ecb3863410
|
|
@ -18,7 +18,7 @@ import java.lang.invoke.MethodHandle;
|
||||||
import java.lang.invoke.MethodHandles;
|
import java.lang.invoke.MethodHandles;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
@Mixin(ServerChunkCache.class)
|
@Mixin(value = ServerChunkCache.class, priority = 1100)
|
||||||
public abstract class ServerChunkCache_CurrentLoadingMixin {
|
public abstract class ServerChunkCache_CurrentLoadingMixin {
|
||||||
@Shadow @Nullable protected abstract ChunkHolder getVisibleChunkIfPresent(long l);
|
@Shadow @Nullable protected abstract ChunkHolder getVisibleChunkIfPresent(long l);
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@ public abstract class ServerChunkCache_CurrentLoadingMixin {
|
||||||
* Check the currentlyLoading field before going to the future chain, as was done in 1.16. In 1.18 upstream seems
|
* Check the currentlyLoading field before going to the future chain, as was done in 1.16. In 1.18 upstream seems
|
||||||
* to have only applied this to getChunkNow().
|
* to have only applied this to getChunkNow().
|
||||||
*/
|
*/
|
||||||
@Inject(method = "getChunk", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerChunkCache;getChunkFutureMainThread(IILnet/minecraft/world/level/chunk/ChunkStatus;Z)Ljava/util/concurrent/CompletableFuture;"), cancellable = true)
|
@Inject(method = "getChunk", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerChunkCache;getChunkFutureMainThread(IILnet/minecraft/world/level/chunk/ChunkStatus;Z)Ljava/util/concurrent/CompletableFuture;"), cancellable = true, require = 0)
|
||||||
private void checkCurrentlyLoading(int chunkX, int chunkZ, ChunkStatus requiredStatus, boolean load, CallbackInfoReturnable<ChunkAccess> cir) {
|
private void checkCurrentlyLoading(int chunkX, int chunkZ, ChunkStatus requiredStatus, boolean load, CallbackInfoReturnable<ChunkAccess> cir) {
|
||||||
long i = ChunkPos.asLong(chunkX, chunkZ);
|
long i = ChunkPos.asLong(chunkX, chunkZ);
|
||||||
ChunkHolder holder = this.getVisibleChunkIfPresent(i);
|
ChunkHolder holder = this.getVisibleChunkIfPresent(i);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user