13
0
geforkt von Mirrors/Paper
Paper/CraftBukkit-Patches/0171-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch
Zach Brown 8e365012c0 Update from upstream SpigotMC
Upstream Merge (Bukkit + CraftBukkit) SpigotMC/Spigot@da20125dab
Plug WorldMap Memory Leak SpigotMC/Spigot@da20125dab
2014-08-08 17:15:42 -05:00

23 Zeilen
1.1 KiB
Diff

From 98658d64599b2521538967a27f90d50f8347d92c Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Thu, 7 Aug 2014 15:48:33 +0100
Subject: [PATCH] Fix LEFT_CLICK_AIR detection when not in creative
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 97037ff..0e2bc03 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1044,7 +1044,7 @@ public class PlayerConnection implements PacketPlayInListener {
float f6 = MathHelper.sin(-f1 * 0.017453292F);
float f7 = f4 * f5;
float f8 = f3 * f5;
- double d3 = 5.0D;
+ double d3 = player.playerInteractManager.getGameMode() == EnumGamemode.CREATIVE ? 5.0D : 4.5D; // Spigot
Vec3D vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
MovingObjectPosition movingobjectposition = this.player.world.rayTrace(vec3d, vec3d1, false);
--
1.9.1