mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-31 04:46:38 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b0da38c2 Repository details in RuntimeException for MavenLibraryResolver#addRepository (#12939) PaperMC/Paper@1922be90 Update custom tags (#12183) PaperMC/Paper@79cf1353 Ignore HopperInventorySearchEvent when it has no listeners (#13009) PaperMC/Paper@ea014f7a feat: add stuckEntityPoiRetryDelay config (#12949) PaperMC/Paper@a9e76749 Support for showNotification in PlayerRecipeDiscoverEvent (#12992) PaperMC/Paper@5622c9dd Expose attribute sentiment (#12974) PaperMC/Paper@42b653b1 Expose more argument types (#12665) PaperMC/Paper@52d9a221 [ci/skip] Fix typo in Display javadoc (#13010) PaperMC/Paper@614e9acf Improve APIs around riptide tridents (#12996) PaperMC/Paper@51706e5a Fixed DyeItem sheep dye hunk
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 a0941c15a9391f85af9fcb3784c66514b314f4dc..f20cb459f83f870e1c04ed1d83eee885619dfe57 100644
|
|
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -2122,8 +2122,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();
|