@Override public void apply(World world, BlockPos pos, EntityLivingBase entity, int amplifier, int tick) { if (amplifier >= 3) { if (entity instanceof EntityWitch) { entity.setFire(500); entity.attackEntityFrom(DamageSource.MAGIC, 20); } else if (entity.getCreatureAttribute() == EnumCreatureAttribute.ILLAGER) { entity.addPotionEffect(new PotionEffect(MobEffects.WITHER, 1500, 0)); entity.attackEntityFrom(DamageSource.MAGIC, 20); } } else if (amplifier == 2 && entity.getCreatureAttribute() == EnumCreatureAttribute.ILLAGER || entity instanceof EntityWitch) { entity.attackEntityFrom(DamageSource.MAGIC, 16); } else if (entity.getCreatureAttribute() == EnumCreatureAttribute.ILLAGER) { entity.attackEntityFrom(DamageSource.MAGIC, 10); } }
/** * Called when a lightning bolt hits the entity. */ public void onStruckByLightning(EntityLightningBolt lightningBolt) { if (!this.worldObj.isRemote && !this.isDead) { EntityWitch entitywitch = new EntityWitch(this.worldObj); entitywitch.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); entitywitch.onInitialSpawn(this.worldObj.getDifficultyForLocation(new BlockPos(entitywitch)), (IEntityLivingData)null); entitywitch.setNoAI(this.isAIDisabled()); if (this.hasCustomName()) { entitywitch.setCustomNameTag(this.getCustomNameTag()); entitywitch.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag()); } this.worldObj.spawnEntityInWorld(entitywitch); this.setDead(); } }
/** * Called when a lightning bolt hits the entity. */ public void onStruckByLightning(EntityLightningBolt lightningBolt) { if (!this.world.isRemote && !this.isDead) { EntityWitch entitywitch = new EntityWitch(this.world); entitywitch.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); entitywitch.onInitialSpawn(this.world.getDifficultyForLocation(new BlockPos(entitywitch)), (IEntityLivingData)null); entitywitch.setNoAI(this.isAIDisabled()); if (this.hasCustomName()) { entitywitch.setCustomNameTag(this.getCustomNameTag()); entitywitch.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag()); } this.world.spawnEntityInWorld(entitywitch); this.setDead(); } }
public EntityGiaprey(World worldIn) { super(worldIn, 1, 1); this.setSize(1.5F, 1.8125F); setBaseHealth(11); setBaseAttack(2); setBaseSpeed(0.3); setBaseKnockback(0.1); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask( 4, new EntityAIAttackMeleeAndSpit(this, 1.0D, 200, 16.0f,4.0f, true)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
public EntityGendrome(World worldIn) { super(worldIn, Config.scaleMin*0.75f, Config.scaleMax*0.75f); this.setSize(2.25F, 2.5F); setBaseHealth(300); setBaseAttack(2*1.5); setBaseSpeed(0.3*1.5); setBaseKnockback(0.5*1.5); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
public EntityJaggia(World worldIn) { super(worldIn, 1, 1, Items.FISH); this.setSize(1.5F, 1.8125F); setBaseHealth(12); setBaseAttack(2); setBaseSpeed(0.3); setBaseKnockback(0.1); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
public EntityGenprey(World worldIn) { super(worldIn, 1, 1); this.setSize(1.5F, 1.8125F); setBaseHealth(12); setBaseAttack(2); setBaseSpeed(0.3); setBaseKnockback(0.1); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
public EntityVelocidrome(World worldIn) { super(worldIn, Config.scaleMin*0.75f, Config.scaleMax*0.75f); this.setSize(2.25F, 2.5F); setBaseHealth(300); setBaseAttack(2*1.5); setBaseSpeed(0.3*1.5); setBaseKnockback(0.5*1.5); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
public EntityIoprey(World worldIn) { super(worldIn, 1, 1); this.setSize(1.5F, 1.8125F); setBaseHealth(15); setBaseAttack(2); setBaseSpeed(0.3); setBaseKnockback(0.1); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask( 4, new EntityAIAttackMeleeAndSpit(this, 1.0D, 200, 16.0f,4.0f, true)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
public EntityJaggi(World worldIn) { super(worldIn, 1, 1, Items.FISH); this.setSize(1.0F, 1.0F); setBaseHealth(9); setBaseAttack(2); setBaseSpeed(0.3); setBaseKnockback(0.1); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
public EntityGreatJaggi(World worldIn) { super(worldIn, Config.scaleMin*0.75f, Config.scaleMax*0.75f); this.setSize(2.25F, 2.5F); setBaseHealth(390); setBaseAttack(2*1.5); setBaseSpeed(0.3*1.5); setBaseKnockback(0.5*1.5); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
public EntityVelociprey(World worldIn) { super(worldIn, 1,1); this.setSize(1.5F, 1.8125F); setBaseHealth(10); setBaseAttack(2); setBaseSpeed(0.3); setBaseKnockback(0.1); this.tasks.addTask(1, new EntityAILeapAtTarget(this,0.5f)); this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityAnimal.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWitch.class, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityMHHerbivore.class, true)); }
@SubscribeEvent public void onLivingDrops(LivingDropsEvent event) { debug("drop"); float dropChance = 0.0f; if (event.entityLiving instanceof EntityMob) { debug("drop1"); dropChance = 0.2f; if (event.entityLiving instanceof EntityWitch) { debug("drop2"); dropChance = 1.0f; } } dropChance *= (event.lootingLevel + 1); if (rng.nextFloat() < dropChance) { debug("dropping"); event.entityLiving.worldObj.spawnEntityInWorld(new EntityItem( event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, new ItemStack(ingredient, 1, 9))); } }
public BiomeGenCandy(int id){ super(id); this.theBiomeDecorator.treesPerChunk = 6; this.theBiomeDecorator.grassPerChunk = 2; this.theBiomeDecorator.mushroomsPerChunk = 1; setDisableRain(); setHeight(new BiomeGenBase.Height(1.5F, 0.5F)); this.spawnableCreatureList.clear(); this.spawnableCreatureList.add(new SpawnListEntry(EntityPeep.class, 10, 4, 4)); this.spawnableCreatureList.add(new SpawnListEntry(EntityUnicorn.class, 10, 4, 4)); this.spawnableCreatureList.add(new SpawnListEntry(EntityCandySheep.class, 10, 4, 4)); this.spawnableMonsterList.clear(); this.spawnableMonsterList.add(new SpawnListEntry(EntityCalavera.class, 100, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityZombie.class, 100, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityGingerbread.class, 100, 4, 6)); this.spawnableMonsterList.add(new SpawnListEntry(EntityCreeper.class, 100, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntitySpider.class, 100, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4)); BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(this, Config.candyWeight)); BiomeDictionary.registerBiomeType(this, BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.LUSH); setBiomeName("Rock Candy Mountain"); setColor(0x8AFFF0); this.waterColorMultiplier = 0x899CFF; }
public BiomeGenSpooky(int id) { super(id); this.spawnableCreatureList.clear(); this.theBiomeDecorator.treesPerChunk = 10; this.theBiomeDecorator.grassPerChunk = 2; this.theBiomeDecorator.mushroomsPerChunk = 1; this.spawnableCreatureList.clear(); this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 10, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4)); this.spawnableMonsterList.add(new SpawnListEntry(EntityFrankenstein.class, 90, 4, 4)); BiomeManager.addBiome(BiomeManager.BiomeType.COOL, new BiomeEntry(this, Config.spookyWeight)); BiomeManager.addStrongholdBiome(this); BiomeDictionary.registerBiomeType(this, Type.SPOOKY, Type.MAGICAL, Type.FOREST); setBiomeName("Spooky Forest"); setTemperatureRainfall(0.25F, 0.5F); setColor(0xF2A100); this.waterColorMultiplier = 0x970E0E; }
private static void init() { addDrop(EntityCreeper.class, SkillBase.armorBreak); addDrop(EntityIronGolem.class, SkillBase.armorBreak); addDrop(EntitySilverfish.class, SkillBase.dash); addDrop(EntityHorse.class, SkillBase.dash); addDrop(EntityEnderman.class, SkillBase.dodge); addDrop(EntityKeese.class, SkillBase.dodge); addDrop(EntitySpider.class, SkillBase.endingBlow); addDrop(EntityCaveSpider.class, SkillBase.leapingBlow); addDrop(EntityMagmaCube.class, SkillBase.leapingBlow); addDrop(EntityPigZombie.class, SkillBase.parry); addDrop(EntityOcelot.class, SkillBase.parry); addDrop(EntityOctorok.class, SkillBase.risingCut); addDrop(EntityBlaze.class, SkillBase.spinAttack); addDrop(EntityDarknut.class, SkillBase.spinAttack); addDrop(EntityZombie.class, SkillBase.swordBasic); addDrop(EntitySkeleton.class, SkillBase.swordBasic); addDrop(EntityGhast.class, SkillBase.swordBeam); addDrop(EntityWitch.class, SkillBase.swordBeam); addDrop(EntityWizzrobe.class, SkillBase.swordBreak); }
public MagicBiomeGen(int id) { super(id); this.setHeight(new Height(-0.1f,0.2f)); this.setColor(0xDB14AD); this.setTemperatureRainfall(0.5F, 0.9F); this.waterColorMultiplier = 0xDB14AD; this.theBiomeDecorator.bigMushroomsPerChunk = 1; this.theBiomeDecorator.flowersPerChunk = 10; this.theBiomeDecorator.grassPerChunk = 1; this.theBiomeDecorator.treesPerChunk = 0; this.theBiomeDecorator.sandPerChunk = -999; this.theBiomeDecorator.sandPerChunk2 = -999; this.theBiomeDecorator.mushroomsPerChunk = 10; this.biomeName = "Magic Forest"; this.spawnableCreatureList.clear(); this.spawnableCreatureList.add(new SpawnListEntry(EntityPiggycorn.class,20,2,6)); this.spawnableCreatureList.add(new SpawnListEntry(EntityPig.class,10,1,10)); this.spawnableCreatureList.add(new SpawnListEntry(EntityCow.class,5,5,7)); this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class,3,1,2)); //this.theBiomeDecorator }
public static void addDefaultEntries(){ PneumaticRegistry.getInstance().addHackable(Blocks.tnt, HackableTNT.class); PneumaticRegistry.getInstance().addHackable(Blocks.mob_spawner, HackableMobSpawner.class); PneumaticRegistry.getInstance().addHackable(Blocks.lever, HackableLever.class); PneumaticRegistry.getInstance().addHackable(Blocks.stone_button, HackableButton.class); PneumaticRegistry.getInstance().addHackable(Blocks.wooden_button, HackableButton.class); PneumaticRegistry.getInstance().addHackable(Blocks.wooden_door, HackableDoor.class); PneumaticRegistry.getInstance().addHackable(Blocks.tripwire_hook, HackableTripwire.class); PneumaticRegistry.getInstance().addHackable(Blocks.dispenser, HackableDispenser.class); PneumaticRegistry.getInstance().addHackable(Blocks.dropper, HackableDispenser.class); PneumaticRegistry.getInstance().addHackable(Blockss.securityStation, HackableSecurityStation.class); PneumaticRegistry.getInstance().addHackable(Blocks.monster_egg, HackableTripwire.class); PneumaticRegistry.getInstance().addHackable(Blocks.noteblock, HackableNoteblock.class); PneumaticRegistry.getInstance().addHackable(Blocks.jukebox, HackableJukebox.class); PneumaticRegistry.getInstance().addHackable(EntityCreeper.class, HackableCreeper.class); PneumaticRegistry.getInstance().addHackable(EntityTameable.class, HackableTameable.class); PneumaticRegistry.getInstance().addHackable(EntityCow.class, HackableCow.class); PneumaticRegistry.getInstance().addHackable(EntityCaveSpider.class, HackableCaveSpider.class); PneumaticRegistry.getInstance().addHackable(EntityBlaze.class, HackableBlaze.class); PneumaticRegistry.getInstance().addHackable(EntityGhast.class, HackableGhast.class); PneumaticRegistry.getInstance().addHackable(EntityWitch.class, HackableWitch.class); PneumaticRegistry.getInstance().addHackable(EntityLiving.class, HackableLivingDisarm.class); PneumaticRegistry.getInstance().addHackable(EntityEnderman.class, HackableEnderman.class); PneumaticRegistry.getInstance().addHackable(EntityBat.class, HackableBat.class); }
@Override public boolean afterHackTick(Entity entity) { if (entity instanceof EntityWitch) { ((EntityWitch) entity).potionUseTimer = 20; ((EntityWitch) entity).setDrinkingPotion(true); return true; } else { PneumaticCraftRepressurized.logger.error("something's wrong: found HackableWitch hack on " + entity); return false; } }
/** * Destroys Witch Potions that are currently in the protected area * Only destroys the EntityPotion if it was thrown by an EntityWitch or derivatives * @param chunkBounds AxisAlignedBB in which block should act */ private void killPotions(AxisAlignedBB chunkBounds) { List<EntityPotion> list = world.getEntitiesWithinAABB(EntityPotion.class, chunkBounds); for (EntityPotion potion : list) { if (potion.getThrower() instanceof EntityWitch) { potion.setDead(); } } }
/** * Destroys Witch Potions that are currently in the protected area * Only destroys the EntityPotion if it was thrown by an EntityWitch or derivatives * @param areaBounds AxisAlignedBB in which block should act */ private void killPotions(AxisAlignedBB areaBounds) { List<EntityPotion> list = world.getEntitiesWithinAABB(EntityPotion.class, areaBounds); for (EntityPotion potion : list) { if (potion.getThrower() instanceof EntityWitch) { potion.setDead(); } } }
@Override public void onFinish(EntityPlayer player, IRitualHandler tile, World world, BlockPos pos, NBTTagCompound data) { if (!world.isRemote) { EntityWitch witch = new EntityWitch(world); witch.setLocationAndAngles(pos.getX(), pos.getY(), pos.getZ(), (float) (Math.random() * 360), 0); witch.onInitialSpawn(world.getDifficultyForLocation(new BlockPos(witch)), (IEntityLivingData) null); world.spawnEntity(witch); if (Math.random() < 0.1) witch.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 6000, 2, false, false)); } }
@Override public boolean apply(EntityPlayer player) { for (int i = 0; i < 10; i++) { BlockPos pos = new BlockPos(player.posX + player.getRNG().nextGaussian() * 4, player.posY, player.posZ + player.getRNG().nextGaussian() * 4); EntityWitch witch = new EntityWitch(player.world); if (player.world.isAirBlock(pos) && player.world.isAirBlock(pos.up()) && player.world.getBlockState(pos.down()).canEntitySpawn(witch)) { witch.setPosition(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5); witch.onInitialSpawn(player.world.getDifficultyForLocation(pos), null); player.world.spawnEntity(witch); //Calm down Satan if (player.getRNG().nextBoolean() && player.getRNG().nextBoolean()) witch.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 900, 1)); if (player.getRNG().nextBoolean() && player.getRNG().nextBoolean()) witch.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 900, 1)); if (player.getRNG().nextBoolean() && player.getRNG().nextBoolean()) witch.addPotionEffect(new PotionEffect(MobEffects.SPEED, 900, 1)); if (player.getRNG().nextBoolean() && player.getRNG().nextBoolean()) witch.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 900, 1)); if (player.getRNG().nextBoolean() && player.getRNG().nextBoolean()) witch.addPotionEffect(new PotionEffect(MobEffects.WATER_BREATHING, 900, 1)); if (player.getRNG().nextBoolean() && player.getRNG().nextBoolean()) witch.addPotionEffect(new PotionEffect(MobEffects.INVISIBILITY, 900, 1)); if (player.getRNG().nextBoolean() && player.getRNG().nextBoolean()) witch.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 900, 1)); return true; } } return false; }
@SubscribeEvent public static void onLivingDrops(LivingDropsEvent event) { if (event.getEntity() != null && event.getEntity() instanceof EntityWitch) { //NotebookInfo info = ev.getEntityPlayer().getCapability(NotebookInfo.CAP, null); if (event.getEntity().world.rand.nextInt(2) == 1) { event.getDrops().add(new EntityItemFancy(event.getEntity().world, event.getEntity().posX, event.getEntity().posY, event.getEntity().posZ, new ItemStack(ModRegistry.ANCIENT_PARCHMENT))); } } }
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)); }
public MapGenScatteredFeature() { this.scatteredFeatureSpawnList = Lists.<BiomeGenBase.SpawnListEntry>newArrayList(); this.maxDistanceBetweenScatteredFeatures = 32; this.minDistanceBetweenScatteredFeatures = 8; this.scatteredFeatureSpawnList.add(new BiomeGenBase.SpawnListEntry(EntityWitch.class, 1, 1, 1)); }
@SubscribeEvent public void entityStruckByLightning(EntityStruckByLightningEvent event) { if (EtFuturum.enableVillagerTurnsIntoWitch && event.entity instanceof EntityVillager) { EntityVillager villager = (EntityVillager) event.entity; if (!villager.worldObj.isRemote) { EntityWitch witch = new EntityWitch(villager.worldObj); witch.copyLocationAndAnglesFrom(villager); witch.onSpawnWithEgg(null); villager.worldObj.spawnEntityInWorld(witch); villager.setDead(); } } }
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)); }
public MapGenScatteredFeature() { this.scatteredFeatureSpawnList = Lists.<Biome.SpawnListEntry>newArrayList(); this.maxDistanceBetweenScatteredFeatures = 32; this.minDistanceBetweenScatteredFeatures = 8; this.scatteredFeatureSpawnList.add(new Biome.SpawnListEntry(EntityWitch.class, 1, 1, 1)); }