Skip to content

World teleporting#149

Draft
JunkyDeveloper wants to merge 11 commits intoSteel-Foundation:devfrom
JunkyDeveloper:world-teleporting
Draft

World teleporting#149
JunkyDeveloper wants to merge 11 commits intoSteel-Foundation:devfrom
JunkyDeveloper:world-teleporting

Conversation

@JunkyDeveloper
Copy link
Copy Markdown
Contributor

Goal

Allow teleporting between worlds, which will also serve as the foundation for portals.
Only player teleportation is implemented — entity support (items, mobs) will come later.

Core Concept

Added a Vec and an AtomicBool to the server to queue and process dimension changes at the end of each tick. This avoids mid-tick world state inconsistencies.

In the Entity trait, a change_world function was added. Currently only Player has a real implementation — other entity types have a no-op stub.

The player teleportation goes through 5 phases:

  1. Clean up old world (close containers, remove from tracking)
  2. Reset player state (position, rotation, movement validation)
  3. Send CRespawn + position packet to the client
  4. Set portal cooldown (stub)
  5. Add player to the new world

Also includes:

  • portal/portal_shape.rs: portal frame detection matching vanilla's algorithm, used for future portal trigger support
  • DimensionChangeRequest: two variants — Computed (direct teleport) and Portal (computes destination at processing time from a portal block position)

Testing

Added the command:
/steel tp <targets> <world id>
Accepts shorthand aliases (overworld, nether, end) or full identifiers (minecraft:overworld). Tab-completes all currently loaded worlds.

@github-actions
Copy link
Copy Markdown

This pull request has conflicts with the base branch "master". Please resolve those so we can test out your changes.

@github-actions
Copy link
Copy Markdown

Conflicts have been resolved! 🎉

@JunkyDeveloper JunkyDeveloper changed the title World teleporting [READY] World teleporting Mar 23, 2026
@JunkyDeveloper JunkyDeveloper changed the base branch from master to dev March 28, 2026 01:55
@github-actions
Copy link
Copy Markdown

This pull request has conflicts with the base branch "master". Please resolve those so we can test out your changes.

@github-actions
Copy link
Copy Markdown

Conflicts have been resolved! 🎉

@JunkyDeveloper JunkyDeveloper marked this pull request as draft April 1, 2026 20:27
@JunkyDeveloper JunkyDeveloper changed the title [READY] World teleporting World teleporting Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant