From 5742900e16ea25eb35210963e8302f38e92cfaad Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 25 Jan 2013 18:25:18 +1100 Subject: [PATCH] Fix exp merging, oops --- ...tter-more-flexible-itemstack-merging.patch | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/CraftBukkit-Patches/0020-Better-more-flexible-itemstack-merging.patch b/CraftBukkit-Patches/0020-Better-more-flexible-itemstack-merging.patch index e96306a3c5..22b0f46c42 100644 --- a/CraftBukkit-Patches/0020-Better-more-flexible-itemstack-merging.patch +++ b/CraftBukkit-Patches/0020-Better-more-flexible-itemstack-merging.patch @@ -1,12 +1,12 @@ -From f3c3312ad255c5d61121f0e4e3db437fe7bc3b19 Mon Sep 17 00:00:00 2001 +From 91a71bd3c047776b164cd9e6cd205cbd9519adb6 Mon Sep 17 00:00:00 2001 From: md_5 -Date: Mon, 21 Jan 2013 14:31:25 +1100 +Date: Fri, 25 Jan 2013 18:24:54 +1100 Subject: [PATCH] Better + more flexible itemstack merging --- - src/main/java/net/minecraft/server/EntityItem.java | 13 ++++++----- - src/main/java/net/minecraft/server/World.java | 26 ++-------------------- - 2 files changed, 9 insertions(+), 30 deletions(-) + src/main/java/net/minecraft/server/EntityItem.java | 13 ++++----- + src/main/java/net/minecraft/server/World.java | 31 +++------------------- + 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java index a7baa0f..5e3ac84 100644 @@ -40,13 +40,14 @@ index a7baa0f..5e3ac84 100644 } } else { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 46e8d11..adb1312 100644 +index 46e8d11..b300766 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -926,30 +926,7 @@ public abstract class World implements IBlockAccess { +@@ -925,31 +925,8 @@ public abstract class World implements IBlockAccess { + event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity, spawnReason); } else if (entity instanceof EntityItem) { event = CraftEventFactory.callItemSpawnEvent((EntityItem) entity); - // Spigot start +- // Spigot start - ItemStack item = ((EntityItem) entity).getItemStack(); - org.bukkit.craftbukkit.inventory.CraftItemStack craft = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(item); - int maxSize = item.getMaxStackSize(); @@ -71,18 +72,22 @@ index 46e8d11..adb1312 100644 - } - } - } else if (entity instanceof EntityExperienceOrb) { -+ if (entity instanceof EntityExperienceOrb) { ++ } // Spigot start ++ if (entity instanceof EntityExperienceOrb) { EntityExperienceOrb xp = (EntityExperienceOrb) entity; double radius = this.getWorld().expMergeRadius; if (radius > 0) { -@@ -964,6 +941,7 @@ public abstract class World implements IBlockAccess { +@@ -964,8 +941,8 @@ public abstract class World implements IBlockAccess { } } } -+ } - // Spigot end - } else if (entity.getBukkitEntity() instanceof org.bukkit.entity.Projectile) { +- // Spigot end +- } else if (entity.getBukkitEntity() instanceof org.bukkit.entity.Projectile) { ++ } // Spigot end ++ else if (entity.getBukkitEntity() instanceof org.bukkit.entity.Projectile) { // Not all projectiles extend EntityProjectile, so check for Bukkit interface instead + event = CraftEventFactory.callProjectileLaunchEvent(entity); + } -- 1.8.1-rc2