API reference Obsidian.API.World
PortalProperties record
A rectangular portal, registered during ConfigureRegistry.
public sealed record PortalProperties : IEquatable<PortalProperties>
In Obsidian.API.
Remarks
PortalBlock must have an axis property accepting x and z. Several types may share one, such as vanilla's minecraft:nether_portal: each portal remembers the type that lit or built it, and stays inert while that type isn't registered; a portal block nothing lit, as one placed by a command, belongs to the earliest registered type using it (the Nether for vanilla's block). FrameBlock is used when building an exit; IsFrame may accept additional materials. ResolveTarget returning null disables lighting and travel in that level. Callbacks run inside a call into the owning plugin. Use TryLightPortalAsync from an item or block callback for ignition rules more involved than a single Igniter item.
Constructors
public PortalProperties();Properties
CoordinateScale
public Func<ILevel, ILevel, double> CoordinateScale { get; init; }Source/target dimension coordinate scale by default; override for a portal's own mapping.
public int CreativeWaitTicks { get; init; }public int EntityWaitTicks { get; init; }public required IBlock FrameBlock { get; init; }public Item Igniter { get; init; }public bool IgnitesFromFire { get; init; }public required Func<IBlock, bool> IsFrame { get; init; }public int MaxHeight { get; init; }public int MaxWidth { get; init; }public int MinHeight { get; init; }public int MinWidth { get; init; }public required IBlock PortalBlock { get; init; }public required Func<ILevel, ILevel> ResolveTarget { get; init; }SearchRadius
public Func<ILevel, int> SearchRadius { get; init; }Search radius in blocks; defaults to 128. The Nether instance selects 16 on entry.
public int WaitTicks { get; init; }