Class DioBlockStateBuilder

java.lang.Object
fr.alasdiablo.diolib.api.data.blockstate.DioBlockStateBuilder
All Implemented Interfaces:
net.minecraftforge.client.model.generators.IGeneratedBlockState

public class DioBlockStateBuilder extends Object implements net.minecraftforge.client.model.generators.IGeneratedBlockState
Class used to create simple blockstate
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add a blockstate variant
    void
    addVariants(@NotNull String stateNameIn, int rotateXIn, int rotateYIn, boolean uvlock, @NotNull net.minecraft.resources.ResourceLocation modelPathIn)
    Create a simple blockstate with rotation and uvlock
    void
    addVariants(@NotNull String stateNameIn, int rotateXIn, int rotateYIn, @NotNull net.minecraft.resources.ResourceLocation modelPathIn)
    Create a simple blockstate with rotation
    void
    addVariants(String stateNameIn, @NotNull net.minecraft.resources.ResourceLocation modelPathIn)
    Create a simple blockstate
    @NotNull com.google.gson.JsonObject
    Export the blockstate into json

    Methods inherited from class java.lang.Object

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

    • DioBlockStateBuilder

      public DioBlockStateBuilder()
      Default constructor
  • Method Details

    • addVariants

      public void addVariants(@NotNull @NotNull String stateNameIn, int rotateXIn, int rotateYIn, boolean uvlock, @NotNull @NotNull net.minecraft.resources.ResourceLocation modelPathIn)
      Create a simple blockstate with rotation and uvlock
      Parameters:
      stateNameIn - Name of the state
      rotateXIn - Rotation on x of the state
      rotateYIn - Rotation on y of the state
      uvlock - UVLock of the state
      modelPathIn - Model use by the state
    • addVariants

      public void addVariants(@NotNull @NotNull String stateNameIn, int rotateXIn, int rotateYIn, @NotNull @NotNull net.minecraft.resources.ResourceLocation modelPathIn)
      Create a simple blockstate with rotation
      Parameters:
      stateNameIn - Name of the state
      rotateXIn - Rotation on x of the state
      rotateYIn - Rotation on y of the state
      modelPathIn - Model use by the state
    • addVariants

      public void addVariants(String stateNameIn, @NotNull @NotNull net.minecraft.resources.ResourceLocation modelPathIn)
      Create a simple blockstate
      Parameters:
      stateNameIn - Name of the state
      modelPathIn - Model use by the state
    • addVariants

      public void addVariants(@NotNull @NotNull DioBlockStateVariant variant)
      Add a blockstate variant
      Parameters:
      variant - blockstate variant
    • toJson

      @NotNull public @NotNull com.google.gson.JsonObject toJson()
      Export the blockstate into json
      Specified by:
      toJson in interface net.minecraftforge.client.model.generators.IGeneratedBlockState
      Returns:
      Json representation of the blockstate