Skip to content

Commit

Permalink
fix cannot teleport right after entering game
Browse files Browse the repository at this point in the history
  • Loading branch information
qouteall committed Aug 3, 2023
1 parent 582bcec commit 4cca570
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ private void onProcessingPositionPacket(
packetDim,
new Vec3(packet.getX(), packet.getY(), packet.getZ())
);

ClientTeleportationManager.disableTeleportFor(5);
// ClientTeleportationManager.disableTeleportFor(2);
}

LOGGER.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ public class ClientTeleportationManager {

public static void init() {
IPGlobal.postClientTickSignal.connect(
ClientTeleportationManager::tick
ClientTeleportationManager::tick
);

IPGlobal.clientCleanupSignal.connect( () -> {
disableTeleportFor(40);

IPGlobal.clientCleanupSignal.connect(() -> {
lastPlayerEyePos = null;
// disableTeleportFor(2);
});
}

Expand Down Expand Up @@ -394,7 +395,7 @@ public static void forceTeleportPlayer(ResourceKey<Level> toDimension, Vec3 dest
McHelper.adjustVehicle(player);

lastPlayerEyePos = null;
disableTeleportFor(20);
// disableTeleportFor(2);

RenderStates.updatePreRenderInfo(RenderStates.getPartialTick());
MyGameRenderer.vanillaTerrainSetupOverride = 1;
Expand Down

0 comments on commit 4cca570

Please sign in to comment.