Java 类net.minecraft.entity.monster.EntityVex 实例源码

项目:Bewitchment    文件:BlockSaltBarrier.java   
@SuppressWarnings("deprecation")
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) {
    if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD)) {
        collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
    }
    if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD)) {
        entityIn.attackEntityFrom(DamageSource.MAGIC, 1);
    }
    if (entityIn instanceof EntityBlaze) {
        collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
    }
    if (entityIn instanceof EntityEnderman) {
        collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
    }
    if (entityIn instanceof EntityGhast) {
        collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
    }
    if (entityIn instanceof EntityVex) {
        collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
    }
}
项目:Backmemed    文件:EntityVillager.java   
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityEvoker.class, 12.0F, 0.8D, 0.8D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityVindicator.class, 8.0F, 0.8D, 0.8D));
    this.tasks.addTask(1, new EntityAIAvoidEntity(this, EntityVex.class, 8.0F, 0.6D, 0.6D));
    this.tasks.addTask(1, new EntityAITradePlayer(this));
    this.tasks.addTask(1, new EntityAILookAtTradePlayer(this));
    this.tasks.addTask(2, new EntityAIMoveIndoors(this));
    this.tasks.addTask(3, new EntityAIRestrictOpenDoor(this));
    this.tasks.addTask(4, new EntityAIOpenDoor(this, true));
    this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 0.6D));
    this.tasks.addTask(6, new EntityAIVillagerMate(this));
    this.tasks.addTask(7, new EntityAIFollowGolem(this));
    this.tasks.addTask(9, new EntityAIWatchClosest2(this, EntityPlayer.class, 3.0F, 1.0F));
    this.tasks.addTask(9, new EntityAIVillagerInteract(this));
    this.tasks.addTask(9, new EntityAIWanderAvoidWater(this, 0.6D));
    this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
}
项目:MineLittlePony    文件:MineLittlePony.java   
private void saveCurrentRenderers(RenderManager rm) {
    // villagers
    saveRenderer(rm, EntityVillager.class);
    saveRenderer(rm, EntityZombieVillager.class);
    // zombies
    saveRenderer(rm, EntityZombie.class);
    saveRenderer(rm, EntityHusk.class);
    // pig zombie
    saveRenderer(rm, EntityPigZombie.class);
    // skeletons
    saveRenderer(rm, EntitySkeleton.class);
    saveRenderer(rm, EntityStray.class);
    saveRenderer(rm, EntityWitherSkeleton.class);
    // illagers
    saveRenderer(rm, EntityVex.class);
    saveRenderer(rm, EntityEvoker.class);
    saveRenderer(rm, EntityVindicator.class);
    saveRenderer(rm, EntityIllusionIllager.class);
}
项目:Count-Armours    文件:EntityFairy.java   
@Override
public void onStruckByLightning(EntityLightningBolt lightningBolt) {
    if (!this.world.isRemote && !this.isDead) {
        EntityVex entityVex = new EntityVex(this.world);
        entityVex.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
        entityVex.onInitialSpawn(this.world.getDifficultyForLocation(new BlockPos(entityVex)), null);
        entityVex.setNoAI(this.isAIDisabled());

        if (this.hasCustomName()) {
            entityVex.setCustomNameTag(this.getCustomNameTag());
            entityVex.setAlwaysRenderNameTag(this.getAlwaysRenderNameTag());
        }

        this.world.spawnEntity(entityVex);
        this.setDead();
    }
}
项目:Backmemed    文件:RenderVex.java   
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityVex entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    int i = ((ModelVex)this.mainModel).func_191228_a();

    if (i != this.field_191345_k)
    {
        this.mainModel = new ModelVex();
        this.field_191345_k = i;
    }

    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
项目:Backmemed    文件:ModelVex.java   
/**
 * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
 * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
 * "far" arms and legs can swing at most.
 */
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
{
    super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
    EntityVex entityvex = (EntityVex)entityIn;

    if (entityvex.func_190647_dj())
    {
        if (entityvex.getPrimaryHand() == EnumHandSide.RIGHT)
        {
            this.bipedRightArm.rotateAngleX = 3.7699115F;
        }
        else
        {
            this.bipedLeftArm.rotateAngleX = 3.7699115F;
        }
    }

    this.bipedRightLeg.rotateAngleX += ((float)Math.PI / 5F);
    this.field_191230_b.rotationPointZ = 2.0F;
    this.field_191229_a.rotationPointZ = 2.0F;
    this.field_191230_b.rotationPointY = 1.0F;
    this.field_191229_a.rotationPointY = 1.0F;
    this.field_191230_b.rotateAngleY = 0.47123894F + MathHelper.cos(ageInTicks * 0.8F) * (float)Math.PI * 0.05F;
    this.field_191229_a.rotateAngleY = -this.field_191230_b.rotateAngleY;
    this.field_191229_a.rotateAngleZ = -0.47123894F;
    this.field_191229_a.rotateAngleX = 0.47123894F;
    this.field_191230_b.rotateAngleX = 0.47123894F;
    this.field_191230_b.rotateAngleZ = 0.47123894F;
}
项目:Backmemed    文件:ModelAdapterVex.java   
public ModelAdapterVex()
{
    super(EntityVex.class, "vex", 0.3F);
}
项目:Backmemed    文件:RenderVex.java   
/**
 * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
 */
protected ResourceLocation getEntityTexture(EntityVex entity)
{
    return entity.func_190647_dj() ? field_191344_j : field_191343_a;
}
项目:Backmemed    文件:RenderVex.java   
/**
 * Allows the render to do state modifications necessary before the model is rendered.
 */
protected void preRenderCallback(EntityVex entitylivingbaseIn, float partialTickTime)
{
    GlStateManager.scale(0.4F, 0.4F, 0.4F);
}
项目:MineLittlePony    文件:RenderPonyVex.java   
@Override
protected void preRenderCallback(EntityVex entitylivingbaseIn, float partialTickTime) {
    GlStateManager.scale(0.4F, 0.4F, 0.4F);
}
项目:MineLittlePony    文件:RenderPonyVex.java   
@Override
protected ResourceLocation getEntityTexture(EntityVex entity) {
    return entity.isCharging() ? VEX_CHARGING : VEX;
}
项目:MineLittlePony    文件:MineLittlePony.java   
public void initializeMobRenderers(RenderManager rm) {
    if (this.config.villagers) {
        ModUtilities.addRenderer(EntityVillager.class, new RenderPonyVillager(rm));
        ModUtilities.addRenderer(EntityZombieVillager.class, new RenderPonyZombieVillager(rm));
        logger.info("Villagers are now ponies.");
    } else {
        ModUtilities.addRenderer(EntityVillager.class, getRenderer(EntityVillager.class));
        ModUtilities.addRenderer(EntityZombieVillager.class, getRenderer(EntityZombieVillager.class));
    }

    if (this.config.zombies) {
        ModUtilities.addRenderer(EntityZombie.class, new RenderPonyZombie<>(rm));
        ModUtilities.addRenderer(EntityHusk.class, new RenderPonyZombie.Husk(rm));
        logger.info("Zombies are now ponies.");
    } else {
        ModUtilities.addRenderer(EntityZombie.class, getRenderer(EntityZombie.class));
        ModUtilities.addRenderer(EntityHusk.class, getRenderer(EntityHusk.class));
    }

    if (this.config.pigzombies) {
        ModUtilities.addRenderer(EntityPigZombie.class, new RenderPonyPigman(rm));
        logger.info("Zombie pigmen are now ponies.");
    } else {
        ModUtilities.addRenderer(EntityPigZombie.class, getRenderer(EntityPigZombie.class));
    }

    if (this.config.skeletons) {
        ModUtilities.addRenderer(EntitySkeleton.class, new RenderPonySkeleton<>(rm));
        ModUtilities.addRenderer(EntityStray.class, new RenderPonySkeleton.Stray(rm));
        ModUtilities.addRenderer(EntityWitherSkeleton.class, new RenderPonySkeleton.Wither(rm));
        logger.info("Skeletons are now ponies.");
    } else {
        ModUtilities.addRenderer(EntitySkeleton.class, getRenderer(EntitySkeleton.class));
        ModUtilities.addRenderer(EntityStray.class, getRenderer(EntityStray.class));
        ModUtilities.addRenderer(EntityWitherSkeleton.class, getRenderer(EntityWitherSkeleton.class));
    }

    if (this.config.illagers) {
        ModUtilities.addRenderer(EntityVex.class, new RenderPonyVex(rm));
        ModUtilities.addRenderer(EntityEvoker.class, new RenderPonyEvoker(rm));
        ModUtilities.addRenderer(EntityVindicator.class, new RenderPonyVindicator(rm));
        ModUtilities.addRenderer(EntityIllusionIllager.class, new RenderPonyIllusionIllager(rm));
        logger.info("Illagers are now ponies.");
    } else {
        ModUtilities.addRenderer(EntityVex.class, getRenderer(EntityVex.class));
        ModUtilities.addRenderer(EntityEvoker.class, getRenderer(EntityEvoker.class));
        ModUtilities.addRenderer(EntityVindicator.class, getRenderer(EntityVindicator.class));
        ModUtilities.addRenderer(EntityIllusionIllager.class, getRenderer(EntityIllusionIllager.class));
    }
}
项目:Hats    文件:HelperVex.java   
@Override
public Class helperForClass() 
{
    return EntityVex.class;
}