Paper/CraftBukkit-Patches/0168-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch
Zach Brown cab333b217 Rebase (Update) from upstream SpigotMC
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e
Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c
Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66
Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b
Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
2014-11-28 14:19:07 -06:00

23 lines
1.1 KiB
Diff

From 638e264f4eae6db586e9a0bf232d0c2bb60905e9 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 2b764b5..188393c 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