Class DioBlockStateProvider

java.lang.Object
fr.alasdiablo.diolib.api.data.blockstate.DioBlockStateProvider
All Implemented Interfaces:
net.minecraft.data.DataProvider

@ParametersAreNonnullByDefault public abstract class DioBlockStateProvider extends Object implements net.minecraft.data.DataProvider
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider

    net.minecraft.data.DataProvider.Factory<T extends net.minecraft.data.DataProvider>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Map<String,net.minecraftforge.client.model.generators.IGeneratedBlockState>
     

    Fields inherited from interface net.minecraft.data.DataProvider

    FIXED_ORDER_FIELDS, KEY_COMPARATOR, LOGGER
  • Constructor Summary

    Constructors
    Constructor
    Description
    DioBlockStateProvider(net.minecraft.data.PackOutput output, String modId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addBlockState(String blockName, net.minecraftforge.client.model.generators.IGeneratedBlockState blockstate)
    Register a block state
    protected void
    button(String blockName)
    Block-state builder uses to create a button block-state
    protected void
    cubeAll(String blockName)
    Block-state builder uses to create a default block-state
    protected void
    door(String blockName)
    Block-state builder uses to create a door block-state
     
    protected void
    pillar(String blockName)
    Block-state builder uses to create a pillar block-state
    protected void
    pressurePlate(String blockName)
    Block-state builder uses to create a pressure plate block-state
    protected abstract void
    Function use to register all block states
    run(net.minecraft.data.CachedOutput cache)
     
    protected void
    sapling(String blockName)
    Block-state builder uses to create a sapling block-state
    protected void
    slab(String slabBlockName, String fullBlockName)
    Block-state builder uses to create a door block-state
    protected void
    stairs(String blockName)
    Block-state builder uses to create a stairs block-state
    protected void
    trapdoor(String blockName)
    Block-state builder uses to create a trapdoor block-state
    protected void
    woodenFence(String blockName)
    Block-state builder uses to create a wooden fence block-state
    protected void
    Block-state builder uses to create a wooden fence gate block-state

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • registeredBlocks

      protected final Map<String,net.minecraftforge.client.model.generators.IGeneratedBlockState> registeredBlocks
  • Constructor Details

    • DioBlockStateProvider

      public DioBlockStateProvider(net.minecraft.data.PackOutput output, String modId)
  • Method Details

    • registerStates

      protected abstract void registerStates()
      Function use to register all block states
    • addBlockState

      protected void addBlockState(String blockName, net.minecraftforge.client.model.generators.IGeneratedBlockState blockstate)
      Register a block state
      Parameters:
      blockName - Name of the block
      blockstate - Block-state associated to the block
    • door

      protected void door(String blockName)
      Block-state builder uses to create a door block-state
      Parameters:
      blockName - Name of the door block
    • button

      protected void button(String blockName)
      Block-state builder uses to create a button block-state
      Parameters:
      blockName - Name of the button block
    • trapdoor

      protected void trapdoor(String blockName)
      Block-state builder uses to create a trapdoor block-state
      Parameters:
      blockName - Name of the trapdoor block
    • stairs

      protected void stairs(String blockName)
      Block-state builder uses to create a stairs block-state
      Parameters:
      blockName - Name of the stairs block
    • slab

      protected void slab(String slabBlockName, String fullBlockName)
      Block-state builder uses to create a door block-state
      Parameters:
      slabBlockName - Name of the slab block
      fullBlockName - Name of the full block
    • pressurePlate

      protected void pressurePlate(String blockName)
      Block-state builder uses to create a pressure plate block-state
      Parameters:
      blockName - Name of the pressure plate block
    • woodenFenceGate

      protected void woodenFenceGate(String blockName)
      Block-state builder uses to create a wooden fence gate block-state
      Parameters:
      blockName - Name of the wooden face gate block
    • woodenFence

      protected void woodenFence(String blockName)
      Block-state builder uses to create a wooden fence block-state
      Parameters:
      blockName - Name of the wooden fence block
    • pillar

      protected void pillar(String blockName)
      Block-state builder uses to create a pillar block-state
      Parameters:
      blockName - Name of the pillar block
    • sapling

      protected void sapling(String blockName)
      Block-state builder uses to create a sapling block-state
      Parameters:
      blockName - Name of the sapling block
    • cubeAll

      protected void cubeAll(String blockName)
      Block-state builder uses to create a default block-state
      Parameters:
      blockName - Name of the block
    • run

      public CompletableFuture<?> run(net.minecraft.data.CachedOutput cache)
      Specified by:
      run in interface net.minecraft.data.DataProvider
    • getName

      public String getName()
      Specified by:
      getName in interface net.minecraft.data.DataProvider