Skip to content

Commit 4bc9e8b

Browse files
committed
Attempt no2 to fix trace desync
1 parent 6712eec commit 4bc9e8b

File tree

1 file changed

+3
-2
lines changed
  • src/main/java/gregtech/api/graphnet/pipenet/physical/block

1 file changed

+3
-2
lines changed

src/main/java/gregtech/api/graphnet/pipenet/physical/block/PipeBlock.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ public boolean onBlockActivated(@NotNull World worldIn, @NotNull BlockPos pos, @
225225
if (tile.isBlocked(facing)) unblockTile(tile, other, facing);
226226
else blockTile(tile, other, facing);
227227
} else {
228+
if (worldIn.isRemote) return true;
228229
if (tile.isConnected(facing)) {
229230
ToolHelper.damageItem(item, playerIn);
230231
ToolHelper.playToolSound(item, playerIn);
@@ -509,8 +510,8 @@ public RayTraceResult collisionRayTrace(@NotNull IBlockState blockState, @NotNul
509510

510511
public @Nullable RayTraceAABB collisionRayTrace(@NotNull EntityPlayer player,
511512
@NotNull World world, @NotNull BlockPos pos) {
512-
Vec3d vec3d = player.getPositionEyes(0);
513-
Vec3d vec3d1 = player.getLook(0);
513+
Vec3d vec3d = player.getPositionEyes(1);
514+
Vec3d vec3d1 = player.getLook(1);
514515
double blockReachDistance;
515516
if (world.isRemote) {
516517
blockReachDistance = Minecraft.getMinecraft().playerController.getBlockReachDistance();

0 commit comments

Comments
 (0)