Documentation
¶
Index ¶
- func ActivateEndPortal(tx *world.Tx, framePos cube.Pos) bool
- func ActivateNetherPortal(tx *world.Tx, pos cube.Pos) bool
- func DeactivateEndPortal(tx *world.Tx, portalPos cube.Pos)
- func DeactivateNetherPortal(tx *world.Tx, pos cube.Pos) bool
- func EndPortalRingIntact(tx *world.Tx, portalPos cube.Pos) bool
- func EndSpawnPosition(player bool) mgl64.Vec3
- func GenerateEndSpawnPlatform(tx *world.Tx)
- type Nether
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateEndPortal ¶
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 ¶
ActivateNetherPortal activates an inactive framed Nether portal at the position passed.
func DeactivateEndPortal ¶
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 ¶
DeactivateNetherPortal deactivates the connected Nether portal at the position passed.
func EndPortalRingIntact ¶
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 ¶
EndSpawnPosition returns the Bedrock End platform arrival position: y=49 for players and y=50 for other entities.
func GenerateEndSpawnPlatform ¶
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 ¶
CreateNetherPortal creates a Nether portal at the given position.
func FindNetherPortal ¶
FindNetherPortal searches a provided radius for a Nether portal.
func FindOrCreateNetherPortal ¶
FindOrCreateNetherPortal finds or creates a Nether portal at the given position.
func NetherPortalFromPos ¶
NetherPortalFromPos returns Nether portal information from a given position in the frame.