本文整理汇总了Java中net.minecraft.entity.EntityFlying类的典型用法代码示例。如果您正苦于以下问题:Java EntityFlying类的具体用法?Java EntityFlying怎么用?Java EntityFlying使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EntityFlying类属于net.minecraft.entity包,在下文中一共展示了EntityFlying类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: instanceOf
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public boolean instanceOf(EntityType e) {
// Generic types and players
if (e.equals(EntityType.ENTITY_PLAYER_SP)) {
return entity instanceof EntityPlayerSP;
} else if (e.equals(EntityType.ENTITY_PLAYER)) {
return entity instanceof EntityPlayer;
} else if (e.equals(EntityType.ENTITY_LIVING_BASE)) {
return entity instanceof EntityLivingBase;
} else if (e.equals(EntityType.ENTITY_LIVING)) {
return entity instanceof EntityLiving;
}
// Mobs
if (e.equals(EntityType.ENTITY_WOLF)) {
return entity instanceof EntityWolf;
} else if (e.equals(EntityType.Entity_Ageable)) {
return entity instanceof EntityAgeable;
} else if (e.equals(EntityType.EntityAmbientCreature)) {
return entity instanceof EntityAmbientCreature;
} else if (e.equals(EntityType.EntityWaterMob)) {
return entity instanceof EntityWaterMob;
} else if (e.equals(EntityType.EntityMob)) {
return entity instanceof EntityMob;
} else if (e.equals(EntityType.EntitySlime)) {
return entity instanceof EntitySlime;
} else if (e.equals(EntityType.EntityFlying)) {
return entity instanceof EntityFlying;
} else if (e.equals(EntityType.EntityGolem)) {
return entity instanceof EntityGolem;
} else if (e.equals(EntityType.ENTITY_SPIDER)) {
return entity instanceof EntitySpider;
} else if (e.equals(EntityType.ENTITY_SPIDER)) {
return entity instanceof EntitySpider;
} else if (e.equals(EntityType.ENTITY_ZOMBIE_PIGMAN)) {
return entity instanceof EntityZombie;
} else if (e.equals(EntityType.ENTITY_ENDERMAN)) {
return entity instanceof EntityEnderman;
}
return false;
}
示例2: onPreInit
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public static void onPreInit() {
PossessHandler.registerHandler(new BlazeHandler());
PossessHandler.registerHandler(new ChickenHandler());
PossessHandler.registerHandler(new CreeperHandler());
PossessHandler.registerHandler(new DragonHandler());
PossessHandler.registerHandler(new EndermanHandler());
PossessHandler.registerHandler(new FlyingHandler(EntityFlying.class, new ResourceLocation(Possessed.MODID, "flying")));
PossessHandler.registerHandler(new FlyingHandler(EntityBat.class, new ResourceLocation(Possessed.MODID, "bat_flying")));
PossessHandler.registerHandler(new FlyingHandler(EntityBlaze.class, new ResourceLocation(Possessed.MODID, "blaze_flying")));
PossessHandler.registerHandler(new GhastHandler());
PossessHandler.registerHandler(new GrassEatHandler(EntityCow.class, new ResourceLocation(Possessed.MODID, "cow_grass")));
PossessHandler.registerHandler(new GrassEatHandler(EntityChicken.class, new ResourceLocation(Possessed.MODID, "chicken_grass")));
PossessHandler.registerHandler(new GrassEatHandler(EntityPig.class, new ResourceLocation(Possessed.MODID, "pig_grass")));
PossessHandler.registerHandler(new GrassEatHandler(EntityHorse.class, new ResourceLocation(Possessed.MODID, "horse_grass")));
PossessHandler.registerHandler(new GuardianHandler());
PossessHandler.registerHandler(new IronGolemHandler());
PossessHandler.registerHandler(new OcelotHandler());
PossessHandler.registerHandler(new PolarBearHandler());
PossessHandler.registerHandler(new RabbitHandler());
PossessHandler.registerHandler(new SheepHandler());
PossessHandler.registerHandler(new ShulkerHandler());
PossessHandler.registerHandler(new SkeletonHandler());
PossessHandler.registerHandler(new SlimeHandler());
PossessHandler.registerHandler(new SnowmanHandler());
PossessHandler.registerHandler(new SpiderHandler());
PossessHandler.registerHandler(new SquidHandler());
PossessHandler.registerHandler(new WaterMobHandler());
PossessHandler.registerHandler(new WitherHandler());
PossessHandler.registerHandler(new ZombieHandler());
}
示例3: attackEntity
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
@Override
protected void attackEntity(Entity entity, float f) {
if (attackTime <= 0 && f < ( tamed() ? 2.5F : 2.0F )
&& ( ( entity.boundingBox.maxY > boundingBox.minY
&& entity.boundingBox.minY < boundingBox.maxY )
|| f == 0F )) {
attackTime = 20;
if (flymode() && canFlap() && scout()
&& entity instanceof EntityLivingBase && ridingEntity == null
&& riddenByEntity == null && entity.ridingEntity == null
&& entity.riddenByEntity == null
&& !( entity instanceof EntityFairy
|| entity instanceof EntityFlying )) {
// Scout's Totally Leet Air Attack.
FairyFactions.proxy.sendFairyMount(this, entity);
setFlymode(true);
flyTime = 200;
setCanFlap(true);
attackTime = 35;
} else {
if (scout() && ridingEntity != null && entity != null
&& entity == ridingEntity) {
// The finish of its air attack.
FairyFactions.proxy.sendFairyMount(this, entity);
attackTime = 35;
}
// normal boring strike.
doAttack(entity);
}
}
}
示例4: AILookAround
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public AILookAround(EntityFlying ufo)
{
this.parentEntity = ufo;
}
示例5: FlyMoveHelper
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public FlyMoveHelper(EntityFlying ufo)
{
super(ufo);
this.parentEntity = ufo;
}
示例6: AIRandomFly
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public AIRandomFly(EntityFlying ufo)
{
this.parentEntity = ufo;
}
示例7: AIRandomFly
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public AIRandomFly(EntityFlying entity)
{
this.parentEntity = entity;
this.setMutexBits(1);
}
示例8: CraftFlying
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public CraftFlying(CraftServer server, EntityFlying entity) {
super(server, entity);
}
示例9: getHandle
import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
@Override
public EntityFlying getHandle() {
return (EntityFlying) entity;
}