mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 23:45:55 +00:00
Added support for increased Enderman Skull drops when using a TiC Cleaver or weapon with the beheading modifier
Halved the skull drop chance when mobs killed by a 'fake player', such as killer joe (can be changed in the config)
This commit is contained in:
1 parent
2f63484cc5
commit
79e408d330
4 files changed
+154
-61
No files matched your search
@@ -146,23 +146,32 @@ public class Util {
|
||||
return;
|
||||
}
|
||||
|
||||
EntityItem entityitem = createEntityItem(world, stack, x, y, z, doRandomSpread);
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
|
||||
}
|
||||
|
||||
public static EntityItem createEntityItem(World world, ItemStack stack, double x, double y, double z) {
|
||||
return createEntityItem(world, stack, x, y, z, true);
|
||||
}
|
||||
|
||||
public static EntityItem createEntityItem(World world, ItemStack stack, double x, double y, double z, boolean doRandomSpread) {
|
||||
EntityItem entityitem;
|
||||
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 = new EntityItem(world, x + d, y + d1, z + d2, stack);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
} else {
|
||||
EntityItem entityitem = new EntityItem(world, x, y, z, stack);
|
||||
entityitem = new EntityItem(world, x, y, z, stack);
|
||||
entityitem.motionX = 0;
|
||||
entityitem.motionY = 0;
|
||||
entityitem.motionZ = 0;
|
||||
entityitem.delayBeforeCanPickup = 0;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
|
||||
return entityitem;
|
||||
}
|
||||
|
||||
public static void dropItems(World world, ItemStack stack, int x, int y, int z, boolean doRandomSpread) {
|
||||
|
||||
Reference in new issue
Block a user