Class BlockStateModelGeneratorMixin

java.lang.Object
io.github.vampirestudios.vampirelib.mixins.BlockStateModelGeneratorMixin
All Implemented Interfaces:
FabricBlockStateModelGenerator

public abstract class BlockStateModelGeneratorMixin extends Object implements FabricBlockStateModelGenerator
  • Field Details

    • modelOutput

      public BiConsumer<net.minecraft.resources.ResourceLocation,Supplier<com.google.gson.JsonElement>> modelOutput
    • blockStateOutput

      public Consumer<net.minecraft.data.models.blockstates.BlockStateGenerator> blockStateOutput
  • Constructor Details

    • BlockStateModelGeneratorMixin

      public BlockStateModelGeneratorMixin()
  • Method Details

    • registerEmptyModel

      public void registerEmptyModel(net.minecraft.world.level.block.Block block)
      Description copied from interface: FabricBlockStateModelGenerator
      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.
      Specified by:
      registerEmptyModel in interface FabricBlockStateModelGenerator
      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: FabricBlockStateModelGenerator
      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.
      Specified by:
      registerEmptyModel in interface FabricBlockStateModelGenerator
      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: FabricBlockStateModelGenerator
      Create a singleton block state and model file to be built by an instanced @{link ModelBuilder} for a given block.
      Specified by:
      buildWithSingletonState in interface FabricBlockStateModelGenerator
      Parameters:
      block - The block to register a block state and model for.
      builder - The ModelBuilder from which to build a block model.