summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorEvilSeph <evilseph@gmail.com>2011-09-15 03:30:52 -0400
committerEvilSeph <evilseph@gmail.com>2011-09-15 04:23:14 -0400
commit3c5632de31b923c8eaefae130f042a4d24566881 (patch)
tree96dd799022f621b4bb550dab1e003fc7f34f052c /src/main/java/net
parent53b32f43cc08f153c43dfcca1e50e29660a6e176 (diff)
downloadcraftbukkit-3c5632de31b923c8eaefae130f042a4d24566881.tar
craftbukkit-3c5632de31b923c8eaefae130f042a4d24566881.tar.gz
craftbukkit-3c5632de31b923c8eaefae130f042a4d24566881.tar.lz
craftbukkit-3c5632de31b923c8eaefae130f042a4d24566881.tar.xz
craftbukkit-3c5632de31b923c8eaefae130f042a4d24566881.zip
Fixed Creative not having infinite items.
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/ItemInWorldManager.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java
index fef07586..23828a48 100644
--- a/src/main/java/net/minecraft/server/ItemInWorldManager.java
+++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java
@@ -266,7 +266,16 @@ public class ItemInWorldManager {
}
if (itemstack != null && !result) {
+ int j1 = itemstack.getData();
+ int k1 = itemstack.count;
+
result = itemstack.placeItem(entityhuman, world, i, j, k, l);
+
+ // The item count should not decrement in Creative mode.
+ if (this.b()) {
+ itemstack.b(j1);
+ itemstack.count = k1;
+ }
}
// If we have 'true' and no explicit deny *or* an explicit allow -- run the item part of the hook