private boolean checkValidity(final EntityLivingBase entity) { if (entity == this.mc.thePlayer) { return false; } if (!entity.isEntityAlive()) { return false; } if (this.mc.thePlayer.getDistanceToEntity(entity) > this.range) { return false; } if (!(entity instanceof EntityPlayer)) { return (this.monsters && entity instanceof EntityMob) || (this.animals && (entity instanceof EntityAnimal || entity instanceof EntitySquid)) || (this.bats && entity instanceof EntityBat); } if (this.players) { final EntityPlayer player = (EntityPlayer)entity; return (this.friend && FriendManager.isFriend(player.getName())) || (!FriendManager.isFriend(player.getName()) && (!this.noArmor || this.hasArmor(player))); } return false; }
public Color getEntityColor() { if ((entity instanceof EntityAnimal)) { return Color.white; } if ((entity instanceof EntityMob)) { return Color.red; } if ((entity instanceof EntitySlime)) { return Color.green; } if ((entity instanceof EntityVillager)) { return new Color(245, 245, 220); } if ((entity instanceof EntityBat)) { return Color.BLACK; } if ((entity instanceof EntitySquid)) { return Color.PINK; } return Color.white; }
private boolean isValidTarget(Entity e) { if (e == null) return false; else if (e instanceof EntityPlayer) { EntityPlayer p = ((EntityPlayer) e); if (p.capabilities.isCreativeMode) return false; else { if (kPlayers) return true; else if (!kTeam) return false; RivalRebelsPlayer rrp = RivalRebels.round.rrplayerlist.getForName(((EntityPlayer) e).getCommandSenderName()); if (rrp == null) return kTeam; if (rrp.rrteam == RivalRebelsTeam.NONE) return !p.getCommandSenderName().equals(username); if (rrp.rrteam != team) return kTeam; else return false; } } else return (kMobs && (e instanceof EntityRhodes || (e instanceof EntityMob && !(e instanceof EntityAnimal) && !(e instanceof EntityBat) && !(e instanceof EntityVillager) && !(e instanceof EntitySquid)) || e instanceof EntityGhast)); }
protected Relation determineRelation() { if (entity instanceof EntityMob) { return Relation.FOE; } else if (entity instanceof EntitySlime) { return Relation.FOE; } else if (entity instanceof EntityGhast) { return Relation.FOE; } else if (entity instanceof EntityAnimal) { return Relation.FRIEND; } else if (entity instanceof EntitySquid) { return Relation.FRIEND; } else if (entity instanceof EntityAmbientCreature) { return Relation.FRIEND; } else { return Relation.UNKNOWN; } }
public BiomeDarkOcean(int biomeID) { super(biomeID); setColor(0x000014); topBlock = TDEBlocks.dark_grass; fillerBlock = TDEBlocks.dark_dirt; waterColorMultiplier = 0x000014; setHeight(height_Oceans); spawnableCreatureList.clear(); spawnableMonsterList.clear(); spawnableWaterCreatureList.clear(); spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4)); }
@SubscribeEvent public void onDeath(LivingDeathEvent event) { if (!event.entityLiving.worldObj.isRemote) { EntityLivingBase entity = event.entityLiving; if (entity instanceof EntityBat) { if (((EntityBat) entity).worldObj.rand.nextInt(100) < 80) { EntityItem batWing = new EntityItem(((EntityBat) entity).worldObj, ((EntityBat) entity).posX, ((EntityBat) entity).posY, ((EntityBat) entity).posZ, new ItemStack(ModItems.materials)); ((EntityBat) entity).worldObj.spawnEntityInWorld(batWing); } } else if (entity instanceof EntitySquid) { if (((EntitySquid) entity).worldObj.rand.nextInt(100) < 60) { EntityItem tentacle = new EntityItem(((EntitySquid) entity).worldObj, ((EntitySquid) entity).posX, ((EntitySquid) entity).posY, ((EntitySquid) entity).posZ, new ItemStack(ModItems.materials, 1, 4)); ((EntitySquid) entity).worldObj.spawnEntityInWorld(tentacle); } } } }
@Override public void executeFullGrownEffect(World world, int x, int y, int z, Random rand){ if(world.getBlockMetadata(x, y, z) == 14) { int nearbyEntityCount = world.getEntitiesWithinAABB(EntitySquid.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1).expand(SPAWN_RANGE * 2, 4.0D, SPAWN_RANGE * 2)).size(); if(nearbyEntityCount < MAX_NEARBY_ENTITIES) { EntitySquid squid = new EntitySquid(world); double randXmotion = rand.nextDouble() - 0.5D; double randYmotion = 1D;// rand.nextDouble(); double randZmotion = rand.nextDouble() - 0.5D; squid.setLocationAndAngles(x + 0.5D, y + 0.5D, z + 0.5D, rand.nextFloat() * 360.0F, 0.0F); squid.motionX = randXmotion; squid.motionY = randYmotion; squid.motionZ = randZmotion; world.spawnEntityInWorld(squid); squid.spawnExplosionParticle(); squid.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F); world.setBlockMetadataWithNotify(x, y, z, 11, 3); } } else { world.setBlockMetadataWithNotify(x, y, z, 14, 2); world.scheduleBlockUpdate(x, y, z, this, 60); } }
@SubscribeEvent public void entityDrops(LivingDropsEvent event) { EntityLivingBase killedEnt = event.entityLiving; DamageSource source = event.source; boolean recentlyHit = event.recentlyHit; if (recentlyHit) { if (source.getEntity() instanceof EntityPlayer) { if (killedEnt instanceof EntitySquid) { event.drops.add(new EntityItem(killedEnt.worldObj, killedEnt.posX, killedEnt.posY, killedEnt.posZ, new ItemStack(ModItems.squid, 1))); } if (killedEnt instanceof EntitySheep) { if (killedEnt.isBurning()) { event.drops.add(new EntityItem(killedEnt.worldObj, killedEnt.posX, killedEnt.posY, killedEnt.posZ, new ItemStack(ModItems.lambCooked, 1))); } else { event.drops.add(new EntityItem(killedEnt.worldObj, killedEnt.posX, killedEnt.posY, killedEnt.posZ, new ItemStack(ModItems.lamb, 1))); } } } } }
@ForgeSubscribe public void onEntityLivingDeath(LivingDeathEvent event) { if (!hasChecked) { dartcraftTrue = Loader.isModLoaded("dartCraft"); hasChecked = true; } if (!event.entity.worldObj.isRemote) { if (event.entityLiving instanceof EntitySquid && ConfigKeys.allowDropTentacles) event.entityLiving.dropItem(ItemInfo.SQUID_TENTACLE_ID + 256, (int) (Math.random() * 4 + 1)); else if (event.entityLiving instanceof EntitySheep && ConfigKeys.allowDropMutton && !dartcraftTrue) event.entityLiving.dropItem(ItemInfo.RAW_MUTTON_ID + 256, (int) (Math.random() * 2 + 1)); if (usedEssenceContainer) { ((ItemEssenceContainer) stack.getItem()).setName(stack, entity); usedEssenceContainer = false; } } }
@SubscribeEvent public void onEntitySpawn(LivingSpawnEvent.CheckSpawn evt) { if (evt.getResult() == Result.DENY) { return; } if(Config.spawnGuardStopAllSlimesDebug && evt.getEntity() instanceof EntitySlime) { evt.setResult(Result.DENY); return; } if(Config.spawnGuardStopAllSquidSpawning && evt.getEntity().getClass() == EntitySquid.class) { evt.setResult(Result.DENY); return; } Map<BlockPos, ISpawnCallback> guards = getGuardsForWorld(evt.getWorld()); for (ISpawnCallback guard : guards.values()) { ISpawnCallback.Result result = guard.isSpawnPrevented(evt.getEntityLiving()); if (result == ISpawnCallback.Result.DENY) { evt.setResult(Result.DENY); return; } else if (result == ISpawnCallback.Result.DONE) { return; } } }
/** * Checks if the specified entity is a passive * * @param e The entity * @return Whether or not the entity is a passive */ public static boolean isPassive(Entity e) { if (e instanceof EntityPigZombie) return !isAngry((EntityPigZombie) e); if (e instanceof EntityIronGolem) return !isAngry((EntityIronGolem) e); if (e instanceof EntityPolarBear) return !isAngry((EntityPolarBear) e); if (e instanceof EntityAnimal) return true; if (e instanceof EntitySquid) return true; if (e instanceof EntityBat) return true; if (e instanceof EntityVillager) return true; if (e instanceof EntitySnowman) return true; return false; }
protected BiomeGenBase(int id) { this.minHeight = height_Default.rootHeight; this.maxHeight = height_Default.variation; this.temperature = 0.5F; this.rainfall = 0.5F; this.waterColorMultiplier = 16777215; this.spawnableMonsterList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList(); this.spawnableCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList(); this.spawnableWaterCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList(); this.spawnableCaveCreatureList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList(); this.enableRain = true; this.worldGeneratorTrees = new WorldGenTrees(false); this.worldGeneratorBigTree = new WorldGenBigTree(false); this.worldGeneratorSwamp = new WorldGenSwamp(); this.biomeID = id; biomeList[id] = this; this.theBiomeDecorator = this.createBiomeDecorator(); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityRabbit.class, 10, 3, 3)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1)); this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8)); }
protected void rotateCorpse(EntitySquid bat, float p_77043_2_, float p_77043_3_, float partialTicks) { float f = bat.prevSquidPitch + (bat.squidPitch - bat.prevSquidPitch) * partialTicks; float f1 = bat.prevSquidYaw + (bat.squidYaw - bat.prevSquidYaw) * partialTicks; GlStateManager.translate(0.0F, 0.5F, 0.0F); GlStateManager.rotate(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(f, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(f1, 0.0F, 1.0F, 0.0F); GlStateManager.translate(0.0F, -1.2F, 0.0F); }
protected Biome(Biome.BiomeProperties properties) { this.biomeName = properties.biomeName; this.baseHeight = properties.baseHeight; this.heightVariation = properties.heightVariation; this.temperature = properties.temperature; this.rainfall = properties.rainfall; this.waterColor = properties.waterColor; this.enableSnow = properties.enableSnow; this.enableRain = properties.enableRain; this.baseBiomeRegName = properties.baseBiomeRegName; this.theBiomeDecorator = this.createBiomeDecorator(); this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntitySheep.class, 12, 4, 4)); this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityPig.class, 10, 4, 4)); this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityChicken.class, 10, 4, 4)); this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityCow.class, 8, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySpider.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityZombie.class, 95, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityZombieVillager.class, 5, 1, 1)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityCreeper.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySlime.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityEnderman.class, 10, 1, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityWitch.class, 5, 1, 1)); this.spawnableWaterCreatureList.add(new Biome.SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.spawnableCaveCreatureList.add(new Biome.SpawnListEntry(EntityBat.class, 10, 8, 8)); }
protected void rotateCorpse(EntitySquid entityLiving, float p_77043_2_, float p_77043_3_, float partialTicks) { float f = entityLiving.prevSquidPitch + (entityLiving.squidPitch - entityLiving.prevSquidPitch) * partialTicks; float f1 = entityLiving.prevSquidYaw + (entityLiving.squidYaw - entityLiving.prevSquidYaw) * partialTicks; GlStateManager.translate(0.0F, 0.5F, 0.0F); GlStateManager.rotate(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(f, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(f1, 0.0F, 1.0F, 0.0F); GlStateManager.translate(0.0F, -1.2F, 0.0F); }
public Biome(Biome.BiomeProperties properties) { this.biomeName = properties.biomeName; this.baseHeight = properties.baseHeight; this.heightVariation = properties.heightVariation; this.temperature = properties.temperature; this.rainfall = properties.rainfall; this.waterColor = properties.waterColor; this.enableSnow = properties.enableSnow; this.enableRain = properties.enableRain; this.baseBiomeRegName = properties.baseBiomeRegName; this.theBiomeDecorator = this.createBiomeDecorator(); this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntitySheep.class, 12, 4, 4)); this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityPig.class, 10, 4, 4)); this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityChicken.class, 10, 4, 4)); this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityCow.class, 8, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySpider.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityZombie.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityCreeper.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySlime.class, 100, 4, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityEnderman.class, 10, 1, 4)); this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityWitch.class, 5, 1, 1)); this.spawnableWaterCreatureList.add(new Biome.SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.spawnableCaveCreatureList.add(new Biome.SpawnListEntry(EntityBat.class, 10, 8, 8)); this.addDefaultFlowers(); }
@Override public void onUpdate(PossessivePlayer possessivePlayer, EntityPlayer player) { EntitySquid squid = (EntitySquid) possessivePlayer.getPossessing(); if (squid.squidRotation > Math.PI * 2.0) { if (squid.worldObj.isRemote) { squid.squidRotation = 0.0F; } } }
private Entity findTarget() { Iterator iter = worldObj.loadedEntityList.iterator(); Entity target = null; double priority = 0; while(iter.hasNext()) { Entity e = (Entity) iter.next(); if (e != this && !e.isDead && (!(e instanceof EntityLivingBase) || ((EntityLivingBase)e).getHealth()>0) && (!(e instanceof EntityRhodes) || (RivalRebels.rhodesFF && (RivalRebels.rhodesCC || ((EntityRhodes)e).colorType != colorType))) && !( e instanceof EntityThrowable || e instanceof EntityInanimate || e instanceof EntityItem || e instanceof EntityAnimal || e instanceof EntityVillager || e instanceof EntityBat || e instanceof EntitySquid || e instanceof EntityBoat || e instanceof EntityMinecart)) { double prio = getPriority(e)-getDistanceToEntity(e); if (prio > priority) { target = e; priority = prio; } } } return target; }
public Spawner() { biomeList = new ArrayList(); try { Field afield[] = (BiomeGenBase.class).getDeclaredFields(); LinkedList linkedlist = new LinkedList(); for (int j = 0; j < afield.length; j++) { Class class1 = afield[j].getType(); if ((afield[j].getModifiers() & 8) != 0 && class1.isAssignableFrom(BiomeGenBase.class)) { BiomeGenBase biomegenbase = (BiomeGenBase) afield[j].get(null); biomeList.add(biomegenbase.biomeName); if (!(biomegenbase instanceof BiomeGenHell) && !(biomegenbase instanceof BiomeGenEnd)) { linkedlist.add(biomegenbase); } } } standardBiomes = (BiomeGenBase[]) linkedlist.toArray(new BiomeGenBase[0]); customCreatureSpawnList = new List[biomeList.size()]; customMobSpawnList = new List[biomeList.size()]; customAquaticSpawnList = new List[biomeList.size()]; entityClasses = new List[3]; vanillaClassList = new ArrayList<Class>(); vanillaClassList.add(EntityChicken.class); vanillaClassList.add(EntityCow.class); vanillaClassList.add(EntityPig.class); vanillaClassList.add(EntitySheep.class); vanillaClassList.add(EntityWolf.class); vanillaClassList.add(EntitySquid.class); clearLists(); } catch (IllegalAccessException exception) { throw new RuntimeException(exception); } }
public final int despawnVanillaAnimals(World worldObj) { int count = 0; for (int j = 0; j < worldObj.loadedEntityList.size(); j++) { Entity entity = (Entity) worldObj.loadedEntityList.get(j); if ((entity instanceof EntityLiving) && (entity instanceof EntityCow || entity instanceof EntitySheep || entity instanceof EntityPig || entity instanceof EntityChicken || entity instanceof EntitySquid || entity instanceof EntityWolf)) { count += entityDespawnCheck(worldObj, (EntityLiving) entity); } } return count; }
@SubscribeEvent public void onLivingDropsEvent(LivingDropsEvent event) { if (event.entityLiving instanceof EntityVillager) { if (!((EntityVillager)event.entityLiving).isChild()) { // 75% chance to drop the heart LogHelper.info("DragonPlayerEventHandler: Villager died!"); if (event.entity.worldObj.rand.nextInt(4) < 3) { LogHelper.info("DragonPlayerEventHandler: Villager dropped a heart!"); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, new ItemStack(ModItems.villagerHeart))); } // 25% chance to drop the skull if (event.entity.worldObj.rand.nextInt(4) == 0) { LogHelper.info("DragonPlayerEventHandler: Villager dropped a skull!"); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, new ItemStack(ModItems.villagerSkull))); } } } else if (event.entityLiving instanceof EntitySquid) { // 50% chance to drop the meat LogHelper.info("DragonPlayerEventHandler: Squid died!"); if (event.entity.worldObj.rand.nextInt(2) == 0) { LogHelper.info("DragonPlayerEventHandler: Squid dropped food!"); event.drops.add(new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, new ItemStack(ModItems.squid, event.entity.worldObj.rand.nextInt(2) + 1))); } } }
public Config() { mobs = new ArrayList<Entity>(Arrays.asList(new Entity[]{ new Entity(EntityBat.class), new Entity(EntityChicken.class), new Entity(EntityCow.class), new Entity(EntityHorse.class), new Entity(EntityMooshroom.class), new Entity(EntityOcelot.class), new Entity(EntityPig.class), new Entity(EntityRabbit.class), new Entity(EntitySheep.class), new Entity(EntitySquid.class), new Entity(EntityVillager.class), new Entity(EntityWolf.class), new Entity(EntityBlaze.class), new Entity(EntityCaveSpider.class), new Entity(EntityCreeper.class), new Entity(EntityEnderman.class), new Entity(EntityGhast.class), new Entity(EntityGolem.class), new Entity(EntityGuardian.class), new Entity(EntityIronGolem.class), new Entity(EntityMagmaCube.class), new Entity(EntityPigZombie.class), new Entity(EntitySilverfish.class), new Entity(EntitySkeleton.class), new Entity(EntitySlime.class), new Entity(EntitySnowman.class), new Entity(EntitySpider.class), new Entity(EntityWitch.class), new Entity(EntityZombie.class), new Entity(EntityItem.class), new Entity(EntityMinecart.class), new Entity(EntityPlayer.class) })); }
@SuppressWarnings("MethodMayBeStatic") @SubscribeEvent public void onCheckSpawn(CheckSpawn event) { if (event.entity.worldObj.isRemote) return; if (event.entity instanceof EntityBat || event.entity instanceof EntitySquid) { event.setResult(limitSpawn(event.entity)); } }
protected BiomeGenBase(int par1) { this.topBlock = Blocks.grass; this.field_150604_aj = 0; this.fillerBlock = Blocks.dirt; this.field_76754_C = 5169201; this.minHeight = field_150596_a.field_150777_a; this.maxHeight = field_150596_a.field_150776_b; this.temperature = 0.5F; this.rainfall = 0.5F; this.waterColorMultiplier = 16777215; this.spawnableMonsterList = new ArrayList(); this.spawnableCreatureList = new ArrayList(); this.spawnableWaterCreatureList = new ArrayList(); this.spawnableCaveCreatureList = new ArrayList(); this.enableRain = true; this.worldGeneratorTrees = new WorldGenTrees(false); this.worldGeneratorBigTree = new WorldGenBigTree(false); this.worldGeneratorSwamp = new WorldGenSwamp(); this.biomeID = par1; biomeList[par1] = this; this.theBiomeDecorator = this.createBiomeDecorator(); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1)); this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8)); }
protected void rotateCorpse(EntitySquid par1EntitySquid, float par2, float par3, float par4) { float var5 = par1EntitySquid.prevSquidPitch + (par1EntitySquid.squidPitch - par1EntitySquid.prevSquidPitch) * par4; float var6 = par1EntitySquid.prevSquidYaw + (par1EntitySquid.squidYaw - par1EntitySquid.prevSquidYaw) * par4; GL11.glTranslatef(0.0F, 0.5F, 0.0F); GL11.glRotatef(180.0F - par3, 0.0F, 1.0F, 0.0F); GL11.glRotatef(var5, 1.0F, 0.0F, 0.0F); GL11.glRotatef(var6, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(0.0F, -1.2F, 0.0F); }
public EntityLargeCroc(World world) { super(world); float scaleFactor = 1.6f; setSize(1.0F * scaleFactor, 0.6F * scaleFactor); setHealth(25); targetTasks.addTask(5, new EntityAINearestAttackableTarget<>(this, EntitySquid.class, false)); targetTasks.addTask(6, new EntityAINearestAttackableTarget<>(this, EntitySpider.class, false)); }
public BiomeGenBase(int p_i1971_1_, boolean register) { this.topBlock = Blocks.grass; this.field_150604_aj = 0; this.fillerBlock = Blocks.dirt; this.field_76754_C = 5169201; this.rootHeight = height_Default.rootHeight; this.heightVariation = height_Default.variation; this.temperature = 0.5F; this.rainfall = 0.5F; this.waterColorMultiplier = 16777215; this.spawnableMonsterList = new ArrayList(); this.spawnableCreatureList = new ArrayList(); this.spawnableWaterCreatureList = new ArrayList(); this.spawnableCaveCreatureList = new ArrayList(); this.enableRain = true; this.worldGeneratorTrees = new WorldGenTrees(false); this.worldGeneratorBigTree = new WorldGenBigTree(false); this.worldGeneratorSwamp = new WorldGenSwamp(); this.biomeID = p_i1971_1_; if (register) biomeList[p_i1971_1_] = this; this.theBiomeDecorator = this.createBiomeDecorator(); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySheep.class, 12, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityPig.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityChicken.class, 10, 4, 4)); this.spawnableCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityCow.class, 8, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySpider.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityZombie.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySkeleton.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityCreeper.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySlime.class, 100, 4, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityEnderman.class, 10, 1, 4)); this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 5, 1, 1)); this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8)); this.addDefaultFlowers(); }
protected void rotateCorpse(EntitySquid p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) { float f3 = p_77043_1_.prevSquidPitch + (p_77043_1_.squidPitch - p_77043_1_.prevSquidPitch) * p_77043_4_; float f4 = p_77043_1_.prevSquidYaw + (p_77043_1_.squidYaw - p_77043_1_.prevSquidYaw) * p_77043_4_; GL11.glTranslatef(0.0F, 0.5F, 0.0F); GL11.glRotatef(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F); GL11.glRotatef(f3, 1.0F, 0.0F, 0.0F); GL11.glRotatef(f4, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(0.0F, -1.2F, 0.0F); }
public BiomeGenLava(int id){ super(id); this.theBiomeDecorator.treesPerChunk = 5; this.theBiomeDecorator.grassPerChunk = 20; this.theBiomeDecorator.bigMushroomsPerChunk = 20; this.theBiomeDecorator.cactiPerChunk = 10; this.theBiomeDecorator.sandPerChunk = 50; this.theBiomeDecorator.reedsPerChunk = 10; this.theBiomeDecorator.clayPerChunk = 20; this.theBiomeDecorator.deadBushPerChunk = 10; this.theBiomeDecorator.flowersPerChunk = 40; this.theBiomeDecorator.generateLakes = true; this.theBiomeDecorator.mushroomsPerChunk = 10; this.spawnableCreatureList.add(new SpawnListEntry(EntityBat.class, 10, 2, 10)); this.spawnableCreatureList.add(new SpawnListEntry(EntitySlime.class, 10, 2, 10)); this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityPig.class, 10, 2, 10)); this.spawnableCaveCreatureList.add(new SpawnListEntry(EntitySheep.class, 10, 2, 10)); this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityCow.class, 10, 2, 10)); this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityChicken.class, 10, 2, 10)); this.spawnableWaterCreatureList.add(new SpawnListEntry(EntitySquid.class, 10, 2, 10)); this.topBlock =Blocks.grass; this.fillerBlock = Blocks.lava; }
public BiomeGenBase(int p_i1971_1_) { this.field_76752_A = (byte)Block.field_71980_u.field_71990_ca; this.field_76753_B = (byte)Block.field_71979_v.field_71990_ca; this.field_76754_C = 5169201; this.field_76748_D = 0.1F; this.field_76749_E = 0.3F; this.field_76750_F = 0.5F; this.field_76751_G = 0.5F; this.field_76759_H = 16777215; this.field_76761_J = new ArrayList(); this.field_76762_K = new ArrayList(); this.field_76755_L = new ArrayList(); this.field_82914_M = new ArrayList(); this.field_76765_S = true; this.field_76757_N = new WorldGenTrees(false); this.field_76758_O = new WorldGenBigTree(false); this.field_76764_P = new WorldGenForest(false); this.field_76763_Q = new WorldGenSwamp(); this.field_76756_M = p_i1971_1_; field_76773_a[p_i1971_1_] = this; this.field_76760_I = this.func_76729_a(); this.field_76762_K.add(new SpawnListEntry(EntitySheep.class, 12, 4, 4)); this.field_76762_K.add(new SpawnListEntry(EntityPig.class, 10, 4, 4)); this.field_76762_K.add(new SpawnListEntry(EntityChicken.class, 10, 4, 4)); this.field_76762_K.add(new SpawnListEntry(EntityCow.class, 8, 4, 4)); this.field_76761_J.add(new SpawnListEntry(EntitySpider.class, 10, 4, 4)); this.field_76761_J.add(new SpawnListEntry(EntityZombie.class, 10, 4, 4)); this.field_76761_J.add(new SpawnListEntry(EntitySkeleton.class, 10, 4, 4)); this.field_76761_J.add(new SpawnListEntry(EntityCreeper.class, 10, 4, 4)); this.field_76761_J.add(new SpawnListEntry(EntitySlime.class, 10, 4, 4)); this.field_76761_J.add(new SpawnListEntry(EntityEnderman.class, 1, 1, 4)); this.field_76755_L.add(new SpawnListEntry(EntitySquid.class, 10, 4, 4)); this.field_82914_M.add(new SpawnListEntry(EntityBat.class, 10, 8, 8)); }
protected void func_77122_a(EntitySquid p_77122_1_, float p_77122_2_, float p_77122_3_, float p_77122_4_) { float var5 = p_77122_1_.field_70862_e + (p_77122_1_.field_70861_d - p_77122_1_.field_70862_e) * p_77122_4_; float var6 = p_77122_1_.field_70860_g + (p_77122_1_.field_70859_f - p_77122_1_.field_70860_g) * p_77122_4_; GL11.glTranslatef(0.0F, 0.5F, 0.0F); GL11.glRotatef(180.0F - p_77122_3_, 0.0F, 1.0F, 0.0F); GL11.glRotatef(var5, 1.0F, 0.0F, 0.0F); GL11.glRotatef(var6, 0.0F, 1.0F, 0.0F); GL11.glTranslatef(0.0F, -1.2F, 0.0F); }