
When >0 ping, server repeatedly teleports player to target dimension
solonovamax opened this issue ยท 14 comments
NOTE: This issue is identical to #3. I chose to open a new issue, as I have much more information and felt it would be better as a separate issue.
Describe the bug
When there is a ping delay between the player and the server, and the player falls in the void, the server will repeatedly teleport the player to the target dimension.
To Reproduce
Steps to reproduce the behavior:
-
Clone the repo
-
Apply the following patch file to the repo to add debug logging statements:
Debug Logging Patch
Index: src/main/java/dev/the_fireplace/unforgivingvoid/mixin/ServerPlayerEntityMixin.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/main/java/dev/the_fireplace/unforgivingvoid/mixin/ServerPlayerEntityMixin.java b/src/main/java/dev/the_fireplace/unforgivingvoid/mixin/ServerPlayerEntityMixin.java --- a/src/main/java/dev/the_fireplace/unforgivingvoid/mixin/ServerPlayerEntityMixin.java (revision c4987b0b646f6595e72c5be6bc977bb2edf7627a) +++ b/src/main/java/dev/the_fireplace/unforgivingvoid/mixin/ServerPlayerEntityMixin.java (date 1648436729369) @@ -2,15 +2,18 @@ import com.mojang.authlib.GameProfile; import dev.the_fireplace.annotateddi.api.DIContainer; +import dev.the_fireplace.unforgivingvoid.UnforgivingVoidConstants; import dev.the_fireplace.unforgivingvoid.config.DimensionConfig; import dev.the_fireplace.unforgivingvoid.config.DimensionConfigManager; import dev.the_fireplace.unforgivingvoid.usecase.QueueVoidTransfer; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.MinecraftServer; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @@ -18,7 +21,8 @@ @Mixin(ServerPlayerEntity.class) public abstract class ServerPlayerEntityMixin extends PlayerEntity { - + @Shadow public abstract ServerWorld getWorld(); + protected ServerPlayerEntityMixin(World world, BlockPos pos, float yaw, GameProfile profile) { super(world, pos, yaw, profile); } @@ -32,6 +36,7 @@ ) { MinecraftServer server = getServer(); if (server != null) { + UnforgivingVoidConstants.getLogger().info("Player is below the minimum height. Teleporting to new dimension. Current position is {}, and current world is {}", getBlockPos(), getWorld().getRegistryKey().getValue()); DIContainer.get().getInstance(QueueVoidTransfer.class).queueTransfer((ServerPlayerEntity) (Object) this, server); } } Index: src/main/java/dev/the_fireplace/unforgivingvoid/usecase/SpawnPositionLocator.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/src/main/java/dev/the_fireplace/unforgivingvoid/usecase/SpawnPositionLocator.java b/src/main/java/dev/the_fireplace/unforgivingvoid/usecase/SpawnPositionLocator.java --- a/src/main/java/dev/the_fireplace/unforgivingvoid/usecase/SpawnPositionLocator.java (revision c4987b0b646f6595e72c5be6bc977bb2edf7627a) +++ b/src/main/java/dev/the_fireplace/unforgivingvoid/usecase/SpawnPositionLocator.java (date 1648436707285) @@ -1,5 +1,6 @@ package dev.the_fireplace.unforgivingvoid.usecase; + import dev.the_fireplace.lib.api.teleport.injectables.SafePosition; import dev.the_fireplace.unforgivingvoid.UnforgivingVoidConstants; import net.minecraft.entity.EntityType; @@ -16,11 +17,10 @@ public final class SpawnPositionLocator { - + private static final int MAX_SCAN_ITERATIONS = 2048; + private final SafePosition safePosition; private int horizontalOffsetRange = 128; - private int maxScanIterations = 2048; - @Inject public SpawnPositionLocator(SafePosition safePosition) { this.safePosition = safePosition; @@ -36,7 +36,9 @@ BlockPos targetFocalPosition = getDimensionScaledPosition(currentWorld.getRegistryKey(), targetWorld.getRegistryKey(), currentPos); int iteration = 0; do { - if (iteration++ >= maxScanIterations) { + UnforgivingVoidConstants.getLogger().info("Attempting to teleport to similar position, iteration {}", iteration); + + if (iteration++ >= MAX_SCAN_ITERATIONS) { UnforgivingVoidConstants.getLogger().warn( "Max attempts exceeded for finding similar position in {}, falling back to finding the spawn position instead.", targetWorld.getRegistryKey().getValue().toString() @@ -53,14 +55,16 @@ return new BlockPos(spawnVec.get()); } - + public BlockPos findSurfacePosition(EntityType<?> entityType, ServerWorld currentWorld, ServerWorld targetWorld, BlockPos currentPos) { Optional<Vec3d> spawnVec; Random rand = targetWorld.getRandom(); BlockPos targetFocalPosition = getDimensionScaledPosition(currentWorld.getRegistryKey(), targetWorld.getRegistryKey(), currentPos); int iteration = 0; do { - if (iteration++ >= maxScanIterations) { + UnforgivingVoidConstants.getLogger().info("Attempting to teleport to surface position, iteration {}", iteration); + + if (iteration++ >= MAX_SCAN_ITERATIONS) { UnforgivingVoidConstants.getLogger().warn( "Max attempts exceeded for finding surface position in {}, falling back to finding the spawn position instead.", targetWorld.getRegistryKey().getValue().toString() @@ -77,12 +81,14 @@ return new BlockPos(spawnVec.get()); } - + public BlockPos findSkyPosition(EntityType<?> entityType, ServerWorld currentWorld, ServerWorld targetWorld, BlockPos currentPos) { Random rand = targetWorld.getRandom(); BlockPos targetFocalPosition = getDimensionScaledPosition(currentWorld.getRegistryKey(), targetWorld.getRegistryKey(), currentPos); int iteration = 0; do { + UnforgivingVoidConstants.getLogger().info("Attempting to teleport to sky position, iteration {}", iteration); + int targetX = applyHorizontalOffset(rand, targetFocalPosition.getX()); int targetZ = applyHorizontalOffset(rand, targetFocalPosition.getZ()); int targetY = targetWorld.getLogicalHeight() - (int) Math.ceil(entityType.getHeight()); @@ -91,7 +97,7 @@ if (isSafeSky(entityType, targetWorld, attemptPos)) { return attemptPos; } - } while (iteration++ < maxScanIterations); + } while (iteration++ < MAX_SCAN_ITERATIONS); UnforgivingVoidConstants.getLogger().warn( "Max attempts exceeded for finding sky position in {}, falling back to finding the spawn position instead.", targetWorld.getRegistryKey().getValue().toString() @@ -99,14 +105,16 @@ return findSpawnPosition(entityType, targetWorld); } - + public BlockPos findSpawnPosition(EntityType<?> entityType, ServerWorld targetWorld) { Random rand = targetWorld.getRandom(); BlockPos targetFocalPosition = targetWorld.getSpawnPos(); Optional<Vec3d> spawnVec = findSafePlatform(entityType, targetWorld, targetFocalPosition); int iteration = 0; while (spawnVec.isEmpty()) { - if (iteration++ >= maxScanIterations) { + UnforgivingVoidConstants.getLogger().info("Attempting to teleport to spawn position, iteration {}", iteration); + + if (iteration++ >= MAX_SCAN_ITERATIONS) { UnforgivingVoidConstants.getLogger().warn( "Max attempts exceeded for finding spawn position in {}, falling back to the built in spawn position even though it may be unsafe.", targetWorld.getRegistryKey().getValue().toString() @@ -124,15 +132,15 @@ return new BlockPos(spawnVec.get()); } - + private Optional<Vec3d> findSafePlatform(EntityType<?> entityType, ServerWorld targetWorld, BlockPos blockPos) { return safePosition.findBy(entityType, targetWorld, blockPos); } - + private boolean isSafeSky(EntityType<?> entityType, ServerWorld targetWorld, BlockPos blockPos) { return safePosition.canSpawnInside(entityType, targetWorld.getBlockState(blockPos)); } - + private BlockPos getDimensionScaledPosition(RegistryKey<World> originDimension, RegistryKey<World> targetDimension, BlockPos inputPos) { if (originDimension.equals(World.OVERWORLD) && targetDimension.equals(World.NETHER)) { return new BlockPos(inputPos.getX() / 8, inputPos.getY(), inputPos.getZ() / 8); @@ -142,7 +150,7 @@ return inputPos; } - + private int applyHorizontalOffset(Random rand, int xzCoordinate) { return xzCoordinate - horizontalOffsetRange + rand.nextInt(horizontalOffsetRange * 2); }
-
Build jar
-
Place jar in fabric server, to which you have roughly 60 ping
-
Jump into void
-
Logging statements similar to the following are produced:
Debug Logs
[22:50:19] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:19] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:19] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:19] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:19] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:19] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:19] [Server thread/INFO]: Attempting to teleport to surface position, iteration 3 [22:50:19] [Server thread/INFO]: Attempting to teleport to surface position, iteration 4 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 5 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 6 [22:50:20] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2764ms or 55 ticks behind [22:50:20] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:20] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:20] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:20] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 3 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 4 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 5 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 6 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 7 [22:50:20] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:20] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:20] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 3 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 4 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 5 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 6 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 7 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 8 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 9 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 10 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 11 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 12 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 13 [22:50:21] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:21] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 3 [22:50:21] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:21] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:21] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:21] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:21] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 3 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 4 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 1 [22:50:22] [Server thread/INFO]: Attempting to teleport to surface position, iteration 2 [22:50:23] [Server thread/INFO]: Attempting to teleport to surface position, iteration 3 [22:50:23] [Server thread/INFO]: Player is below the minimum height. Teleporting to new dimension. [22:50:23] [Server thread/INFO]: Attempting to teleport to surface position, iteration 0
Versions (please complete the following information, do NOT say "latest"):
- Minecraft: 1.18.1
- Mod Version: 3.1.2
- Fabric API: 0.43.1+1.18
Note: I applied the following patch to get it to run on 1.18.1, as my client is not set up for 1.18.2:
1.18.1 Patch
Index: src/main/resources/fabric.mod.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
--- a/src/main/resources/fabric.mod.json (revision c4987b0b646f6595e72c5be6bc977bb2edf7627a)
+++ b/src/main/resources/fabric.mod.json (date 1648433871926)
@@ -29,7 +29,7 @@
],
"depends": {
"fabricloader": ">=0.12.0",
- "minecraft": ">=1.18.2",
+ "minecraft": ">=1.18.1",
"fireplacelib": ">=6.3 <7"
},
"custom": {
Index: gradle.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>ISO-8859-1
===================================================================
diff --git a/gradle.properties b/gradle.properties
--- a/gradle.properties (revision c4987b0b646f6595e72c5be6bc977bb2edf7627a)
+++ b/gradle.properties (date 1648433796871)
@@ -1,7 +1,8 @@
org.gradle.jvmargs=-Xmx3G
# Fabric Properties
-minecraft_version=1.18.2
-yarn_mappings=1.18.2+build.1
+loader_version=0.12.5
+minecraft_version=1.18.1
+yarn_mappings=1.18.1+build.22
# Mod Properties
maven_group=dev.the-fireplace
archives_base_name=Unforgiving-Void
@@ -15,5 +16,6 @@
curseforge_url=https://www.curseforge.com/minecraft/mc-mods/unforgiving-void
modrinth_url=https://modrinth.com/mod/unforgiving-void
# Dependencies
+fabric_version=0.43.1+1.18
annotateddi_version=2.1.0+1.18.2
-fireplacelib_version=6.3.0+1.18.2
+fireplacelib_version=6.3.1+1.18.2
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle (revision c4987b0b646f6595e72c5be6bc977bb2edf7627a)
+++ b/build.gradle (date 1648436859507)
@@ -18,7 +18,7 @@
version = "${project.mod_version}+${project.minecraft_version}"
group = project.maven_group
if (project.hasProperty('SNAPSHOT')) {
- version = "${version}-SNAPSHOT"
+ version = "${version}-SNAPSHOT"
}
repositories {
@@ -32,9 +32,17 @@
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
- modCompileOnly "dev.the-fireplace:Fireplace-Lib:${project.fireplacelib_version}:api"
- modRuntimeOnly "dev.the-fireplace:Fireplace-Lib:${project.fireplacelib_version}"
- annotationProcessor "dev.the-fireplace:Annotated-DI:${project.annotateddi_version}:processor"
+ modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
+ modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
+
+ modCompileOnly("dev.the-fireplace:Fireplace-Lib:${project.fireplacelib_version}:api") {
+ exclude group: "net.fabricmc"
+ }
+ modRuntimeOnly("dev.the-fireplace:Fireplace-Lib:${project.fireplacelib_version}") {
+ exclude group: "net.fabricmc.fabric-api"
+ exclude group: "net.fabricmc"
+ }
+ annotationProcessor "dev.the-fireplace:Annotated-DI:${project.annotateddi_version}:processor"
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
}
Looking at the source, it seems that this change does not necessarily fix the issue.
The function ServerPlayerEntity#isInTeleportationState()
returns the property inTeleportationState
of ServerPlayerEntity
.
From what I can tell, inTeleportationState
is only written to in two locations:
ServerPlayerEntity#moveToWorld()
, where it is set totrue
ServerPlayerEntity#onTeleportationDone()
, where it is set tofalse
The function invoked by VoidTransfer
is ServerPlayerEntity#teleport()
.
And it seems ServerPlayerEntity#moveToWorld()
is not invoked on ServerPlayerEntity#teleport()
. The only places it is invoked in seems to be end portals and nether portals.
This means, ServerPlayerEntity#isInTeleportationState()
will still be false when, after invoking ServerPlayerEntity#teleport()
.
Although initially I thought it would be appropriate to invoke ServerPlayerEntity#moveToWorld()
, I no longer think so, as it has some of the following code:
if (registryKey == World.END && destination.getRegistryKey() == World.OVERWORLD) {
this.detach();
this.getWorld().removePlayer(this, RemovalReason.CHANGED_DIMENSION);
if (!this.notInAnyWorld) {
this.notInAnyWorld = true;
this.networkHandler.sendPacket(new GameStateChangeS2CPacket(GameStateChangeS2CPacket.GAME_WON, this.seenCredits ? 0.0F : 1.0F));
this.seenCredits = true;
}
return this;
}
This means, falling into the void and being teleported to the overworld will show the user the end credits. I don't think this is desirable.
Thus, it is most likely best to shadow the ServerPlayerEntity#inTeleportationState
field, and set it to true
at the start of the method, then invoke ServerPlayerEntity#onTeleportationDone()
when finished teleporting.
But, this should not be done in your ServerPlayerEntity
mixin, as if a player has been requested to teleport several times, it will be cleared because of the queue system which returns immediately if a reference already exists in it.
Instead, this should be set when the server receives the packet indicating the teleport has successfully finished.
I am not sure if the client will send a TeleportConfirmC2SPacket
when teleported using ServerPlayerEntity#teleport()
. I can test this later, as I'm not at home atm.
If the client doesn't send a TeleportConfirmC2SPacket
after ServerPlayerEntity#teleport()
, I believe the best way to do it would be as follows:
- mixin into the player movement packets
- If not currently in an unforgiving void initiated teleport, return immediately (this can be done by checking for a target world variable, as well as
inTeleportationState
.) - Query the current world, and compare it to the target world
- If they are the same, set
inTeleportationState
to false, as well as set the target world variable to null.
Though, I have not tested these changes, as I am not at my pc right now. I will test them once I get home, as it may fix the issue, though I doubt it.
As I guessed, this does not fix the issue.
You will have to attempt the solution I provided. (I'd be willing to PR later, just can't rn)
@The-Fireplace could you re-open the issue?
I'm kind of busy with other projects at the moment, so if you're able to make a PR, that would be a huge help! Otherwise, I'm sure I'll get to it at some point, just can't promise when it'll be.
I'm kind of busy with other projects at the moment, so if you're able to make a PR, that would be a huge help! Otherwise, I'm sure I'll get to it at some point, just can't promise when it'll be.
I'll probably PR it in the next day or so.
Currently redoing my desk setup, but once that's done I'll work on it, so I'll probably PR in the next day or so.
Also, what do you want code style wise? Because I noticed you put your brackets on a new line. Do you want my pr to mirror that, or to just use my code style?
Also, I may make a pr rewriting the FALL_FROM_SKY
option to also work in the nether, as that'd be fun (and maybe some slow falling for that as well)
You can mirror that or you can do your own and I'll have IDEA format it in another commit after it's merged.
If you want to code in your style then let IDEA format it before committing:
- Extract the zip (GitHub doesn't support attaching XML directly) Java_Formatting.xml.zip
- In Idea, go to Settings > Editor > Code Style > Java
- Switch the scheme dropdown to Project (so these settings don't apply to your other projects)
- Gear icon, import scheme, choose the XML.
- On the commit dialog, make sure the "Reformat code" box is checked.
@The-Fireplace The issue has been fixed (as well as a few other issues), I've opened PRs for each of the versions