本文整理汇总了Java中codechicken.lib.vec.Vector3.vec3方法的典型用法代码示例。如果您正苦于以下问题:Java Vector3.vec3方法的具体用法?Java Vector3.vec3怎么用?Java Vector3.vec3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类codechicken.lib.vec.Vector3
的用法示例。
在下文中一共展示了Vector3.vec3方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: vecBBDamageSegment
import codechicken.lib.vec.Vector3; //导入方法依赖的package包/类
private void vecBBDamageSegment(Vector3 start, Vector3 end, ArrayList<Entity> entitylist) {
Vec3d start3D = start.vec3();
Vec3d end3D = end.vec3();
for (Iterator<Entity> iterator = entitylist.iterator(); iterator.hasNext(); ) {
Entity entity = iterator.next();
if (entity instanceof EntityLivingBase &&
(entity.getEntityBoundingBox().isVecInside(start3D) || entity.getEntityBoundingBox().isVecInside(end3D))) {
if (entity instanceof EntityPlayer)
entity.attackEntityFrom(WirelessRedstone.damageBolt, playerdamage);
else
entity.attackEntityFrom(WirelessRedstone.damageBolt, entitydamage);
ether.jamEntity((EntityLivingBase) entity, true);
}
}
}
示例2: DistanceRayTraceResult
import codechicken.lib.vec.Vector3; //导入方法依赖的package包/类
public DistanceRayTraceResult(Entity entity, Vector3 hit, Object data, double dist) {
super(entity, hit.vec3());
setData(data);
this.dist = dist;
}
示例3: getCorrectedHeadVec
import codechicken.lib.vec.Vector3; //导入方法依赖的package包/类
public static Vec3d getCorrectedHeadVec(EntityPlayer player) {
Vector3 v = Vector3.fromEntity(player).add(0, player.getEyeHeight(), 0);
return v.vec3();
}