mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-31 04:46:38 +00:00
Clean up config
This commit is contained in:
@@ -7,28 +7,20 @@ This Check is added in 1.17.x -> 1.18.x update by Mojang.
|
||||
By removing this check, it enable hackers to use some modules of hack clients.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a912462dcd381956c31f19ccd4de826594af65b9..c1431af927a203c16b04a82e0f779fe40dcf0f88 100644
|
||||
index 468866fddd92eef313df413a1d0b94cfccf03469..c3529ae180349b7131e87bd41fbe06ea6aecf062 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -189,6 +189,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
||||
+import org.dreeam.leaf.LeafConfig;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -2046,7 +2047,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2046,7 +2046,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
Vec3 vec3d2 = vec3d.subtract(vec3d1);
|
||||
double d0 = 1.0000001D;
|
||||
|
||||
- if (Math.abs(vec3d2.x()) < 1.0000001D && Math.abs(vec3d2.y()) < 1.0000001D && Math.abs(vec3d2.z()) < 1.0000001D) {
|
||||
+ if ((Math.abs(vec3d2.x()) < LeafConfig.maxUseItemDistance && Math.abs(vec3d2.y()) < LeafConfig.maxUseItemDistance && Math.abs(vec3d2.z()) < LeafConfig.maxUseItemDistance) || LeafConfig.removeUseItemOnPacketTooFar) { // Leaf - Remove UseItemOnPacket Too Far Check and make it configurable
|
||||
+ if ((Math.abs(vec3d2.x()) < org.dreeam.leaf.LeafConfig.maxUseItemDistance && Math.abs(vec3d2.y()) < org.dreeam.leaf.LeafConfig.maxUseItemDistance && Math.abs(vec3d2.z()) < org.dreeam.leaf.LeafConfig.maxUseItemDistance) || org.dreeam.leaf.LeafConfig.removeUseItemOnPacketTooFar) { // Leaf - Remove UseItemOnPacket Too Far Check and make it configurable
|
||||
Direction enumdirection = movingobjectpositionblock.getDirection();
|
||||
|
||||
this.player.resetLastActionTime();
|
||||
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
||||
index 5087732f4e78fb5a567674914174142777d762ef..065c79a73aa4f1775f5f4efcc90dae46d0ddbf4a 100644
|
||||
index 267f88d799fe98d1741a837c33d8c748362077ee..83fee46886a21349d652b6bc871bd03ffbac2a7d 100644
|
||||
--- a/src/main/java/org/dreeam/leaf/LeafConfig.java
|
||||
+++ b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
||||
@@ -171,6 +171,8 @@ public class LeafConfig {
|
||||
@@ -49,4 +41,4 @@ index 5087732f4e78fb5a567674914174142777d762ef..065c79a73aa4f1775f5f4efcc90dae46
|
||||
+ maxUseItemDistance = getDouble("max-UseItem-distance", maxUseItemDistance, "The max distance of UseItem for players");
|
||||
}
|
||||
|
||||
public static String sentryDsn = "";
|
||||
public static boolean enableAsyncMobSpawning = true;
|
||||
|
||||
Reference in New Issue
Block a user