Skip to content

Commit 7d036bd

Browse files
committed
Fix up pipes
1 parent 6c112f5 commit 7d036bd

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎src/main/java/com/wenxin2/marioverse/utils/BlockWarpEntityHandler.java‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ default void enterWarpPipe(Entity entity, Level world, BlockPos pos, BlockPos wa
117117
&& !entity.getType().is(TagRegistry.CANNOT_WARP)
118118
&& state.hasProperty(WarpPipeBlock.FACING)) {
119119
Direction facing = state.getValue(WarpPipeBlock.FACING);
120-
double dx = entityX - (blockX + 0.5);
121-
double dz = entityZ - (blockZ + 0.5);
122-
double dot = dx * facing.getStepX() + dz * facing.getStepZ();
123-
boolean correctSide = dot > 0.1;
124120

125121
double horizontalLength = Math.sqrt(look.x * look.x + look.z * look.z);
126122
double flatX = horizontalLength > 0.0001 ? look.x / horizontalLength : 0;
@@ -145,7 +141,7 @@ default void enterWarpPipe(Entity entity, Level world, BlockPos pos, BlockPos wa
145141
canEnterPipe = !entity.isShiftKeyDown() && canEnterSidePipe && (facingIntoPipe || !(entity instanceof Player));
146142
else canEnterPipe = getShiftKeyForEntity(entity);
147143

148-
if (correctSide && insideFaceBounds && canEnterPipe) {
144+
if (insideFaceBounds && canEnterPipe) {
149145
if (!warpBE.preventWarp && entity.getData(DataAttachmentRegistry.WARP_COOLDOWN) == 0)
150146
this.warp(entity, world, pos, state, warpPos, warpBE);
151147
else if (entity instanceof Player player) {

0 commit comments

Comments
 (0)