#170 - Spawnrates modified
This commit is contained in:
parent
d3104df242
commit
cab14538e9
|
@ -103,9 +103,9 @@ public class AerwhaleAITravelCourse extends EntityAIBase
|
|||
|
||||
this.aerwhale.rotationPitch *= 0.99D;
|
||||
|
||||
this.aerwhale.motionX += 0.005D * Math.cos((this.aerwhale.rotationYaw / 180D) * 3.1415926535897931D ) * Math.cos ((this.aerwhale.rotationPitch / 180D) * 3.1415926535897931D);
|
||||
this.aerwhale.motionX += 0.005D * Math.cos((this.aerwhale.rotationYaw / 180D) * 3.1415926535897931D ) * Math.cos((this.aerwhale.rotationPitch / 180D) * 3.1415926535897931D);
|
||||
this.aerwhale.motionY += 0.005D * Math.sin((this.aerwhale.rotationPitch / 180D) * 3.1415926535897931D );
|
||||
this.aerwhale.motionZ += 0.005D * Math.sin((this.aerwhale.rotationYaw / 180D) * 3.1415926535897931D ) * Math.cos ((this.aerwhale.rotationPitch / 180D) * 3.1415926535897931D);
|
||||
this.aerwhale.motionZ += 0.005D * Math.sin((this.aerwhale.rotationYaw / 180D) * 3.1415926535897931D ) * Math.cos((this.aerwhale.rotationPitch / 180D) * 3.1415926535897931D);
|
||||
|
||||
this.aerwhale.motionX *= 0.98D;
|
||||
this.aerwhale.motionY *= 0.98D;
|
||||
|
@ -169,17 +169,19 @@ public class AerwhaleAITravelCourse extends EntityAIBase
|
|||
double standard = 50D;
|
||||
|
||||
float yaw = this.aerwhale.rotationYaw + rotationYawOffset;
|
||||
float pitch = this.aerwhale.rotationPitch + rotationPitchOffset;
|
||||
float pitch = this.aerwhale.rotationYaw + rotationYawOffset;
|
||||
|
||||
float f3 = MathHelper.cos(-yaw * 0.01745329F - 3.141593F);
|
||||
float f4 = MathHelper.sin(-yaw * 0.01745329F - 3.141593F);
|
||||
float f5 = MathHelper.cos(-pitch * 0.01745329F);
|
||||
float f6 = MathHelper.sin(-pitch * 0.01745329F);
|
||||
|
||||
float f7 = f4 * f5;
|
||||
float f8 = f6;
|
||||
float f9 = f3 * f5;
|
||||
|
||||
Vec3d vec3d = new Vec3d(this.aerwhale.getPosition());
|
||||
Vec3d vec3d1 = vec3d.addVector((double)f7 * standard, (double)MathHelper.sin(-pitch * 0.01745329F) * standard, (double)f9 * standard);
|
||||
Vec3d vec3d1 = vec3d.addVector((double)f7 * standard, (double)f8 * standard, (double)f9 * standard);
|
||||
|
||||
RayTraceResult movingobjectposition = this.worldObj.rayTraceBlocks(vec3d, vec3d1, false);
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.legacy.aether.common.entities.hostile;
|
|||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
|
@ -54,11 +53,11 @@ public class EntityAechorPlant extends EntityAetherAnimal
|
|||
this.tasks.addTask(0, new AechorPlantAIShootPlayer(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
{
|
||||
return type == EnumCreatureType.MONSTER;
|
||||
}
|
||||
@Override
|
||||
public int getMaxSpawnedInChunk()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLivingUpdate()
|
||||
|
@ -191,16 +190,4 @@ public class EntityAechorPlant extends EntityAetherAnimal
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSpawnedInChunk()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getCanSpawnHere()
|
||||
{
|
||||
return this.getBlockPathWeight(new BlockPos(this.posX, this.getEntityBoundingBox().minY, this.posZ)) == 10.0F && this.worldObj.isDaytime();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package com.legacy.aether.common.entities.hostile;
|
||||
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
|
||||
|
@ -21,7 +20,6 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.world.EnumDifficulty;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.legacy.aether.common.blocks.BlocksAether;
|
||||
import com.legacy.aether.common.entities.passive.mountable.EntityMoa;
|
||||
import com.legacy.aether.common.entities.projectile.EntityPoisonNeedle;
|
||||
import com.legacy.aether.common.registry.sounds.SoundsAether;
|
||||
|
@ -62,24 +60,18 @@ public class EntityCockatrice extends EntityMob
|
|||
this.setHealth(10);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getCanSpawnHere()
|
||||
{
|
||||
return this.rand.nextInt(25) == 0 && super.getCanSpawnHere();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPotionApplicable(PotionEffect effect)
|
||||
{
|
||||
return effect.getPotion() == MobEffects.POISON ? false : super.isPotionApplicable(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBlockPathWeight(BlockPos pos)
|
||||
{
|
||||
return this.worldObj.getBlockState(pos).getBlock() == BlocksAether.aether_grass ? 10.0F : 0.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
{
|
||||
return type == EnumCreatureType.MONSTER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
|
@ -201,12 +193,6 @@ public class EntityCockatrice extends EntityMob
|
|||
super.readEntityFromNBT(nbttagcompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSpawnedInChunk()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEvent getAmbientSound()
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.legacy.aether.common.entities.hostile;
|
||||
|
||||
import net.minecraft.entity.EntityFlying;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
|
@ -33,18 +32,6 @@ public class EntityZephyr extends EntityFlying implements IMob
|
|||
this.tasks.addTask(1, this.shootingAI = new ZephyrAIShootTarget(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLocationAndAngles(double x, double y, double z, float yaw, float pitch)
|
||||
{
|
||||
this.lastTickPosX = this.prevPosX = this.posX = x;
|
||||
this.lastTickPosY = this.prevPosY = this.posY = y + 50;
|
||||
this.lastTickPosZ = this.prevPosZ = this.posZ = z;
|
||||
this.rotationYaw = yaw;
|
||||
this.rotationPitch = pitch;
|
||||
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initEntityAI()
|
||||
{
|
||||
|
@ -59,13 +46,13 @@ public class EntityZephyr extends EntityFlying implements IMob
|
|||
{
|
||||
BlockPos pos = new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY), MathHelper.floor_double(this.posZ));
|
||||
|
||||
return this.worldObj.getLight(pos) > 8 && this.worldObj.checkNoEntityCollision(this.getEntityBoundingBox().expand(0D, 10D, 0D)) && this.worldObj.getCollisionBoxes(this, this.getEntityBoundingBox()).isEmpty() && !this.worldObj.containsAnyLiquid(this.getEntityBoundingBox());
|
||||
return this.rand.nextInt(85) == 0 && this.worldObj.getCollisionBoxes(this, this.getEntityBoundingBox()).size() == 0 && !this.worldObj.containsAnyLiquid(this.getEntityBoundingBox()) && this.worldObj.getLight(pos) > 8 && super.getCanSpawnHere();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
public int getMaxSpawnedInChunk()
|
||||
{
|
||||
return type == EnumCreatureType.AMBIENT;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -130,10 +117,4 @@ public class EntityZephyr extends EntityFlying implements IMob
|
|||
return 1F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSpawnedInChunk()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package com.legacy.aether.common.entities.passive;
|
||||
|
||||
import net.minecraft.entity.EntityFlying;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
|
@ -28,18 +27,6 @@ public class EntityAerwhale extends EntityFlying implements IMob
|
|||
this.rotationPitch = 90F * this.getRNG().nextFloat() - 45F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLocationAndAngles(double x, double y, double z, float yaw, float pitch)
|
||||
{
|
||||
this.lastTickPosX = this.prevPosX = this.posX = x;
|
||||
this.lastTickPosY = this.prevPosY = this.posY = y + 30;
|
||||
this.lastTickPosZ = this.prevPosZ = this.posZ = z;
|
||||
this.rotationYaw = yaw;
|
||||
this.rotationPitch = pitch;
|
||||
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initEntityAI()
|
||||
{
|
||||
|
@ -61,13 +48,13 @@ public class EntityAerwhale extends EntityFlying implements IMob
|
|||
{
|
||||
BlockPos pos = new BlockPos(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.getEntityBoundingBox().minY), MathHelper.floor_double(this.posZ));
|
||||
|
||||
return this.worldObj.getLight(pos) > 8 && this.worldObj.checkNoEntityCollision(this.getEntityBoundingBox().expand(0D, 30D, 0D)) && this.worldObj.getCollisionBoxes(this, this.getEntityBoundingBox()).isEmpty() && !this.worldObj.containsAnyLiquid(this.getEntityBoundingBox());
|
||||
return this.rand.nextInt(65) == 0 && this.worldObj.getCollisionBoxes(this, this.getEntityBoundingBox()).size() == 0 && !this.worldObj.containsAnyLiquid(this.getEntityBoundingBox()) && this.worldObj.getLight(pos) > 8 && super.getCanSpawnHere();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
public int getMaxSpawnedInChunk()
|
||||
{
|
||||
return type == EnumCreatureType.AMBIENT;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,12 +83,6 @@ public class EntityAerwhale extends EntityFlying implements IMob
|
|||
return SoundsAether.aerwhale_death;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSpawnedInChunk()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDespawn()
|
||||
{
|
||||
|
|
|
@ -23,7 +23,6 @@ import net.minecraft.util.EnumHand;
|
|||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.legacy.aether.common.entities.util.EntitySaddleMount;
|
||||
|
|
|
@ -17,7 +17,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.legacy.aether.common.entities.util.EntitySaddleMount;
|
||||
|
|
|
@ -7,7 +7,6 @@ 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;
|
||||
|
@ -65,12 +64,6 @@ 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()
|
||||
{
|
||||
|
@ -706,10 +699,4 @@ public class EntitySwet extends EntityMountable
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxSpawnedInChunk()
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
}
|
|
@ -2,9 +2,6 @@ package com.legacy.aether.common.tile_entities;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.legacy.aether.common.world.dungeon.*;
|
||||
|
||||
import net.minecraft.block.BlockChest;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
|
@ -13,6 +10,10 @@ import net.minecraft.server.management.PlayerList;
|
|||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
||||
import com.legacy.aether.common.world.dungeon.BronzeDungeon;
|
||||
import com.legacy.aether.common.world.dungeon.GoldenDungeon;
|
||||
import com.legacy.aether.common.world.dungeon.SilverDungeon;
|
||||
|
||||
public class TileEntityTreasureChest extends TileEntityChest
|
||||
{
|
||||
|
||||
|
|
|
@ -258,26 +258,9 @@ public class ChunkProviderAether implements IChunkGenerator
|
|||
@Override
|
||||
public List<SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
|
||||
{
|
||||
if (creatureType == EnumCreatureType.CREATURE)
|
||||
{
|
||||
return this.worldObj.getBiome(pos).getSpawnableList(EnumCreatureType.CREATURE);
|
||||
}
|
||||
else if (creatureType == EnumCreatureType.MONSTER)
|
||||
{
|
||||
if (this.rand.nextInt(18) == 0)
|
||||
{
|
||||
return this.worldObj.getBiome(pos).getSpawnableList(EnumCreatureType.MONSTER);
|
||||
}
|
||||
}
|
||||
else if (creatureType == EnumCreatureType.AMBIENT)
|
||||
{
|
||||
if (this.rand.nextInt(35) == 0)
|
||||
{
|
||||
return this.worldObj.getBiome(pos).getSpawnableList(EnumCreatureType.AMBIENT);
|
||||
}
|
||||
}
|
||||
Biome biome = this.worldObj.getBiomeProvider().getBiome(pos);
|
||||
|
||||
return null;
|
||||
return biome != null ? biome.getSpawnableList(creatureType) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
package com.legacy.aether.common.world.biome;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.BiomeDecorator;
|
||||
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
|
||||
|
@ -47,41 +44,26 @@ public class AetherBiome extends Biome
|
|||
|
||||
this.spawnableMonsterList.addAll(list);
|
||||
|
||||
list.clear();
|
||||
|
||||
this.addFlyingEntry(list);
|
||||
|
||||
this.spawnableCaveCreatureList.addAll(list);
|
||||
|
||||
this.topBlock = BlocksAether.aether_grass.getDefaultState();
|
||||
this.fillerBlock = BlocksAether.holystone.getDefaultState();
|
||||
}
|
||||
|
||||
public float getSpawningChance()
|
||||
{
|
||||
return 0.3F;
|
||||
}
|
||||
|
||||
private void addCreatureEntry(ArrayList<SpawnListEntry> list)
|
||||
{
|
||||
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));
|
||||
list.add(new SpawnListEntry(EntityFlyingCow.class, 46, 4, 4));
|
||||
list.add(new SpawnListEntry(EntityAerbunny.class, 36, 3, 3));
|
||||
list.add(new SpawnListEntry(EntitySwet.class, 10, 4, 4));
|
||||
list.add(new SpawnListEntry(EntityAechorPlant.class, 8, 3, 3));
|
||||
list.add(new SpawnListEntry(EntitySheepuff.class, 10, 4, 4));
|
||||
list.add(new SpawnListEntry(EntityPhyg.class, 12, 4, 4));
|
||||
list.add(new SpawnListEntry(EntityMoa.class, 10, 3, 3));
|
||||
list.add(new SpawnListEntry(EntityFlyingCow.class, 10, 4, 4));
|
||||
list.add(new SpawnListEntry(EntityAerbunny.class, 11, 3, 3));
|
||||
}
|
||||
|
||||
private void addMobEntry(ArrayList<SpawnListEntry> list)
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
private void addFlyingEntry(ArrayList<SpawnListEntry> list)
|
||||
{
|
||||
list.add(new SpawnListEntry(EntityAerwhale.class, 3, 1, 3));
|
||||
list.add(new SpawnListEntry(EntityZephyr.class, 5, 0, 1));
|
||||
list.add(new SpawnListEntry(EntityCockatrice.class, 3, 4, 4));
|
||||
list.add(new SpawnListEntry(EntityAerwhale.class, 8, 3, 3));
|
||||
list.add(new SpawnListEntry(EntityZephyr.class, 5, 1, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -90,16 +72,12 @@ public class AetherBiome extends Biome
|
|||
return 0xC0C0FF; // Lavender Blue
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRain()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public Biome.TempCategory getTempCategory()
|
||||
{
|
||||
return TempCategory.COLD;
|
||||
}
|
||||
|
||||
public BiomeDecorator createBiomeDecorator()
|
||||
{
|
||||
return new AetherBiomeDecorator();
|
||||
|
|
Loading…
Reference in a new issue