Interface FabricBlockModelPart
public interface FabricBlockModelPart
Note: This interface is automatically implemented on
BlockModelPart
via Mixin and interface injection.-
Method Summary
Modifier and TypeMethodDescriptiondefault void
emitQuads
(QuadEmitter emitter, Predicate<@Nullable Direction> cullTest) Produces this model part's geometry.
-
Method Details
-
emitQuads
Produces this model part's geometry. This method must be called instead ofBlockModelPart.getQuads(Direction)
andBlockModelPart.useAmbientOcclusion()
; the vanilla methods should be considered deprecated as they may not produce accurate results. However, it is acceptable for a custom model part to only implement the vanilla methods as the default implementation of this method will delegate to the vanilla methods.This method mainly exists for convenience when interacting with parts implemented and produced by vanilla code. Custom models should generally override
FabricBlockStateModel.emitQuads(QuadEmitter, BlockRenderView, BlockPos, BlockState, Random, Predicate)
instead of subclassingBlockModelPart
and overriding this method.- Parameters:
emitter
- Accepts model part output.cullTest
- A test that returnstrue
for faces which will be culled andfalse
for faces which may or may not be culled. Meant to be used to cull groups of quads or expensive dynamic quads early for performance. Early culled quads will likely not be added the emitter, so callers of this method must account for this. Since model parts should be completely static, this test should be used whenever possible.
-