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


Java ForgeHooks.onLivingJump方法代码示例

本文整理汇总了Java中net.minecraftforge.common.ForgeHooks.onLivingJump方法的典型用法代码示例。如果您正苦于以下问题:Java ForgeHooks.onLivingJump方法的具体用法?Java ForgeHooks.onLivingJump怎么用?Java ForgeHooks.onLivingJump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraftforge.common.ForgeHooks的用法示例。


在下文中一共展示了ForgeHooks.onLivingJump方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
@Override
protected void jump()
{
    this.motionY = 0.48D / WorldUtil.getGravityFactor(this);
    if (this.motionY < 0.28D) this.motionY = 0.28D;

    if (this.isPotionActive(Potion.jump))
    {
        this.motionY += (this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
    }

    if (this.isSprinting())
    {
        float f = this.rotationYaw * 0.017453292F;
        this.motionX -= MathHelper.sin(f) * 0.2F;
        this.motionZ += MathHelper.cos(f) * 0.2F;
    }

    this.isAirBorne = true;
    ForgeHooks.onLivingJump(this);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:22,代码来源:EntitySlimeling.java

示例2: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
@Override
protected void jump()
{
    this.motionY = 0.52D / WorldUtil.getGravityFactor(this);
    if (this.motionY < 0.26D) this.motionY = 0.26D;

    if (this.isPotionActive(Potion.jump))
    {
        this.motionY += (this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
    }

    if (this.isSprinting())
    {
        float f = this.rotationYaw * 0.017453292F;
        this.motionX -= MathHelper.sin(f) * 0.2F;
        this.motionZ += MathHelper.cos(f) * 0.2F;
    }

    this.isAirBorne = true;
    ForgeHooks.onLivingJump(this);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:22,代码来源:EntityEvolvedSpider.java

示例3: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
@Override
protected void jump()
{
    this.motionY = 0.45D / WorldUtil.getGravityFactor(this);
    if (this.motionY < 0.22D) this.motionY = 0.22D;

    if (this.isPotionActive(Potion.jump))
    {
        this.motionY += (this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
    }

    if (this.isSprinting())
    {
        float f = this.rotationYaw * 0.017453292F;
        this.motionX -= MathHelper.sin(f) * 0.2F;
        this.motionZ += MathHelper.cos(f) * 0.2F;
    }

    this.isAirBorne = true;
    ForgeHooks.onLivingJump(this);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:22,代码来源:EntityEvolvedCreeper.java

示例4: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
@Override
protected void jump()
{
    this.motionY = 0.48D / WorldUtil.getGravityFactor(this);
    if (this.motionY < 0.24D) this.motionY = 0.24D;

    if (this.isPotionActive(Potion.jump))
    {
        this.motionY += (this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
    }

    if (this.isSprinting())
    {
        float f = this.rotationYaw * 0.017453292F;
        this.motionX -= MathHelper.sin(f) * 0.2F;
        this.motionZ += MathHelper.cos(f) * 0.2F;
    }

    this.isAirBorne = true;
    ForgeHooks.onLivingJump(this);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:22,代码来源:EntityEvolvedZombie.java

示例5: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
@Override
protected void jump()
{
    this.motionY = 0.45D / WorldUtil.getGravityFactor(this);
    if (this.motionY < 0.24D) this.motionY = 0.24D;

    if (this.isPotionActive(Potion.jump))
    {
        this.motionY += (this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
    }

    if (this.isSprinting())
    {
        float f = this.rotationYaw * 0.017453292F;
        this.motionX -= MathHelper.sin(f) * 0.2F;
        this.motionZ += MathHelper.cos(f) * 0.2F;
    }

    this.isAirBorne = true;
    ForgeHooks.onLivingJump(this);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:22,代码来源:EntityEvolvedSkeleton.java

示例6: collideWithEntity

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
@Override
public void collideWithEntity(Entity entity) {
    super.collideWithEntity(entity);
    if (!(entity instanceof EntitySteelSheep)) {
        if (entity instanceof EntityLivingBase) {
            ((EntityLivingBase)entity).attackEntityFrom(steelSheep,0.5F);
            ((EntityLivingBase)entity).motionY = 0.41999998688697815D;

            if (((EntityLivingBase)entity).isPotionActive(Potion.jump))
            {
                ((EntityLivingBase)entity).motionY += (double)((float)(((EntityLivingBase)entity).getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
            }

            if (((EntityLivingBase)entity).isSprinting())
            {
                float f = ((EntityLivingBase)entity).rotationYaw * 0.017453292F;
                ((EntityLivingBase)entity).motionX -= (double)(MathHelper.sin(f) * 0.2F);
                ((EntityLivingBase)entity).motionZ += (double)(MathHelper.cos(f) * 0.2F);
            }

            ((EntityLivingBase)entity).isAirBorne = true;
            ForgeHooks.onLivingJump(((EntityLivingBase)entity));
        }
    }
}
 
开发者ID:Mitchellbrine,项目名称:SteelSheep,代码行数:26,代码来源:EntitySteelSheep.java

示例7: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
@Override
public void jump()
{
	float jumpHeight = isTitan ? 1.5F : 1.0F;
	this.motionY = 0.41999998688697815D * jumpHeight;

       if (this.isPotionActive(Potion.jump))
       {
           this.motionY += (double)((float)(this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
       }

       if (this.isSprinting())
       {
           float f = this.rotationYaw * 0.017453292F;
           this.motionX -= (double)(MathHelper.sin(f) * 0.2F);
           this.motionZ += (double)(MathHelper.cos(f) * 0.2F);
       }

       this.isAirBorne = true;
       ForgeHooks.onLivingJump(this);
}
 
开发者ID:TheAwesomeGem,项目名称:MineFantasy,代码行数:22,代码来源:EntityMinotaur.java

示例8: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
protected void jump()
{
    this.motionY = 0.41999998688697815D;

    if (this.isPotionActive(Potion.jump))
    {
        this.motionY += (double)((float)(this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
    }

    if (this.isSprinting())
    {
        float f = this.rotationYaw * 0.017453292F;
        this.motionX -= (double)(MathHelper.sin(f) * 0.2F);
        this.motionZ += (double)(MathHelper.cos(f) * 0.2F);
    }

    this.isAirBorne = true;
    ForgeHooks.onLivingJump(this);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:20,代码来源:EntityLivingBase.java

示例9: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
/**
 * Causes this entity to do an upwards motion (jumping).
 */
protected void jump()
{
    this.motionY = 0.41999998688697815D;

    if (this.isPotionActive(Potion.jump))
    {
        this.motionY += (double)((float)(this.getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F);
    }

    if (this.isSprinting())
    {
        float f = this.rotationYaw * 0.017453292F;
        this.motionX -= (double)(MathHelper.sin(f) * 0.2F);
        this.motionZ += (double)(MathHelper.cos(f) * 0.2F);
    }

    this.isAirBorne = true;
    ForgeHooks.onLivingJump(this);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:EntityLivingBase.java

示例10: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
protected void jump() {
	this.motionY = 0.4199999868869782D;
	if (isPotionActive(Potion.jump)) {
		this.motionY += (getActivePotionEffect(Potion.jump).getAmplifier() + 1) * 0.1F;
	}
	if (isSprinting()) {
		float f = this.rotationYaw * 0.01745329F;
		this.motionX -= MathHelper.sin(f) * 0.2F;
		this.motionZ += MathHelper.cos(f) * 0.2F;
	}
	this.isAirBorne = true;
	ForgeHooks.onLivingJump(this);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:14,代码来源:EntityLivingBase.java

示例11: jump

import net.minecraftforge.common.ForgeHooks; //导入方法依赖的package包/类
/**
    * Causes this entity to do an upwards motion (jumping).
    */
   @Override
protected void jump() {
       this.motionY = 0.84F + this.getSlimeSize() * 0.1F;
       this.isAirBorne = true;
       ForgeHooks.onLivingJump(this);
   }
 
开发者ID:sblectric,项目名称:LightningCraft,代码行数:10,代码来源:EntityUnderworldSlime.java


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