Hopefully fixing the phantoms suffocating players in walls.
This commit is contained in:
parent
b66dceb7e3
commit
937374350a
|
@ -88,7 +88,7 @@ public class BOPEntities {
|
||||||
|
|
||||||
if (Biomes.netherBone.isPresent() && Biomes.netherDesert.isPresent())
|
if (Biomes.netherBone.isPresent() && Biomes.netherDesert.isPresent())
|
||||||
{
|
{
|
||||||
EntityRegistry.addSpawn(EntityPhantom.class, 65, 1, 1, EnumCreatureType.monster, Biomes.netherBone.get(), Biomes.netherDesert.get());
|
EntityRegistry.addSpawn(EntityPhantom.class, 8, 1, 1, EnumCreatureType.monster, Biomes.netherBone.get(), Biomes.netherDesert.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,9 @@ public class PotionEventHandler
|
||||||
double posY = event.entityLiving.posY;
|
double posY = event.entityLiving.posY;
|
||||||
double posZ = event.entityLiving.posZ;
|
double posZ = event.entityLiving.posZ;
|
||||||
|
|
||||||
double randX = (double)rand.nextInt(2);
|
double randX = 1.0 - (rand.nextDouble() * 2.0);
|
||||||
double randY = (double)rand.nextInt(3);
|
double randY = (double) rand.nextInt(3);
|
||||||
double randZ = (double)rand.nextInt(2);
|
double randZ = 1.0 - (rand.nextDouble() * 2.0);
|
||||||
|
|
||||||
event.entityLiving.motionX = 0.0;
|
event.entityLiving.motionX = 0.0;
|
||||||
event.entityLiving.motionY = 0.0;
|
event.entityLiving.motionY = 0.0;
|
||||||
|
@ -50,6 +50,7 @@ public class PotionEventHandler
|
||||||
|
|
||||||
if (rand.nextInt(5) == 0)
|
if (rand.nextInt(5) == 0)
|
||||||
{
|
{
|
||||||
|
if (!event.entityLiving.worldObj.checkBlockCollision(event.entityLiving.boundingBox.offset(randX, randY, randZ)))
|
||||||
event.entityLiving.setPosition(posX + randX, posY + randY, posZ + randZ);
|
event.entityLiving.setPosition(posX + randX, posY + randY, posZ + randZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue