mob spawning

This commit is contained in:
bconlon 2020-12-28 16:47:43 -08:00
parent f5a637e91c
commit 531a65e9e3
7 changed files with 18 additions and 11 deletions

View File

@ -50,8 +50,9 @@ public class EntityAechorPlant extends EntityAetherAnimal {
}
@Override
public int getMaxSpawnedInChunk() {
return 3;
public boolean getCanSpawnHere()
{
return this.rand.nextInt(15) == 0 && super.getCanSpawnHere();
}
@Override

View File

@ -48,7 +48,7 @@ public class EntityCockatrice extends EntityMob {
@Override
public boolean getCanSpawnHere() {
return this.rand.nextInt(25) == 0 && super.getCanSpawnHere();
return this.rand.nextInt(5) == 0 && super.getCanSpawnHere();
}
@Override

View File

@ -345,7 +345,7 @@ public class EntityWhirlwind extends EntityMob {
int j = MathHelper.floor_double(this.boundingBox.minY);
int k = MathHelper.floor_double(this.posZ);
return this.rand.nextInt(450) == 0 && this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.worldObj.getBlockLightValue(i, j, k) > 8 && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox);
return this.rand.nextInt(15) == 0 && this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.worldObj.getBlockLightValue(i, j, k) > 8 && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox);
}
public EntityPlayer findClosestPlayer() {

View File

@ -40,7 +40,7 @@ public class EntityZephyr extends EntityFlying implements IMob {
int j = MathHelper.floor_double(this.boundingBox.minY);
int k = MathHelper.floor_double(this.posZ);
return this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.rand.nextInt(85) == 0 && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY), MathHelper.floor_double(this.posZ)) > 8 && super.getCanSpawnHere();
return this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.rand.nextInt(25) == 0 && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY), MathHelper.floor_double(this.posZ)) > 8 && super.getCanSpawnHere();
}
@Override

View File

@ -56,7 +56,7 @@ public class EntityAerwhale extends EntityFlying {
int j = MathHelper.floor_double(this.boundingBox.minY);
int k = MathHelper.floor_double(this.posZ);
return this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.rand.nextInt(65) == 0 && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY), MathHelper.floor_double(this.posZ)) > 8 && super.getCanSpawnHere();
return this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY), MathHelper.floor_double(this.posZ)) > 8 && super.getCanSpawnHere();
}
@Override

View File

@ -68,6 +68,12 @@ public class EntitySwet extends EntityMountable {
}
}
@Override
public boolean getCanSpawnHere()
{
return this.rand.nextInt(10) == 0 && super.getCanSpawnHere();
}
@Override
public void onUpdate() {
super.onUpdate();

View File

@ -58,7 +58,7 @@ public class AetherBiome extends BiomeGenBase {
private void addCreatureEntry(ArrayList<SpawnListEntry> list)
{
list.add(new SpawnListEntry(EntityAerwhale.class, 30, 1, 1));
list.add(new SpawnListEntry(EntityAerwhale.class, 12, 1, 1));
list.add(new SpawnListEntry(EntityPhyg.class, 12, 4, 4));
list.add(new SpawnListEntry(EntitySheepuff.class, 10, 4, 4));
list.add(new SpawnListEntry(EntityFlyingCow.class, 8, 4, 4));
@ -68,11 +68,11 @@ public class AetherBiome extends BiomeGenBase {
private void addMobEntry(ArrayList<SpawnListEntry> list)
{
list.add(new SpawnListEntry(EntityAechorPlant.class, 1000, 2, 3));
list.add(new SpawnListEntry(EntityCockatrice.class, 100, 4, 4));
list.add(new SpawnListEntry(EntityZephyr.class, 95, 1, 2));
list.add(new SpawnListEntry(EntityWhirlwind.class, 90, 1, 2));
list.add(new SpawnListEntry(EntitySwet.class, 1, 2, 3));
list.add(new SpawnListEntry(EntityZephyr.class, 50, 1, 2));
list.add(new SpawnListEntry(EntityAechorPlant.class, 20, 2, 3));
list.add(new SpawnListEntry(EntityWhirlwind.class, 10, 1, 2));
list.add(new SpawnListEntry(EntitySwet.class, 10, 2, 3));
}
@Override