Class SlVert
A legacy liquid vertex (MCLQ, 8 bytes). The first four bytes are flow / depth data for water and ocean or two u16 texture coordinates for magma / slime — the cell's liquid-type flags choose the reading (use as_magma()). The trailing float is the surface height in all readings.
public class SlVert : IDisposable
- Inheritance
-
SlVert
- Implements
- Inherited Members
Constructors
SlVert()
public SlVert()
SlVert(byte, byte, byte, byte, float)
public SlVert(byte depth, byte flow0, byte flow1, byte filler, float height)
Parameters
SlVert(SlVert)
Copy-construct: a deep copy of other (the C++ copy constructor).
public SlVert(SlVert other)
Parameters
otherSlVert
Properties
Depth
Water: depth. Ocean: depth. Magma/slime: low byte of s.
public byte Depth { get; set; }
Property Value
Filler
Filler. Magma/slime: high byte of t.
public byte Filler { get; set; }
Property Value
Flow0
Water: flow0 percent. Ocean: foam. Magma/slime: high byte of s.
public byte Flow0 { get; set; }
Property Value
Flow1
Water: flow1 percent. Ocean: wet. Magma/slime: low byte of t.
public byte Flow1 { get; set; }
Property Value
Height
Liquid surface height at this vertex.
public float Height { get; set; }
Property Value
Methods
AsMagma()
Reinterpret this vertex under the magma/slime reading (u16 s, t). A pure byte reinterpretation; use it only for magma/slime cells.
public SmVert AsMagma()
Returns
Dispose()
Release the native object now. Optional: the finalizer releases it on
collection anyway - dispose (or using) when you want native memory back
promptly.
public virtual void Dispose()
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Reference-identity hash (the C++ type has no hash to mirror).
public override int GetHashCode()
Returns
SetMagma(SmVert)
Overwrite this vertex's bytes from a magma/slime reading.
public void SetMagma(SmVert magma)
Parameters
magmaSmVert
Operators
operator ==(SlVert?, SlVert?)
public static bool operator ==(SlVert? l, SlVert? r)
Parameters
Returns
operator !=(SlVert?, SlVert?)
public static bool operator !=(SlVert? l, SlVert? r)