本文整理匯總了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);
}