mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 06:40:05 +03:00
51 lines
1.7 KiB
Diff
51 lines
1.7 KiB
Diff
--- ../src-base/minecraft/net/minecraft/util/math/RayTraceResult.java
|
|
+++ ../src-work/minecraft/net/minecraft/util/math/RayTraceResult.java
|
|
@@ -5,20 +5,26 @@
|
|
|
|
public class RayTraceResult
|
|
{
|
|
+ /** Used to determine what sub-segment is hit */
|
|
+ public int subHit = -1;
|
|
+
|
|
+ /** Used to add extra hit info */
|
|
+ public Object hitInfo = null;
|
|
+
|
|
private BlockPos blockPos;
|
|
- public RayTraceResult.Type typeOfHit;
|
|
+ public Type typeOfHit;
|
|
public EnumFacing sideHit;
|
|
public Vec3d hitVec;
|
|
public Entity entityHit;
|
|
|
|
public RayTraceResult(Vec3d hitVecIn, EnumFacing sideHitIn, BlockPos blockPosIn)
|
|
{
|
|
- this(RayTraceResult.Type.BLOCK, hitVecIn, sideHitIn, blockPosIn);
|
|
+ this(Type.BLOCK, hitVecIn, sideHitIn, blockPosIn);
|
|
}
|
|
|
|
public RayTraceResult(Vec3d hitVecIn, EnumFacing sideHitIn)
|
|
{
|
|
- this(RayTraceResult.Type.BLOCK, hitVecIn, sideHitIn, BlockPos.ORIGIN);
|
|
+ this(Type.BLOCK, hitVecIn, sideHitIn, BlockPos.ORIGIN);
|
|
}
|
|
|
|
public RayTraceResult(Entity entityIn)
|
|
@@ -26,7 +32,7 @@
|
|
this(entityIn, new Vec3d(entityIn.posX, entityIn.posY, entityIn.posZ));
|
|
}
|
|
|
|
- public RayTraceResult(RayTraceResult.Type typeIn, Vec3d hitVecIn, EnumFacing sideHitIn, BlockPos blockPosIn)
|
|
+ public RayTraceResult(Type typeIn, Vec3d hitVecIn, EnumFacing sideHitIn, BlockPos blockPosIn)
|
|
{
|
|
this.typeOfHit = typeIn;
|
|
this.blockPos = blockPosIn;
|
|
@@ -36,7 +42,7 @@
|
|
|
|
public RayTraceResult(Entity entityHitIn, Vec3d hitVecIn)
|
|
{
|
|
- this.typeOfHit = RayTraceResult.Type.ENTITY;
|
|
+ this.typeOfHit = Type.ENTITY;
|
|
this.entityHit = entityHitIn;
|
|
this.hitVec = hitVecIn;
|
|
}
|