Update from upstream SpigotMC

6669d6ecd2b
b2740df50bb
bf71dc61149
fba27a2ea80
92ee7e7f8ec
b28f0d3de23
4beb4ac3918
0ddb6f3dde8
afe301fe892
b8f6402bbbe
This commit is contained in:
Zach Brown 2014-12-07 13:26:30 -06:00
parent 7ae5abba9e
commit 657e0890dc
17 changed files with 16 additions and 32 deletions

View file

@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ </repository>
+ </repositories>
+
<build>
<plugins>
<plugin>
<distributionManagement>
<repository>
<id>spigotmc-releases</id>
--

View file

@ -156,7 +156,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void inactiveTick()
+ {
+ super.inactiveTick();
+ ++this.aT; // Above all the floats
+ ++this.aO; // Above all the floats
+ }
+ // Spigot end
@ -433,7 +433,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if ( entity instanceof EntityAnimal )
+ {
+ EntityAnimal animal = (EntityAnimal) entity;
+ if ( animal.isBaby() || animal.ce() /*love*/ )
+ if ( animal.isBaby() || animal.cp() /*love*/ )
+ {
+ return true;
+ }

View file

@ -35,10 +35,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// CraftBukkit start
int itemstackAmount = itemstack.count;
-
+ // Spigot start - skip the event if throttled
+ if (!throttled) {
org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemstack);
if (event.useItemInHand() != Event.Result.DENY) {
+ if (!throttled) {
// Raytrace to look for 'rogue armswings'
float f1 = this.player.pitch;
float f2 = this.player.yaw;
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
if (event == null || event.useItemInHand() != Event.Result.DENY) {
this.player.playerInteractManager.useItem(this.player, this.player.world, itemstack);
}
+ }

View file

@ -48,11 +48,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ NBTTagCompound nbttagcompound = oldList.get( i );
+ if ( nbttagcompound == null ) continue;
+
+ if ( !( nbttagcompound.get( ATTRIBUTES_UUID_HIGH.NBT ) instanceof NBTTagLong ) )
+ if ( !nbttagcompound.hasKeyOfType(ATTRIBUTES_UUID_HIGH.NBT, 99) )
+ {
+ continue;
+ }
+ if ( !( nbttagcompound.get( ATTRIBUTES_UUID_LOW.NBT ) instanceof NBTTagLong ) )
+ if ( !nbttagcompound.hasKeyOfType(ATTRIBUTES_UUID_LOW.NBT, 99) )
+ {
+ continue;
+ }
@ -64,11 +64,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ {
+ continue;
+ }
+ if ( !( nbttagcompound.get( ATTRIBUTES_VALUE.NBT ) instanceof NBTTagDouble ) )
+ if ( !nbttagcompound.hasKeyOfType(ATTRIBUTES_VALUE.NBT, 99) )
+ {
+ continue;
+ }
+ if ( !( nbttagcompound.get( ATTRIBUTES_TYPE.NBT ) instanceof NBTTagInt ) || nbttagcompound.getInt( ATTRIBUTES_TYPE.NBT ) < 0 || nbttagcompound.getInt( ATTRIBUTES_TYPE.NBT ) > 2 )
+ if ( !nbttagcompound.hasKeyOfType(ATTRIBUTES_TYPE.NBT, 99) || nbttagcompound.getInt( ATTRIBUTES_TYPE.NBT ) < 0 || nbttagcompound.getInt( ATTRIBUTES_TYPE.NBT ) > 2 )
+ {
+ continue;
+ }

View file

@ -1,20 +0,0 @@
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
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);
--