Archiviert
13
0

Fix exp merging, oops

Dieser Commit ist enthalten in:
md_5 2013-01-25 18:25:18 +11:00
Ursprung 01b495fd02
Commit 5742900e16

Datei anzeigen

@ -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 <md_5@live.com.au>
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