Skip to main content

SectionGeometry

Trait SectionGeometry 

pub trait SectionGeometry:
    Send
    + Sync
    + 'static {
    // Required method
    fn add(&self, origin: [i32; 3], context: &mut dyn SectionGeometryContext);
}
Expand description

A mod’s extra section geometry: NeoForge’s AdditionalSectionGeometryRenderer.

Required Methods§

fn add(&self, origin: [i32; 3], context: &mut dyn SectionGeometryContext)

render(context): adds the quads of the section whose lowest corner is block origin (a multiple of 16 on each axis) through context. Asked on a meshing worker every time that section meshes, also when it holds only air; a renderer with nothing for the section adds nothing. What it adds is taken whole or refused whole, logged once: see SectionGeometryContext::add. A renderer that panics is asked no more.

Trait Implementations§

§

impl Wire for Box<dyn SectionGeometry>

§

const MIN: usize = 8

Minimum encoded size, used to reject impossible collection lengths.
§

fn put(&self, out: &mut Writer)

Encodes this value, recording failures on the writer.
§

fn put_owned(self, out: &mut Writer)

Consumes owned data when a resource’s ownership must cross the boundary.
§

fn take(input: &mut Reader<'_>) -> Result<Box<dyn SectionGeometry>, WireError>

Decodes one value, leaving any following bytes for the caller.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§