public boolean func_70965_a(EntityDragonPart p_70965_1_, DamageSource p_70965_2_, float p_70965_3_) { if(p_70965_1_ != this.field_70986_h) { p_70965_3_ = p_70965_3_ / 4.0F + 1.0F; } float var4 = this.field_70177_z * 3.1415927F / 180.0F; float var5 = MathHelper.func_76126_a(var4); float var6 = MathHelper.func_76134_b(var4); this.field_70980_b = this.field_70165_t + (double)(var5 * 5.0F) + (double)((this.field_70146_Z.nextFloat() - 0.5F) * 2.0F); this.field_70981_c = this.field_70163_u + (double)(this.field_70146_Z.nextFloat() * 3.0F) + 1.0D; this.field_70978_d = this.field_70161_v - (double)(var6 * 5.0F) + (double)((this.field_70146_Z.nextFloat() - 0.5F) * 2.0F); this.field_70993_bI = null; if(p_70965_2_.func_76346_g() instanceof EntityPlayer || p_70965_2_.func_94541_c()) { this.func_82195_e(p_70965_2_, p_70965_3_); } return true; }
public Set<ComplexEntityPart> getParts() { Builder<ComplexEntityPart> builder = ImmutableSet.builder(); for (EntityDragonPart part : getHandle().dragonPartArray) { builder.add((ComplexEntityPart) part.getBukkitEntity()); } return builder.build(); }
/** * These entities are excluded from Activation range checks. * * @param entity * @param world * @return boolean If it should always tick. */ public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) { // Cauldron start - another fix for Proxy Worlds if (config == null && DimensionManager.getWorld(0) != null) { config = DimensionManager.getWorld(0).spigotConfig; } else { return true; } // Cauldron end if ( ( entity.activationType == 3 && config.miscActivationRange == 0 ) || ( entity.activationType == 2 && config.animalActivationRange == 0 ) || ( entity.activationType == 1 && config.monsterActivationRange == 0 ) || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron || entity instanceof EntityThrowable || entity instanceof EntityDragon || entity instanceof EntityDragonPart || entity instanceof EntityWither || entity instanceof EntityFireball || entity instanceof EntityWeatherEffect || entity instanceof EntityTNTPrimed || entity instanceof EntityEnderCrystal || entity instanceof EntityFireworkRocket || entity instanceof EntityVillager // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false) && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false) && !entity.isCreatureType(EnumCreatureType.waterCreature, false))) { return true; } return false; }
/** * Normally, just returns damage. If dragon is sitting and src is an arrow, arrow is enflamed and zero damage * returned. */ public float getAdjustedDamage(EntityDragonPart pt, DamageSource src, float damage) { if (src.getSourceOfDamage() instanceof EntityArrow) { src.getSourceOfDamage().setFire(1); return 0.0F; } else { return super.getAdjustedDamage(pt, src, damage); } }
/** * These entities are excluded from Activation range checks. * * @param entity * @param world * @return boolean If it should always tick. */ public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) { // Cauldron start - another fix for Proxy Worlds if (config == null && DimensionManager.getWorld(0) != null) { config = DimensionManager.getWorld(0).spigotConfig; } else { return true; } // Cauldron end if ( ( entity.activationType == 3 && config.miscActivationRange == 0 ) || ( entity.activationType == 2 && config.animalActivationRange == 0 ) || ( entity.activationType == 1 && config.monsterActivationRange == 0 ) || (entity instanceof EntityPlayer && !(entity instanceof FakePlayer)) // Cauldron || entity instanceof EntityThrowable || entity instanceof EntityDragon || entity instanceof EntityDragonPart || entity instanceof EntityWither || entity instanceof EntityFireball || entity instanceof EntityWeatherEffect || entity instanceof EntityTNTPrimed || entity instanceof EntityFallingBlock // PaperSpigot - Always tick falling blocks || entity instanceof EntityEnderCrystal || entity instanceof EntityFireworkRocket || entity instanceof EntityVillager // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false) && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false) && !entity.isCreatureType(EnumCreatureType.waterCreature, false))) { return true; } return false; }
/** * These entities are excluded from Activation range checks. * * @param entity * @param world * @return boolean If it should always tick. */ public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) { // Cauldron start - another fix for Proxy Worlds if (config == null && DimensionManager.getWorld(0) != null) { config = DimensionManager.getWorld(0).spigotConfig; } else { return true; } // Cauldron end if ( ( entity.activationType == 3 && config.miscActivationRange == 0 ) || ( entity.activationType == 2 && config.animalActivationRange == 0 ) || ( entity.activationType == 1 && config.monsterActivationRange == 0 ) || (entity.getClass().equals(EntityPlayer.class) && !(entity.getClass().equals(FakePlayer.class))) // Cauldron || entity.getClass().equals(EntityThrowable.class) || entity.getClass().equals(EntityDragon.class) || entity.getClass().equals(EntityDragonPart.class) || entity.getClass().equals(EntityWither.class) || entity.getClass().equals(EntityFireball.class) || entity.getClass().equals(EntityWeatherEffect.class) || entity.getClass().equals(EntityTNTPrimed.class) || entity.getClass().equals(EntityFallingBlock.class) || entity.getClass().equals(EntityEnderCrystal.class) || entity.getClass().equals(EntityFireworkRocket.class) || entity.getClass().equals(EntityVillager.class) // Cauldron start - force ticks for entities with superclass of Entity and not a creature/monster || (entity.getClass().getSuperclass() == Entity.class && !entity.isCreatureType(EnumCreatureType.creature, false) && !entity.isCreatureType(EnumCreatureType.ambient, false) && !entity.isCreatureType(EnumCreatureType.monster, false) && !entity.isCreatureType(EnumCreatureType.waterCreature, false))) { return true; } return false; }
public EntityDragon(World p_i1700_1_) { super(p_i1700_1_); this.field_70977_g = new EntityDragonPart[]{this.field_70986_h = new EntityDragonPart(this, "head", 6.0F, 6.0F), this.field_70987_i = new EntityDragonPart(this, "body", 8.0F, 8.0F), this.field_70985_j = new EntityDragonPart(this, "tail", 4.0F, 4.0F), this.field_70984_by = new EntityDragonPart(this, "tail", 4.0F, 4.0F), this.field_70982_bz = new EntityDragonPart(this, "tail", 4.0F, 4.0F), this.field_70983_bA = new EntityDragonPart(this, "wing", 4.0F, 4.0F), this.field_70990_bB = new EntityDragonPart(this, "wing", 4.0F, 4.0F)}; this.func_70606_j(this.func_110138_aP()); this.func_70105_a(16.0F, 8.0F); this.field_70145_X = true; this.field_70178_ae = true; this.field_70981_c = 100.0D; this.field_70158_ak = true; }
public CraftEnderDragonPart(CraftServer server, EntityDragonPart entity) { super(server, entity); }
@Override public EntityDragonPart getHandle() { return (EntityDragonPart) entity; }
public CraftComplexPart(CraftServer server, EntityDragonPart entity) { super(server, entity); }
private static boolean isEntityListed(Entity_AA turret, Entity entity) { if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; if (isNameOnWhitelist(turret, player.getDisplayName())) { return true; } // Not shooting at their friends either else if (isNameOnWhitelist(turret, "player")) { return true; } // Not shooting at players in general } // Creature specific whitelists else if (entity instanceof EntityVillager && isNameOnWhitelist(turret, "villager")) { return true; } else if (entity instanceof EntityChicken && isNameOnWhitelist(turret, "chicken")) { return true; } else if (entity instanceof EntityCow && isNameOnWhitelist(turret, "cow")) { return true; } else if (entity instanceof EntityHorse && isNameOnWhitelist(turret, "horse")) { return true; } else if (entity instanceof EntityMooshroom && isNameOnWhitelist(turret, "mooshroom")) { return true; } else if (entity instanceof EntityOcelot && isNameOnWhitelist(turret, "ocelot")) { return true; } else if (entity instanceof EntityPig && isNameOnWhitelist(turret, "pig")) { return true; } else if (entity instanceof EntitySheep && isNameOnWhitelist(turret, "sheep")) { return true; } else if (entity instanceof EntitySquid && isNameOnWhitelist(turret, "squid")) { return true; } else if (entity instanceof EntityWolf && isNameOnWhitelist(turret, "wolf")) { return true; } // Bosses else if (entity instanceof EntityDragon && isNameOnWhitelist(turret, "ender dragon")) { return true; } else if (entity instanceof EntityDragonPart && isNameOnWhitelist(turret, "ender dragon")) { return true; } else if (entity instanceof EntityWither && isNameOnWhitelist(turret, "wither")) { return true; } // Hostiles else if (entity instanceof EntityBlaze && isNameOnWhitelist(turret, "blaze")) { return true; } else if (entity instanceof EntityCaveSpider && isNameOnWhitelist(turret, "cave spider")) { return true; } else if (entity instanceof EntityCreeper && isNameOnWhitelist(turret, "creeper")) { return true; } else if (entity instanceof EntityEnderman && isNameOnWhitelist(turret, "enderman")) { return true; } else if (entity instanceof EntityGhast && isNameOnWhitelist(turret, "ghast")) { return true; } else if (entity instanceof EntityGiantZombie && isNameOnWhitelist(turret, "zombie")) { return true; } else if (entity instanceof EntityGolem && isNameOnWhitelist(turret, "golem")) { return true; } else if (entity instanceof EntityIronGolem && isNameOnWhitelist(turret, "iron golem")) { return true; } else if (entity instanceof EntityMagmaCube && isNameOnWhitelist(turret, "magma cube")) { return true; } else if (entity instanceof EntityPigZombie && isNameOnWhitelist(turret, "pig zombie")) { return true; } else if (entity instanceof EntitySilverfish && isNameOnWhitelist(turret, "silverfish")) { return true; } else if (entity instanceof EntitySkeleton && isNameOnWhitelist(turret, "skeleton")) { return true; } else if (entity instanceof EntitySlime && isNameOnWhitelist(turret, "slime")) { return true; } else if (entity instanceof EntitySnowman && isNameOnWhitelist(turret, "snow golem")) { return true; } else if (entity instanceof EntitySpider && isNameOnWhitelist(turret, "spider")) { return true; } else if (entity instanceof EntityWitch && isNameOnWhitelist(turret, "witch")) { return true; } else if (entity instanceof EntityZombie && isNameOnWhitelist(turret, "zombie")) { return true; } if (entity instanceof EntityLiving) // For things with custom names { EntityLiving living = (EntityLiving) entity; if (living.hasCustomNameTag()) { if (isNameOnWhitelist(turret, living.getCustomNameTag())) { return true; } } } return false; // Nope. Fire away! }
/** * Normally, just returns damage. If dragon is sitting and src is an arrow, arrow is enflamed and zero damage * returned. */ public float getAdjustedDamage(EntityDragonPart pt, DamageSource src, float damage) { return damage; }