-
-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Labels
status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triageThis label is automatically applied to new issues and pull requests to indicate they require triagetype: bugSomething isn't workingSomething isn't working
Description
Affected Product(s)
SpongeVanilla
Version
1.21.10-17.0.0-RC2492
Operating System
Linux
Java Version
21
Plugins/Mods
Test pluginDescribe the bug
private ServerLocation pos = null;
@Listener
void onMove(MoveEntityEvent event, @Getter("entity") ServerPlayer player) {
if (player.world().block(event.destinationPosition().toInt()).type() == BlockTypes.WATER.get()) {
player.sendMessage(Component.text("water hit"));
event.setDestinationPosition(pos.position());
}
}
@Listener
public void onRegisterCommands(final RegisterCommandEvent<Command.Parameterized> event) {
event.register(this.container, Command.builder().permission("teleporttest.command.greet").executor(ctx -> {
var player = ctx.cause().last(ServerPlayer.class).orElseThrow();
pos = player.serverLocation();
ctx.sendMessage(Component.text("true"));
return CommandResult.success();
}).build(), "setenable");
}
When a player has a bit of delay to the server, MoveEntityEvent.setDestinationPosition teleports the player to the wrong position. I have tested this on a vanilla client, so it is not caused by client-side mods.
Video_2026-01-10_12-25-08.mp4
Link to logs
No response
Metadata
Metadata
Assignees
Labels
status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triageThis label is automatically applied to new issues and pull requests to indicate they require triagetype: bugSomething isn't workingSomething isn't working