本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}