Interface FabricBlockStateModelGenerator
- All Known Implementing Classes:
BlockStateModelGeneratorMixin
public interface FabricBlockStateModelGenerator
Fabric-provided extensions for
BlockModelGenerators.
Note: This interface is automatically implemented on all generators via Mixin and interface injection.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidbuildWithSingletonState(net.minecraft.world.level.block.Block block, ModelBuilder<?> builder) Create a singleton block state and model file to be built by an instanced @{link ModelBuilder} for a given block.default voidregisterEmptyModel(net.minecraft.world.level.block.Block block) Create a singleton block state and empty model file for this block.default voidregisterEmptyModel(net.minecraft.world.level.block.Block block, net.minecraft.resources.ResourceLocation id) Create a singleton block state and empty model file with the given ID for this block.
-
Method Details
-
registerEmptyModel
default void registerEmptyModel(net.minecraft.world.level.block.Block block) Create a singleton block state and empty model file for this block. Useful in special cases where a block may be rendered/modelled entirely through code rather than a standard model.- Parameters:
block- The block to register a block state and model for.
-
registerEmptyModel
default void registerEmptyModel(net.minecraft.world.level.block.Block block, net.minecraft.resources.ResourceLocation id) Create a singleton block state and empty model file with the given ID for this block. Useful in special cases where a block may be rendered/modelled entirely through code rather than a standard model.- Parameters:
block- The block to register a block state and model for.id- The ID/path for the generated "model".
-
buildWithSingletonState
default void buildWithSingletonState(net.minecraft.world.level.block.Block block, ModelBuilder<?> builder) Create a singleton block state and model file to be built by an instanced @{link ModelBuilder} for a given block.- Parameters:
block- The block to register a block state and model for.builder- TheModelBuilderfrom which to build a block model.
-