当前位置: 首页>>代码示例>>Java>>正文


Java EntityFlying类代码示例

本文整理汇总了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;
}
 
开发者ID:Moudoux,项目名称:EMC,代码行数:40,代码来源:IEntity.java

示例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());
}
 
开发者ID:Fararise,项目名称:Possessed,代码行数:31,代码来源:PossessHandler.java

示例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);
		}
	}
}
 
开发者ID:allaryin,项目名称:FairyFactions,代码行数:34,代码来源:EntityFairy.java

示例4: AILookAround

import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public AILookAround(EntityFlying ufo)
{
    this.parentEntity = ufo;
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:5,代码来源:AILookAround.java

示例5: FlyMoveHelper

import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public FlyMoveHelper(EntityFlying ufo)
{
    super(ufo);
    this.parentEntity = ufo;
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:6,代码来源:FlyMoveHelper.java

示例6: AIRandomFly

import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public AIRandomFly(EntityFlying ufo)
{
    this.parentEntity = ufo;
}
 
开发者ID:Herobone,项目名称:HeroUtils,代码行数:5,代码来源:AIRandomFly.java

示例7: AIRandomFly

import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public AIRandomFly(EntityFlying entity)
{
    this.parentEntity = entity;
    this.setMutexBits(1);
}
 
开发者ID:BenjaminSutter,项目名称:genera,代码行数:6,代码来源:EntityFaerie.java

示例8: CraftFlying

import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
public CraftFlying(CraftServer server, EntityFlying entity) {
    super(server, entity);
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:4,代码来源:CraftFlying.java

示例9: getHandle

import net.minecraft.entity.EntityFlying; //导入依赖的package包/类
@Override
public EntityFlying getHandle() {
    return (EntityFlying) entity;
}
 
开发者ID:UraniumMC,项目名称:Uranium,代码行数:5,代码来源:CraftFlying.java


注:本文中的net.minecraft.entity.EntityFlying类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。