net.minecraft.entity.monster.EntitySpider Java Examples
The following examples show how to use
net.minecraft.entity.monster.EntitySpider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MoCreatures.java From mocreaturesdev with GNU General Public License v3.0 | 6 votes |
public static void ClearVanillaMobSpawns() { for (int i = 0; i < BiomeGenBase.biomeList.length; i++) { if (BiomeGenBase.biomeList[i] != null) { EntityRegistry.removeSpawn(EntityCreeper.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntitySkeleton.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityZombie.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntitySpider.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityEnderman.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityCaveSpider.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntitySlime.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityGhast.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityPigZombie.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityMagmaCube.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); EntityRegistry.removeSpawn(EntityOcelot.class, EnumCreatureType.monster, BiomeGenBase.biomeList[i]); } } }
Example #2
Source File: Chickenificator.java From CommunityMod with GNU Lesser General Public License v2.1 | 5 votes |
@SuppressWarnings("deprecation") @Override public void onInit(FMLInitializationEvent event) { FMLLog.log.info("Chickenification is beginning..."); //RenderingRegistry.registerEntityRenderingHandler(EntitySheep.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntityCow.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntityPig.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntitySquid.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntityZombie.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntitySpider.class, new RenderStupidChicken()); RenderingRegistry.registerEntityRenderingHandler(EntitySkeleton.class, new RenderStupidChicken()); FMLLog.log.info("Chickenificated all the bois!"); }
Example #3
Source File: EntityOwl.java From EnderZoo with Creative Commons Zero v1.0 Universal | 5 votes |
public EntityOwl(World worldIn) { super(worldIn); setSize(0.4F, 0.85F); stepHeight = 1.0F; int pri = 0; tasks.addTask(++pri, new EntityAIFlyingPanic(this, 2)); tasks.addTask(++pri, new EntityAIFlyingAttackOnCollide(this, 2.5, false)); tasks.addTask(++pri, new EntityAIMate(this, 1.0)); tasks.addTask(++pri, new EntityAITempt(this, 1.0D, Items.SPIDER_EYE, false)); tasks.addTask(++pri, new EntityAIFollowParent(this, 1.5)); tasks.addTask(++pri, new EntityAIFlyingLand(this, 2)); tasks.addTask(++pri, new EntityAIFlyingFindPerch(this, 2, 80)); tasks.addTask(++pri, new EntityAIFlyingShortWander(this, 2, 150)); tasks.addTask(++pri, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); tasks.addTask(++pri, new EntityAILookIdle(this)); EntityAINearestAttackableTargetBounded<EntitySpider> targetSpiders = new EntityAINearestAttackableTargetBounded<EntitySpider>(this, EntitySpider.class, true, true); targetSpiders.setMaxDistanceToTarget(12); targetSpiders.setMaxVerticalDistanceToTarget(24); targetTasks.addTask(0, targetSpiders); moveHelper = new FlyingMoveHelper(this); timeUntilNextEgg = getNextLayingTime(); }
Example #4
Source File: EntityOwl.java From EnderZoo with Creative Commons Zero v1.0 Universal | 5 votes |
@Override public boolean attackEntityAsMob(Entity entityIn) { super.attackEntityAsMob(entityIn); float attackDamage = (float) getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue(); if (entityIn instanceof EntitySpider) { attackDamage *= Config.owlSpiderDamageMultiplier; } return entityIn.attackEntityFrom(DamageSource.causeMobDamage(this), attackDamage); }
Example #5
Source File: HackableCaveSpider.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public void onHackFinished(Entity entity, EntityPlayer player){ entity.setDead(); EntitySpider spider = new EntitySpider(entity.worldObj); spider.setPositionAndRotation(entity.posX, entity.posY, entity.posZ, entity.rotationYaw, entity.rotationPitch); spider.setHealth(((EntitySpider)entity).getHealth()); spider.renderYawOffset = ((EntitySpider)entity).renderYawOffset; entity.worldObj.spawnEntityInWorld(spider); }
Example #6
Source File: CraftSpider.java From Kettle with GNU General Public License v3.0 | 4 votes |
public CraftSpider(CraftServer server, EntitySpider entity) { super(server, entity); }
Example #7
Source File: CraftSpider.java From Kettle with GNU General Public License v3.0 | 4 votes |
@Override public EntitySpider getHandle() { return (EntitySpider) entity; }
Example #8
Source File: BlockFluidWitchwater.java From ExNihiloAdscensio with MIT License | 4 votes |
@Override public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity entity) { if (world.isRemote) return; if (entity.isDead) return; if (entity instanceof EntitySkeleton) { EntitySkeleton skeleton = (EntitySkeleton) entity; if (skeleton.getSkeletonType() == SkeletonType.NORMAL) { skeleton.setSkeletonType(SkeletonType.WITHER); skeleton.setHealth(skeleton.getMaxHealth()); return; } } if (entity instanceof EntityCreeper) { EntityCreeper creeper = (EntityCreeper) entity; if (!creeper.getPowered()) { creeper.onStruckByLightning(null); creeper.setHealth(creeper.getMaxHealth()); return; } } if (entity instanceof EntitySpider && !(entity instanceof EntityCaveSpider)) { EntitySpider spider = (EntitySpider) entity; spider.setDead(); EntityCaveSpider caveSpider = new EntityCaveSpider(world); caveSpider.setLocationAndAngles(spider.posX, spider.posY, spider.posZ, spider.rotationYaw, spider.rotationPitch); caveSpider.renderYawOffset = spider.renderYawOffset; caveSpider.setHealth(caveSpider.getMaxHealth()); world.spawnEntity(caveSpider); return; } if (entity instanceof EntitySquid) { EntitySquid squid = (EntitySquid) entity; squid.setDead(); EntityGhast ghast = new EntityGhast(world); ghast.setLocationAndAngles(squid.posX, squid.posY, squid.posZ, squid.rotationYaw, squid.rotationPitch); ghast.renderYawOffset = squid.renderYawOffset; ghast.setHealth(ghast.getMaxHealth()); world.spawnEntity(ghast); return; } if (entity instanceof EntityAnimal) { ((EntityAnimal) entity).onStruckByLightning(null); return; } if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 210, 0)); player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 210, 2)); player.addPotionEffect(new PotionEffect(MobEffects.WITHER, 210, 0)); player.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 210, 0)); } }