From 86fbcc5e52c1a1162e46440e24cc654a29d48346 Mon Sep 17 00:00:00 2001 From: Kino Date: Wed, 28 Dec 2016 21:54:33 -0500 Subject: [PATCH] Spawn rates changed --- .../server/entities/hostile/EntityAechorPlant.java | 2 +- .../server/entities/passive/mountable/EntitySwet.java | 7 +++++++ .../legacy/aether/server/world/biome/AetherBiome.java | 10 +++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/legacy/aether/server/entities/hostile/EntityAechorPlant.java b/src/main/java/com/legacy/aether/server/entities/hostile/EntityAechorPlant.java index c470c64..7b601ca 100644 --- a/src/main/java/com/legacy/aether/server/entities/hostile/EntityAechorPlant.java +++ b/src/main/java/com/legacy/aether/server/entities/hostile/EntityAechorPlant.java @@ -193,7 +193,7 @@ public class EntityAechorPlant extends EntityAetherAnimal @Override public boolean getCanSpawnHere() { - return this.getBlockPathWeight(new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ)) == 10.0F; + return this.getBlockPathWeight(new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ)) == 10.0F && this.worldObj.isDaytime(); } } \ No newline at end of file diff --git a/src/main/java/com/legacy/aether/server/entities/passive/mountable/EntitySwet.java b/src/main/java/com/legacy/aether/server/entities/passive/mountable/EntitySwet.java index 9a7c32a..54e4a4d 100644 --- a/src/main/java/com/legacy/aether/server/entities/passive/mountable/EntitySwet.java +++ b/src/main/java/com/legacy/aether/server/entities/passive/mountable/EntitySwet.java @@ -7,6 +7,7 @@ import javax.annotation.Nullable; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; @@ -64,6 +65,12 @@ public class EntitySwet extends EntityMountable this.slimeJumpDelay = this.rand.nextInt(20) + 10; } + @Override + public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount) + { + return type == EnumCreatureType.MONSTER; + } + @Override public void updateRidden() { diff --git a/src/main/java/com/legacy/aether/server/world/biome/AetherBiome.java b/src/main/java/com/legacy/aether/server/world/biome/AetherBiome.java index e143ab0..1d7feae 100644 --- a/src/main/java/com/legacy/aether/server/world/biome/AetherBiome.java +++ b/src/main/java/com/legacy/aether/server/world/biome/AetherBiome.java @@ -54,10 +54,13 @@ public class AetherBiome extends Biome this.fillerBlock = BlocksAether.holystone.getDefaultState(); } + public float getSpawningChance() + { + return 0.3F; + } + private void addCreatureEntry(ArrayList list) { - list.add(new SpawnListEntry(EntitySwet.class, 20, 4, 4)); - list.add(new SpawnListEntry(EntityAechorPlant.class, 120, 3, 3)); list.add(new SpawnListEntry(EntitySheepuff.class, 30, 4, 4)); list.add(new SpawnListEntry(EntityPhyg.class, 39, 4, 4)); list.add(new SpawnListEntry(EntityMoa.class, 40, 3, 3)); @@ -67,7 +70,8 @@ public class AetherBiome extends Biome private void addMobEntry(ArrayList list) { - list.add(new SpawnListEntry(EntityAechorPlant.class, 120, 1, 4)); + list.add(new SpawnListEntry(EntitySwet.class, 20, 1, 2)); + list.add(new SpawnListEntry(EntityAechorPlant.class, 70, 1, 2)); list.add(new SpawnListEntry(EntityCockatrice.class, 60, 1, 2)); }