mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-04 15:41:40 +00:00
20 lines
1.6 KiB
Diff
20 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Taiyou06 <kaandindar21@gmail.com>
|
|
Date: Thu, 8 May 2025 10:08:54 +0200
|
|
Subject: [PATCH] Reduce PlayerChunk Updates
|
|
|
|
|
|
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
index 7c12d65849a975aedfb94fc135bad7071908a02b..d6078ccf648c77717291e784200f952633fbbacf 100644
|
|
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -1734,7 +1734,7 @@ public class ServerGamePacketListenerImpl
|
|
&& !isFallFlying
|
|
&& !isAutoSpinAttack
|
|
&& this.noBlocksAround(this.player);
|
|
- this.player.level().getChunkSource().move(this.player);
|
|
+ if (!org.dreeam.leaf.config.modules.opt.ReduceChunkSourceUpdates.enabled || this.player.getLastSectionPos().asLong() != net.minecraft.core.SectionPos.asLong(this.player.blockPosition())) this.player.level().getChunkSource().move(this.player); // Leaf - Reduce PlayerChunk Updates
|
|
Vec3 vec3 = new Vec3(this.player.getX() - x, this.player.getY() - y, this.player.getZ() - z);
|
|
this.player.setOnGroundWithMovement(packet.isOnGround(), packet.horizontalCollision(), vec3);
|
|
this.player.doCheckFallDamage(vec3.x, vec3.y, vec3.z, packet.isOnGround());
|