mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-22 05:02:32 +00:00
Add pickup delay to item drops.
This commit is contained in:
1 parent
67be7ed09c
commit
5cd7f495d5
1 file changed
+6
-5
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user