Fixed double ender pearl drop from sword, default power of travel staff.

Needs config change again.
This commit is contained in:
CrazyPants committed 2014-04-27 01:57:19 +08:00
1 parent 076b041622
commit 8ffb259e06
4 files changed
+40 -8

No files matched your search

+22
View File
@@ -101,6 +101,28 @@ public class Util {
}
public static EntityItem createDrop(World world, ItemStack stack, double x, double y, double z, boolean doRandomSpread) {
if(stack == null || stack.stackSize <= 0) {
return null;
}
if(doRandomSpread) {
float f1 = 0.7F;
double d = (world.rand.nextFloat() * f1) + (1.0F - f1) * 0.5D;
double d1 = (world.rand.nextFloat() * f1) + (1.0F - f1) * 0.5D;
double d2 = (world.rand.nextFloat() * f1) + (1.0F - f1) * 0.5D;
EntityItem entityitem = new EntityItem(world, x + d, y + d1, z + d2, stack);
entityitem.delayBeforeCanPickup = 10;
return entityitem;
} else {
EntityItem entityitem = new EntityItem(world, x, y, z, stack);
entityitem.motionX = 0;
entityitem.motionY = 0;
entityitem.motionZ = 0;
entityitem.delayBeforeCanPickup = 0;
return entityitem;
}
}
public static void dropItems(World world, ItemStack stack, double x, double y, double z, boolean doRandomSpread) {
if(stack.stackSize <= 0) {
return;