本文整理汇总了Java中micdoodle8.mods.galacticraft.core.util.WorldUtil.getGravityFactor方法的典型用法代码示例。如果您正苦于以下问题:Java WorldUtil.getGravityFactor方法的具体用法?Java WorldUtil.getGravityFactor怎么用?Java WorldUtil.getGravityFactor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类micdoodle8.mods.galacticraft.core.util.WorldUtil
的用法示例。
在下文中一共展示了WorldUtil.getGravityFactor方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: jump
import micdoodle8.mods.galacticraft.core.util.WorldUtil; //导入方法依赖的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 micdoodle8.mods.galacticraft.core.util.WorldUtil; //导入方法依赖的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 micdoodle8.mods.galacticraft.core.util.WorldUtil; //导入方法依赖的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 micdoodle8.mods.galacticraft.core.util.WorldUtil; //导入方法依赖的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 micdoodle8.mods.galacticraft.core.util.WorldUtil; //导入方法依赖的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: render
import micdoodle8.mods.galacticraft.core.util.WorldUtil; //导入方法依赖的package包/类
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
// super.render(entity, f, f1, f2, f3, f4, f5);
this.saveGravity = WorldUtil.getGravityFactor(entity);
this.setRotationAngles(f, f1, f2, f3, f4, f5);
if (this.isChild)
{
float f6 = 2.0F;
GL11.glPushMatrix();
GL11.glScalef(1.5F / f6, 1.5F / f6, 1.5F / f6);
GL11.glTranslatef(0.0F, 16.0F * f5, 0.0F);
this.bipedHead.render(f5);
if (this.renderGear) this.oxygenMask.render(f5);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(1.0F / f6, 1.0F / f6, 1.0F / f6);
GL11.glTranslatef(0.0F, 24.0F * f5, 0.0F);
if (this.renderGear)
{
this.leftOxygenTank.render(f5);
this.rightOxygenTank.render(f5);
this.tubeRight2.render(f5);
this.tubeLeft1.render(f5);
this.tubeRight3.render(f5);
this.tubeRight4.render(f5);
this.tubeRight5.render(f5);
this.tubeLeft6.render(f5);
this.tubeRight7.render(f5);
this.tubeRight1.render(f5);
this.tubeLeft2.render(f5);
this.tubeLeft3.render(f5);
this.tubeLeft4.render(f5);
this.tubeLeft5.render(f5);
this.tubeLeft7.render(f5);
this.tubeRight6.render(f5);
this.tubeLeft8.render(f5);
}
this.bipedBody.render(f5);
this.bipedRightArm.render(f5);
this.bipedLeftArm.render(f5);
this.bipedRightLeg.render(f5);
this.bipedLeftLeg.render(f5);
this.bipedHeadwear.render(f5);
GL11.glPopMatrix();
}
else
{
if (this.renderGear)
{
this.leftOxygenTank.render(f5);
this.rightOxygenTank.render(f5);
this.tubeRight2.render(f5);
this.tubeLeft1.render(f5);
this.tubeRight3.render(f5);
this.tubeRight4.render(f5);
this.tubeRight5.render(f5);
this.tubeLeft6.render(f5);
this.tubeRight7.render(f5);
this.tubeRight1.render(f5);
this.tubeLeft2.render(f5);
this.tubeLeft3.render(f5);
this.tubeLeft4.render(f5);
this.tubeLeft5.render(f5);
this.tubeLeft7.render(f5);
this.tubeRight6.render(f5);
this.tubeLeft8.render(f5);
this.oxygenMask.render(f5);
}
this.bipedHead.render(f5);
this.bipedBody.render(f5);
this.bipedRightArm.render(f5);
this.bipedLeftArm.render(f5);
this.bipedRightLeg.render(f5);
this.bipedLeftLeg.render(f5);
this.bipedHeadwear.render(f5);
}
}