Class BlockStateModelGeneratorMixin
java.lang.Object
io.github.vampirestudios.vampirelib.mixins.BlockStateModelGeneratorMixin
- All Implemented Interfaces:
FabricBlockStateModelGenerator
public abstract class BlockStateModelGeneratorMixin
extends Object
implements FabricBlockStateModelGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionConsumer<net.minecraft.data.models.blockstates.BlockStateGenerator>BiConsumer<net.minecraft.resources.ResourceLocation,Supplier<com.google.gson.JsonElement>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildWithSingletonState(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.voidregisterEmptyModel(net.minecraft.world.level.block.Block block) Create a singleton block state and empty model file for this block.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.
-
Field Details
-
modelOutput
public BiConsumer<net.minecraft.resources.ResourceLocation,Supplier<com.google.gson.JsonElement>> modelOutput -
blockStateOutput
-
-
Constructor Details
-
BlockStateModelGeneratorMixin
public BlockStateModelGeneratorMixin()
-
-
Method Details
-
registerEmptyModel
public void registerEmptyModel(net.minecraft.world.level.block.Block block) Description copied from interface:FabricBlockStateModelGeneratorCreate 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.- Specified by:
registerEmptyModelin interfaceFabricBlockStateModelGenerator- Parameters:
block- The block to register a block state and model for.
-
registerEmptyModel
public void registerEmptyModel(net.minecraft.world.level.block.Block block, net.minecraft.resources.ResourceLocation id) Description copied from interface:FabricBlockStateModelGeneratorCreate 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.- Specified by:
registerEmptyModelin interfaceFabricBlockStateModelGenerator- Parameters:
block- The block to register a block state and model for.id- The ID/path for the generated "model".
-
buildWithSingletonState
public void buildWithSingletonState(net.minecraft.world.level.block.Block block, ModelBuilder<?> builder) Description copied from interface:FabricBlockStateModelGeneratorCreate a singleton block state and model file to be built by an instanced @{link ModelBuilder} for a given block.- Specified by:
buildWithSingletonStatein interfaceFabricBlockStateModelGenerator- Parameters:
block- The block to register a block state and model for.builder- TheModelBuilderfrom which to build a block model.
-