本文整理了Java中net.minecraft.entity.Entity.setRotationYawHead()
方法的一些代码示例,展示了Entity.setRotationYawHead()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.setRotationYawHead()
方法的具体详情如下:
包路径:net.minecraft.entity.Entity
类名称:Entity
方法名:setRotationYawHead
暂无
代码示例来源:origin: SleepyTrousers/EnderIO
if (!worldIn.isRemote) {
if (rand.nextFloat() < .50f) {
entityIn.setRotationYawHead(rand.nextFloat());
代码示例来源:origin: JurassiCraftTeam/JurassiCraft2
@Override
public void updatePassenger(Entity passenger) {
if (this.isPassenger(passenger)) {
Seat seat = null;
if (getSeatForEntity(passenger) != -1)
seat = this.seats[getSeatForEntity(passenger)];
Vec3d pos;
if (seat == null) {
pos = new Vec3d(this.posX, this.posY + this.height, this.posZ);
} else {
pos = seat.getPos();
}
passenger.setPosition(pos.x, pos.y, pos.z);
passenger.rotationYaw += this.rotationDelta;
passenger.setRotationYawHead(passenger.getRotationYawHead() + this.rotationDelta);
if (passenger instanceof EntityLivingBase) {
EntityLivingBase living = (EntityLivingBase) passenger;
living.renderYawOffset += (living.rotationYaw - living.renderYawOffset) * 0.6F;
}
}
}
代码示例来源:origin: JurassiCraftTeam/JurassiCraft2
@Override
public void updatePassenger(Entity passenger) {
if (this.isPassenger(passenger)) {
Seat seat = null;
if (getSeatForEntity(passenger) != -1)
seat = this.seats[getSeatForEntity(passenger)];
Vec3d pos;
if (seat == null) {
pos = new Vec3d(this.posX, this.posY + this.height, this.posZ);
} else {
pos = seat.getPos();
}
passenger.setPosition(pos.x, pos.y + this.interpRotationPitch.getCurrent() / 75D, pos.z);
passenger.rotationYaw += this.rotationDelta;
passenger.setRotationYawHead(passenger.getRotationYawHead() + this.rotationDelta);
if (passenger instanceof EntityLivingBase) {
EntityLivingBase living = (EntityLivingBase) passenger;
living.renderYawOffset += (living.rotationYaw - living.renderYawOffset) * 0.6F;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!