mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 10:59:16 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@8e69d981 Player - Expose player score (#12243) PaperMC/Paper@2526fe06 Add type to represent unimplemented data component types (#12222) PaperMC/Paper@20df25d3 Don't resync all attributes when updating scaled health (#12232) PaperMC/Paper@43f37b1b Remove ItemFactory#enchantWithLevels range check for vanilla parity (#12209) PaperMC/Paper@a2b0ff06 Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215) PaperMC/Paper@df96f8a0 Correctly handle events for end portal (#12246) PaperMC/Paper@25654978 Cancel PlayerLaunchProjectileEvent properly for enderpearls (#12223) PaperMC/Paper@34c794dc ServerTickManager#requestGameToSprint - Silence command like feedback (#12220) PaperMC/Paper@3d13b115 fix: switch back to using a snapshot for velocity-natives PaperMC/Paper@7afae7f4 Add client tick end event (#12199) PaperMC/Paper@e5d988df Revert "Fix cancelling PlayerInteractEvent at (0, 0, 0) (#12215)" PaperMC/Paper@743346a5 Force update attributes PaperMC/Paper@1a7288aa Adjust unloaded chunk check for block digging Gale Changes: Dreeam-qwq/Gale@7fa44170 Updated Upstream (Paper) Dreeam-qwq/Gale@071288bc Updated Upstream (Paper) Dreeam-qwq/Gale@52645592 Updated Upstream (Paper)
29 lines
1.9 KiB
Diff
29 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Fri, 18 Nov 2022 23:26:16 -0500
|
|
Subject: [PATCH] Remove UseItemOnPacket Too Far check
|
|
|
|
This Check is added in 1.17.x -> 1.18.x that updated by Mojang.
|
|
By removing this check, it gives ability for hackers to use some modules of hack clients.
|
|
|
|
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
index a96f4f45d465b6f0e5b061877bd11f3caeeb1625..61bf3bfb41392d38c7e796f56cc0cce870e12631 100644
|
|
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -2013,8 +2013,13 @@ public class ServerGamePacketListenerImpl
|
|
BlockPos blockPos = hitResult.getBlockPos();
|
|
if (this.player.canInteractWithBlock(blockPos, 1.0)) {
|
|
Vec3 vec3 = location.subtract(Vec3.atCenterOf(blockPos));
|
|
- double d = 1.0000001;
|
|
- if (Math.abs(vec3.x()) < 1.0000001 && Math.abs(vec3.y()) < 1.0000001 && Math.abs(vec3.z()) < 1.0000001) {
|
|
+ // Leaf start - Remove UseItemOnPacket Too Far check
|
|
+ //double d = 1.0000001;
|
|
+ final double maxDistance = org.dreeam.leaf.config.modules.gameplay.ConfigurableMaxUseItemDistance.maxUseItemDistance;
|
|
+ if (maxDistance <= 0
|
|
+ || (Math.abs(vec3.x()) < maxDistance && Math.abs(vec3.y()) < maxDistance && Math.abs(vec3.z()) < maxDistance)
|
|
+ ) {
|
|
+ // Leaf end - Remove UseItemOnPacket Too Far check
|
|
Direction direction = hitResult.getDirection();
|
|
this.player.resetLastActionTime();
|
|
int maxY = this.player.level().getMaxY();
|