本文整理匯總了Java中net.minecraft.entity.item.EntityBoat.getRowingTime方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityBoat.getRowingTime方法的具體用法?Java EntityBoat.getRowingTime怎麽用?Java EntityBoat.getRowingTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.entity.item.EntityBoat
的用法示例。
在下文中一共展示了EntityBoat.getRowingTime方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: renderPaddle
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
protected void renderPaddle(EntityBoat boat, int paddle, float scale, float limbSwing)
{
float f = 40.0F;
float f1 = boat.getRowingTime(paddle, limbSwing) * 40.0F;
ModelRenderer modelrenderer = this.paddles[paddle];
modelrenderer.rotateAngleX = (float)MathHelper.clampedLerp(-1.0471975803375244D, -0.2617993950843811D, (double)((MathHelper.sin(-f1) + 1.0F) / 2.0F));
modelrenderer.rotateAngleY = (float)MathHelper.clampedLerp(-(Math.PI / 4D), (Math.PI / 4D), (double)((MathHelper.sin(-f1 + 1.0F) + 1.0F) / 2.0F));
if (paddle == 1)
{
modelrenderer.rotateAngleY = (float)Math.PI - modelrenderer.rotateAngleY;
}
modelrenderer.render(scale);
}
示例2: renderPaddle
import net.minecraft.entity.item.EntityBoat; //導入方法依賴的package包/類
void renderPaddle(EntityBoat boat, int paddle, float scale, float limbSwing)
{
float f = 40.0F;
float f1 = boat.getRowingTime(paddle, limbSwing) * 40.0F;
ModelRenderer modelrenderer = this.paddles[paddle];
modelrenderer.rotateAngleX = (float)MathHelper.denormalizeClamp(-1.0471975803375244D, -0.2617993950843811D, (double)((MathHelper.sin(-f1) + 1.0F) / 2.0F));
modelrenderer.rotateAngleY = (float)MathHelper.denormalizeClamp(-(Math.PI / 4D), (Math.PI / 4D), (double)((MathHelper.sin(-f1 + 1.0F) + 1.0F) / 2.0F));
if (paddle == 1)
{
modelrenderer.rotateAngleY = (float)Math.PI - modelrenderer.rotateAngleY;
}
modelrenderer.render(scale);
}