portal

package
v0.11.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateEndPortal

func ActivateEndPortal(tx *world.Tx, framePos cube.Pos) bool

ActivateEndPortal fills the 3x3 interior with end_portal blocks if a complete twelve-frame ring exists around the frame at the position passed. All twelve frames must hold an eye and face toward the centre, as in vanilla.

func ActivateNetherPortal

func ActivateNetherPortal(tx *world.Tx, pos cube.Pos) bool

ActivateNetherPortal activates an inactive framed Nether portal at the position passed.

func DeactivateEndPortal

func DeactivateEndPortal(tx *world.Tx, portalPos cube.Pos)

DeactivateEndPortal clears every end_portal block reachable from the position passed through cardinal neighbours on the same y plane, removing a single portal's interior without touching unrelated portals.

func DeactivateNetherPortal

func DeactivateNetherPortal(tx *world.Tx, pos cube.Pos) bool

DeactivateNetherPortal deactivates the connected Nether portal at the position passed.

func EndPortalRingIntact

func EndPortalRingIntact(tx *world.Tx, portalPos cube.Pos) bool

EndPortalRingIntact reports whether an intact twelve-frame ring still surrounds the end_portal block at the position passed, which may be any of the nine interior positions.

func EndSpawnPosition

func EndSpawnPosition(player bool) mgl64.Vec3

EndSpawnPosition returns the Bedrock End platform arrival position: y=49 for players and y=50 for other entities.

func GenerateEndSpawnPlatform

func GenerateEndSpawnPlatform(tx *world.Tx)

GenerateEndSpawnPlatform builds the 5x5 obsidian arrival platform at (100, 48, 0) and clears the 5x5x3 air column above it. It runs on every travel into the End, matching vanilla's unconditional regeneration.

Types

type Nether

type Nether struct {
	// contains filtered or unexported fields
}

Nether contains information about a nether portal structure. Values returned from this package are tied to the transaction that created them and must not be retained after that transaction finishes.

func CreateNetherPortal

func CreateNetherPortal(tx *world.Tx, pos cube.Pos) (Nether, bool)

CreateNetherPortal creates a Nether portal at the given position.

func FindNetherPortal

func FindNetherPortal(tx *world.Tx, pos cube.Pos, radius int) (Nether, bool)

FindNetherPortal searches a provided radius for a Nether portal.

func FindOrCreateNetherPortal

func FindOrCreateNetherPortal(tx *world.Tx, pos cube.Pos, radius int) (Nether, bool)

FindOrCreateNetherPortal finds or creates a Nether portal at the given position.

func NetherPortalFromPos

func NetherPortalFromPos(tx *world.Tx, pos cube.Pos) (Nether, bool)

NetherPortalFromPos returns Nether portal information from a given position in the frame.

func (Nether) Activate

func (n Nether) Activate()

Activate ...

func (Nether) Activated

func (n Nether) Activated() bool

Activated ...

func (Nether) Framed

func (n Nether) Framed() bool

Framed ...

func (Nether) Positions

func (n Nether) Positions() []cube.Pos

Positions ...

func (Nether) Spawn

func (n Nether) Spawn() cube.Pos

Spawn ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL