diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-06-17 01:12:49 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-17 01:12:49 -0400 |
commit | be45f900e5544ead9bdf0a17dfc11cc930357a77 (patch) | |
tree | 43158ccc5c42976ba089d44fb124e75a30e964d9 /src/main/java/net/minecraft | |
parent | 0c56bfb62fb465cfe5c8b61d3584ff04893cd310 (diff) | |
download | craftbukkit-be45f900e5544ead9bdf0a17dfc11cc930357a77.tar craftbukkit-be45f900e5544ead9bdf0a17dfc11cc930357a77.tar.gz craftbukkit-be45f900e5544ead9bdf0a17dfc11cc930357a77.tar.lz craftbukkit-be45f900e5544ead9bdf0a17dfc11cc930357a77.tar.xz craftbukkit-be45f900e5544ead9bdf0a17dfc11cc930357a77.zip |
Fixed issues with infinite items. Thanks for the help Rigby!
Dropped infinite items now become a stack of 1. Our reasoning behind this is that people who want an infinite item can usually give it to themselves or have someone else give it to them through a plugin (most plugins provide this functionality already).
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityItem.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java index 9b15397f..f7b55c7c 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -21,6 +21,11 @@ public class EntityItem extends Entity { this.height = this.width / 2.0F; this.setPosition(d0, d1, d2); this.itemStack = itemstack; + // CraftBukkit start - infinite item fix + if (this.itemStack.count <= -1) { + this.itemStack.count = 1; + } + // CraftBukkit end this.yaw = (float) (Math.random() * 360.0D); this.motX = (double) ((float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D)); this.motY = 0.20000000298023224D; |