From 657e0890dc5b119ad6ce75a5ef9701c4e29eca50 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Sun, 7 Dec 2014 13:26:30 -0600 Subject: [PATCH] Update from upstream SpigotMC 6669d6ecd2b b2740df50bb bf71dc61149 fba27a2ea80 92ee7e7f8ec b28f0d3de23 4beb4ac3918 0ddb6f3dde8 afe301fe892 b8f6402bbbe --- Bukkit-Patches/0001-POM-Changes.patch | 6 +++--- .../0015-Entity-Activation-Range.patch | 4 ++-- ...-block-placement-interaction-packets.patch | 10 +++++++--- ...-modifiers-which-cause-the-attribute.patch | 8 ++++---- ...K_AIR-detection-when-not-in-creative.patch | 20 ------------------- ...h => 0148-Plug-WorldMap-Memory-Leak.patch} | 0 ...=> 0149-Fix-Corrupted-Trapped-Chest.patch} | 0 ...h => 0150-Remove-uneeded-validation.patch} | 0 ...ch => 0151-Add-Hunger-Config-Values.patch} | 0 ...> 0152-Make-debug-logging-togglable.patch} | 0 ...p-invalid-enchants-in-CraftMetaItem.patch} | 0 ...0154-Limit-TNT-Detonations-per-tick.patch} | 0 ...able-and-setUnbreakable-to-ItemMeta.patch} | 0 ...h => 0156-Configurable-Hanging-Tick.patch} | 0 ...patch => 0157-Fix-Some-Memory-Leaks.patch} | 0 ...tch => 0158-Refactor-ItemDoor-Place.patch} | 0 ...InventoryCloseEvent-Unless-Required.patch} | 0 17 files changed, 16 insertions(+), 32 deletions(-) delete mode 100644 CraftBukkit-Patches/0148-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch rename CraftBukkit-Patches/{0149-Plug-WorldMap-Memory-Leak.patch => 0148-Plug-WorldMap-Memory-Leak.patch} (100%) rename CraftBukkit-Patches/{0150-Fix-Corrupted-Trapped-Chest.patch => 0149-Fix-Corrupted-Trapped-Chest.patch} (100%) rename CraftBukkit-Patches/{0151-Remove-uneeded-validation.patch => 0150-Remove-uneeded-validation.patch} (100%) rename CraftBukkit-Patches/{0152-Add-Hunger-Config-Values.patch => 0151-Add-Hunger-Config-Values.patch} (100%) rename CraftBukkit-Patches/{0153-Make-debug-logging-togglable.patch => 0152-Make-debug-logging-togglable.patch} (100%) rename CraftBukkit-Patches/{0154-Skip-invalid-enchants-in-CraftMetaItem.patch => 0153-Skip-invalid-enchants-in-CraftMetaItem.patch} (100%) rename CraftBukkit-Patches/{0155-Limit-TNT-Detonations-per-tick.patch => 0154-Limit-TNT-Detonations-per-tick.patch} (100%) rename CraftBukkit-Patches/{0156-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch => 0155-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch} (100%) rename CraftBukkit-Patches/{0157-Configurable-Hanging-Tick.patch => 0156-Configurable-Hanging-Tick.patch} (100%) rename CraftBukkit-Patches/{0158-Fix-Some-Memory-Leaks.patch => 0157-Fix-Some-Memory-Leaks.patch} (100%) rename CraftBukkit-Patches/{0159-Refactor-ItemDoor-Place.patch => 0158-Refactor-ItemDoor-Place.patch} (100%) rename CraftBukkit-Patches/{0160-Don-t-Fire-InventoryCloseEvent-Unless-Required.patch => 0159-Don-t-Fire-InventoryCloseEvent-Unless-Required.patch} (100%) diff --git a/Bukkit-Patches/0001-POM-Changes.patch b/Bukkit-Patches/0001-POM-Changes.patch index 811a986c0e..35134c5c2c 100644 --- a/Bukkit-Patches/0001-POM-Changes.patch +++ b/Bukkit-Patches/0001-POM-Changes.patch @@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + + - - - + + + spigotmc-releases -- \ No newline at end of file diff --git a/CraftBukkit-Patches/0015-Entity-Activation-Range.patch b/CraftBukkit-Patches/0015-Entity-Activation-Range.patch index 9341186062..d74eaa21cb 100644 --- a/CraftBukkit-Patches/0015-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0015-Entity-Activation-Range.patch @@ -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; + } diff --git a/CraftBukkit-Patches/0128-Limit-block-placement-interaction-packets.patch b/CraftBukkit-Patches/0128-Limit-block-placement-interaction-packets.patch index 2346f021ac..9cd381e9dd 100644 --- a/CraftBukkit-Patches/0128-Limit-block-placement-interaction-packets.patch +++ b/CraftBukkit-Patches/0128-Limit-block-placement-interaction-packets.patch @@ -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); } + } diff --git a/CraftBukkit-Patches/0147-Filter-attribute-modifiers-which-cause-the-attribute.patch b/CraftBukkit-Patches/0147-Filter-attribute-modifiers-which-cause-the-attribute.patch index a3382434c0..befdde3beb 100644 --- a/CraftBukkit-Patches/0147-Filter-attribute-modifiers-which-cause-the-attribute.patch +++ b/CraftBukkit-Patches/0147-Filter-attribute-modifiers-which-cause-the-attribute.patch @@ -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; + } diff --git a/CraftBukkit-Patches/0148-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch b/CraftBukkit-Patches/0148-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch deleted file mode 100644 index e512a43d12..0000000000 --- a/CraftBukkit-Patches/0148-Fix-LEFT_CLICK_AIR-detection-when-not-in-creative.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Thinkofdeath -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); - --- \ No newline at end of file diff --git a/CraftBukkit-Patches/0149-Plug-WorldMap-Memory-Leak.patch b/CraftBukkit-Patches/0148-Plug-WorldMap-Memory-Leak.patch similarity index 100% rename from CraftBukkit-Patches/0149-Plug-WorldMap-Memory-Leak.patch rename to CraftBukkit-Patches/0148-Plug-WorldMap-Memory-Leak.patch diff --git a/CraftBukkit-Patches/0150-Fix-Corrupted-Trapped-Chest.patch b/CraftBukkit-Patches/0149-Fix-Corrupted-Trapped-Chest.patch similarity index 100% rename from CraftBukkit-Patches/0150-Fix-Corrupted-Trapped-Chest.patch rename to CraftBukkit-Patches/0149-Fix-Corrupted-Trapped-Chest.patch diff --git a/CraftBukkit-Patches/0151-Remove-uneeded-validation.patch b/CraftBukkit-Patches/0150-Remove-uneeded-validation.patch similarity index 100% rename from CraftBukkit-Patches/0151-Remove-uneeded-validation.patch rename to CraftBukkit-Patches/0150-Remove-uneeded-validation.patch diff --git a/CraftBukkit-Patches/0152-Add-Hunger-Config-Values.patch b/CraftBukkit-Patches/0151-Add-Hunger-Config-Values.patch similarity index 100% rename from CraftBukkit-Patches/0152-Add-Hunger-Config-Values.patch rename to CraftBukkit-Patches/0151-Add-Hunger-Config-Values.patch diff --git a/CraftBukkit-Patches/0153-Make-debug-logging-togglable.patch b/CraftBukkit-Patches/0152-Make-debug-logging-togglable.patch similarity index 100% rename from CraftBukkit-Patches/0153-Make-debug-logging-togglable.patch rename to CraftBukkit-Patches/0152-Make-debug-logging-togglable.patch diff --git a/CraftBukkit-Patches/0154-Skip-invalid-enchants-in-CraftMetaItem.patch b/CraftBukkit-Patches/0153-Skip-invalid-enchants-in-CraftMetaItem.patch similarity index 100% rename from CraftBukkit-Patches/0154-Skip-invalid-enchants-in-CraftMetaItem.patch rename to CraftBukkit-Patches/0153-Skip-invalid-enchants-in-CraftMetaItem.patch diff --git a/CraftBukkit-Patches/0155-Limit-TNT-Detonations-per-tick.patch b/CraftBukkit-Patches/0154-Limit-TNT-Detonations-per-tick.patch similarity index 100% rename from CraftBukkit-Patches/0155-Limit-TNT-Detonations-per-tick.patch rename to CraftBukkit-Patches/0154-Limit-TNT-Detonations-per-tick.patch diff --git a/CraftBukkit-Patches/0156-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch b/CraftBukkit-Patches/0155-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch similarity index 100% rename from CraftBukkit-Patches/0156-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch rename to CraftBukkit-Patches/0155-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch diff --git a/CraftBukkit-Patches/0157-Configurable-Hanging-Tick.patch b/CraftBukkit-Patches/0156-Configurable-Hanging-Tick.patch similarity index 100% rename from CraftBukkit-Patches/0157-Configurable-Hanging-Tick.patch rename to CraftBukkit-Patches/0156-Configurable-Hanging-Tick.patch diff --git a/CraftBukkit-Patches/0158-Fix-Some-Memory-Leaks.patch b/CraftBukkit-Patches/0157-Fix-Some-Memory-Leaks.patch similarity index 100% rename from CraftBukkit-Patches/0158-Fix-Some-Memory-Leaks.patch rename to CraftBukkit-Patches/0157-Fix-Some-Memory-Leaks.patch diff --git a/CraftBukkit-Patches/0159-Refactor-ItemDoor-Place.patch b/CraftBukkit-Patches/0158-Refactor-ItemDoor-Place.patch similarity index 100% rename from CraftBukkit-Patches/0159-Refactor-ItemDoor-Place.patch rename to CraftBukkit-Patches/0158-Refactor-ItemDoor-Place.patch diff --git a/CraftBukkit-Patches/0160-Don-t-Fire-InventoryCloseEvent-Unless-Required.patch b/CraftBukkit-Patches/0159-Don-t-Fire-InventoryCloseEvent-Unless-Required.patch similarity index 100% rename from CraftBukkit-Patches/0160-Don-t-Fire-InventoryCloseEvent-Unless-Required.patch rename to CraftBukkit-Patches/0159-Don-t-Fire-InventoryCloseEvent-Unless-Required.patch