Skip to content

Commit

Permalink
small relative teleportation change
Browse files Browse the repository at this point in the history
  • Loading branch information
qouteall committed Aug 12, 2023
1 parent c3191db commit 8bdaa8e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import net.minecraft.world.entity.Entity;
import net.minecraft.world.phys.Vec3;
import org.apache.commons.lang3.Validate;
import org.jetbrains.annotations.Nullable;
import qouteall.imm_ptl.core.McHelper;
import qouteall.imm_ptl.core.portal.Portal;
import qouteall.imm_ptl.core.portal.PortalState;
import qouteall.q_misc_util.Helper;

import org.jetbrains.annotations.Nullable;
import java.util.Comparator;
import java.util.List;

Expand Down Expand Up @@ -181,9 +181,9 @@ public static Teleportation checkDynamicTeleportation(
.dot(thisTickState.getContentDirection());
if (dot < 0) {
Helper.log("Teleported to behind the end-tick portal destination. Corrected.");
newOtherSideThisTickPos = newOtherSideThisTickPos.add(
thisTickState.getContentDirection().scale(-dot + 0.001)
);
Vec3 offset1 = thisTickState.getContentDirection().scale(-dot + 0.001);
newOtherSideThisTickPos = newOtherSideThisTickPos.add(offset1);
newOtherSideLastTickPos = newOtherSideLastTickPos.add(offset1);
}
}

Expand Down

0 comments on commit 8bdaa8e

Please sign in to comment.