Add pickup delay to item drops.

This commit is contained in:
Chicken Bones committed 2013-08-14 18:09:01 +10:00
1 parent 67be7ed09c
commit 5cd7f495d5
1 file changed
+6 -5
+6 -5
View File
@@ -662,10 +662,11 @@ object TileMultipart
def dropItem(stack:ItemStack, world:World, pos:Vector3)
{
val item = new EntityItem(world, pos.x, pos.y, pos.z, stack);
item.motionX = world.rand.nextGaussian() * 0.05;
item.motionY = world.rand.nextGaussian() * 0.05 + 0.2F;
item.motionZ = world.rand.nextGaussian() * 0.05;
world.spawnEntityInWorld(item);
val item = new EntityItem(world, pos.x, pos.y, pos.z, stack)
item.motionX = world.rand.nextGaussian() * 0.05
item.motionY = world.rand.nextGaussian() * 0.05 + 0.2
item.motionZ = world.rand.nextGaussian() * 0.05
item.delayBeforeCanPickup = 10
world.spawnEntityInWorld(item)
}
}