Package com.jozufozu.flywheel.api
Interface Material<D extends InstanceData>
- All Known Implementing Classes:
BatchedMaterial,InstancedMaterial
public interface Material<D extends InstanceData>
-
Method Summary
Modifier and TypeMethodDescriptiongetModel(PartialModel partial) getModel(PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState) getModel(PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction dir) getModel(PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction dir, Supplier<com.mojang.blaze3d.vertex.PoseStack> modelTransform) getModel(net.minecraft.world.level.block.state.BlockState toRender) Get an instancer for the given model.
-
Method Details
-
model
Get an instancer for the given model. Calling this method twice with the same key will return the same instancer.- Parameters:
key- An object that uniquely identifies the model.modelSupplier- A factory that creates the Model that you want to render. Each timeSupplier.get()is called, a new Model must be created.- Returns:
- An instancer for the given model, capable of rendering many copies for little cost.
-
getModel
default Instancer<D> getModel(PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState) -
getModel
-
getModel
default Instancer<D> getModel(PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction dir) -
getModel
default Instancer<D> getModel(PartialModel partial, net.minecraft.world.level.block.state.BlockState referenceState, net.minecraft.core.Direction dir, Supplier<com.mojang.blaze3d.vertex.PoseStack> modelTransform) -
getModel
-