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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVariants(@NotNull DioBlockStateVariant variant) Add a blockstate variantvoidaddVariants(@NotNull String stateNameIn, int rotateXIn, int rotateYIn, boolean uvlock, @NotNull net.minecraft.resources.ResourceLocation modelPathIn) Create a simple blockstate with rotation and uvlockvoidaddVariants(@NotNull String stateNameIn, int rotateXIn, int rotateYIn, @NotNull net.minecraft.resources.ResourceLocation modelPathIn) Create a simple blockstate with rotationvoidaddVariants(String stateNameIn, @NotNull net.minecraft.resources.ResourceLocation modelPathIn) Create a simple blockstate@NotNull com.google.gson.JsonObjecttoJson()Export the blockstate into json
-
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 staterotateXIn- Rotation on x of the staterotateYIn- Rotation on y of the stateuvlock- UVLock of the statemodelPathIn- 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 staterotateXIn- Rotation on x of the staterotateYIn- Rotation on y of the statemodelPathIn- 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 statemodelPathIn- Model use by the state
-
addVariants
Add a blockstate variant- Parameters:
variant- blockstate variant
-
toJson
@NotNull public @NotNull com.google.gson.JsonObject toJson()Export the blockstate into json- Specified by:
toJsonin interfacenet.minecraftforge.client.model.generators.IGeneratedBlockState- Returns:
- Json representation of the blockstate
-