Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
- Move exit tp from sit command to pose manager
  • Loading branch information
fill1890 committed Jun 23, 2022
1 parent 3929e67 commit 88749c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ public static int run(CommandContext<ServerCommandSource> context, Pose pose) {
// toggle sitting if the player was sat down
if(player.hasVehicle()) {
player.dismountVehicle();
// TODO: should be able to add to manager?
player.teleport(player.getX(), player.getY() + 0.6, player.getZ());
return 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import net.minecraft.text.Text;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;

import java.util.UUID;

Expand Down Expand Up @@ -97,6 +96,8 @@ protected void removePassenger(Entity passenger) {
this.poser.getDataTracker().set(getLEFT_SHOULDER_ENTITY(), new NbtCompound());
this.poser.getDataTracker().set(getRIGHT_SHOULDER_ENTITY(), new NbtCompound());
}

passenger.teleport(passenger.getX(), passenger.getY() + 0.6, passenger.getZ());
}

public void animate(int id) {
Expand Down

0 comments on commit 88749c9

Please sign in to comment.