本文整理汇总了Java中micdoodle8.mods.galacticraft.api.vector.Vector3.floatZ方法的典型用法代码示例。如果您正苦于以下问题:Java Vector3.floatZ方法的具体用法?Java Vector3.floatZ怎么用?Java Vector3.floatZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类micdoodle8.mods.galacticraft.api.vector.Vector3
的用法示例。
在下文中一共展示了Vector3.floatZ方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EntityFXEntityOxygen
import micdoodle8.mods.galacticraft.api.vector.Vector3; //导入方法依赖的package包/类
public EntityFXEntityOxygen(World par1World, Vector3 position, Vector3 motion, Vector3 color)
{
super(par1World, position.x, position.y, position.z, motion.x, motion.y, motion.z);
this.motionX = motion.x;
this.motionY = motion.y;
this.motionZ = motion.z;
this.portalPosX = this.posX = position.x;
this.portalPosY = this.posY = position.y;
this.portalPosZ = this.posZ = position.z;
this.portalParticleScale = this.particleScale = 0.1F;
this.particleRed = color.floatX();
this.particleGreen = color.floatY();
this.particleBlue = color.floatZ();
this.particleMaxAge = (int) (Math.random() * 10.0D) + 40;
this.noClip = true;
this.setParticleTextureIndex((int) (Math.random() * 8.0D));
}
示例2: onUpdate
import micdoodle8.mods.galacticraft.api.vector.Vector3; //导入方法依赖的package包/类
public void onUpdate()
{
TileEntityShortRangeTelepad telepad1 = this.telepad.get();
if (telepad1 != null)
{
Vector3 color = telepad1.getParticleColor(this.rand, this.direction);
this.particleRed = color.floatX();
this.particleGreen = color.floatY();
this.particleBlue = color.floatZ();
}
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
float f = (float) this.particleAge / (float) this.particleMaxAge;
float f1 = f;
f = -f + f * f * 2.0F;
f = 1.0F - f;
this.posX = this.portalPosX + this.motionX * f;
this.posY = this.portalPosY + this.motionY * f + (1.0F - f1);
this.posZ = this.portalPosZ + this.motionZ * f;
if (this.particleAge++ >= this.particleMaxAge)
{
this.setDead();
}
}