本文整理了Java中net.minecraft.entity.Entity.getCollisionBorderSize()
方法的一些代码示例,展示了Entity.getCollisionBorderSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.getCollisionBorderSize()
方法的具体详情如下:
包路径:net.minecraft.entity.Entity
类名称:Entity
方法名:getCollisionBorderSize
暂无
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
private static double getDistanceToCollidedEntity(Entity entity, Vec3d startVector, Vec3d endVector) {
float borderSize = entity.getCollisionBorderSize();
AxisAlignedBB entBB = entity.getEntityBoundingBox().grow((double) borderSize, (double) borderSize, (double) borderSize);
RayTraceResult rayTraceResult = entBB.calculateIntercept(startVector, endVector);
return rayTraceResult != null ? startVector.distanceTo(rayTraceResult.hitVec) : Double.MAX_VALUE;
}
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
Entity pointedEntity = null;
for (Entity entity : list) {
AxisAlignedBB axisalignedbb = entity.getEntityBoundingBox().grow((double) entity.getCollisionBorderSize());
RayTraceResult raytraceresult = axisalignedbb.calculateIntercept(positionEyes, vec3d2);
代码示例来源:origin: Alex-the-666/Ice_and_Fire
for (int j = 0; j < list.size(); ++j) {
Entity entity1 = (Entity) list.get(j);
AxisAlignedBB axisalignedbb = entity1.getEntityBoundingBox().grow((double) entity1.getCollisionBorderSize() + 2F);
RayTraceResult raytraceresult = axisalignedbb.calculateIntercept(vec3d, vec3d2);
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
AxisAlignedBB entityBb = ent.getEntityBoundingBox();
if (entityBb != null) {
float entBorder = ent.getCollisionBorderSize();
intercept = entityBb.expand(entBorder, entBorder, entBorder).calculateIntercept(startVec, endVec);
if (intercept != null) {
代码示例来源:origin: Alex-the-666/Ice_and_Fire
for (int j = 0; j < list.size(); ++j) {
Entity entity1 = (Entity) list.get(j);
AxisAlignedBB axisalignedbb = entity1.getEntityBoundingBox().grow((double) entity1.getCollisionBorderSize());
RayTraceResult raytraceresult = axisalignedbb.calculateIntercept(vec3d, vec3d2);
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
for (Entity testEntity : entitiesPossiblyHitByVector) {
if (testEntity.canBeCollidedWith()) {
float bbExpansionSize = testEntity.getCollisionBorderSize();
AxisAlignedBB entityBB = testEntity.getEntityBoundingBox().expand(bbExpansionSize, bbExpansionSize, bbExpansionSize);
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
float f2 = entity.getCollisionBorderSize();
AxisAlignedBB axisalignedbb = entity.getEntityBoundingBox().expand((double) f2, (double) f2, (double) f2);
RayTraceResult movingobjectposition = axisalignedbb.calculateIntercept(Vec3d, Vec3d2);
代码示例来源:origin: Vazkii/Psi
float collisionBorderSize = entity.getCollisionBorderSize();
AxisAlignedBB hitbox = entity.getEntityBoundingBox().grow(collisionBorderSize, collisionBorderSize, collisionBorderSize);
RayTraceResult interceptPosition = hitbox.calculateIntercept(positionVector, reachVector);
代码示例来源:origin: SquidDev-CC/plethora
double closestDistance = range;
for (Entity entityHit : entityList) {
float size = entityHit.getCollisionBorderSize();
AxisAlignedBB box = entityHit.getEntityBoundingBox().grow((double) size, (double) size, (double) size);
RayTraceResult intercept = box.calculateIntercept(origin, target);
代码示例来源:origin: Mine-and-blade-admin/Battlegear2
double f2 = entity.getCollisionBorderSize();
AxisAlignedBB axisalignedbb = entity.getEntityBoundingBox().expandXyz(f2);
RayTraceResult movingobjectposition = axisalignedbb.calculateIntercept(vec3, vec32);
代码示例来源:origin: jabelar/ExampleMod-1.12
float bordersize = entity.getCollisionBorderSize();
AxisAlignedBB aabb = new AxisAlignedBB(entity.posX - entity.width / 2, entity.posY, entity.posZ - entity.width / 2,
entity.posX + entity.width / 2, entity.posY + entity.height, entity.posZ + entity.width / 2);
内容来源于网络,如有侵权,请联系作者删除!