Class BlockStateProvider
java.lang.Object
net.minecraftforge.client.model.generators.BlockStateProvider
- All Implemented Interfaces:
DataProvider
- Direct Known Subclasses:
CustomTransformTypeTest.BlockStateModels
,DataGeneratorTest.BlockStates
,NewModelLoaderTest.BlockStates
,PistonEventTest.BlockStates
,ScaffoldingTest.ScaffoldingBlockState
Data provider for blockstate files. Extends
BlockModelProvider
so that
blockstates and their referenced models can be provided in tandem.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BlockModelProvider
private static final int
private final DataGenerator
private static final com.google.gson.Gson
private final ItemModelProvider
private static final org.apache.logging.log4j.Logger
private final String
protected final Map<Block,
IGeneratedBlockstate> Fields inherited from interface net.minecraft.data.DataProvider
SHA1
-
Constructor Summary
ConstructorDescriptionBlockStateProvider
(DataGenerator gen, String modid, ExistingFileHelper exFileHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
axisBlock
(RotatedPillarBlock block) void
axisBlock
(RotatedPillarBlock block, ResourceLocation baseName) void
axisBlock
(RotatedPillarBlock block, ResourceLocation side, ResourceLocation end) void
axisBlock
(RotatedPillarBlock block, ModelFile vertical, ModelFile horizontal) blockTexture
(Block block) void
buttonBlock
(ButtonBlock block, ResourceLocation texture) void
buttonBlock
(ButtonBlock block, ModelFile button, ModelFile buttonPressed) void
directionalBlock
(Block block, Function<BlockState, ModelFile> modelFunc) void
directionalBlock
(Block block, Function<BlockState, ModelFile> modelFunc, int angleOffset) void
directionalBlock
(Block block, ModelFile model) void
directionalBlock
(Block block, ModelFile model, int angleOffset) void
doorBlock
(DoorBlock block, String name, ResourceLocation bottom, ResourceLocation top) void
doorBlock
(DoorBlock block, ResourceLocation bottom, ResourceLocation top) void
doorBlock
(DoorBlock block, ModelFile bottomLeft, ModelFile bottomRight, ModelFile topLeft, ModelFile topRight) private void
doorBlockInternal
(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top) private ResourceLocation
extend
(ResourceLocation rl, String suffix) void
fenceBlock
(FenceBlock block, String name, ResourceLocation texture) void
fenceBlock
(FenceBlock block, ResourceLocation texture) void
fenceGateBlock
(FenceGateBlock block, String name, ResourceLocation texture) void
fenceGateBlock
(FenceGateBlock block, ResourceLocation texture) void
fenceGateBlock
(FenceGateBlock block, ModelFile gate, ModelFile gateOpen, ModelFile gateWall, ModelFile gateWallOpen) private void
fenceGateBlockInternal
(FenceGateBlock block, String baseName, ResourceLocation texture) void
fourWayBlock
(CrossCollisionBlock block, ModelFile post, ModelFile side) void
fourWayMultipart
(MultiPartBlockStateBuilder builder, ModelFile side) getName()
void
horizontalBlock
(Block block, Function<BlockState, ModelFile> modelFunc) void
horizontalBlock
(Block block, Function<BlockState, ModelFile> modelFunc, int angleOffset) void
horizontalBlock
(Block block, ResourceLocation side, ResourceLocation front, ResourceLocation top) void
horizontalBlock
(Block block, ModelFile model) void
horizontalBlock
(Block block, ModelFile model, int angleOffset) void
horizontalFaceBlock
(Block block, Function<BlockState, ModelFile> modelFunc) void
horizontalFaceBlock
(Block block, Function<BlockState, ModelFile> modelFunc, int angleOffset) void
horizontalFaceBlock
(Block block, ModelFile model) void
horizontalFaceBlock
(Block block, ModelFile model, int angleOffset) void
logBlock
(RotatedPillarBlock block) models()
private String
void
paneBlock
(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge) void
paneBlock
(IronBarsBlock block, ResourceLocation pane, ResourceLocation edge) void
paneBlock
(IronBarsBlock block, ModelFile post, ModelFile side, ModelFile sideAlt, ModelFile noSide, ModelFile noSideAlt) private void
paneBlockInternal
(IronBarsBlock block, String baseName, ResourceLocation pane, ResourceLocation edge) void
pressurePlateBlock
(PressurePlateBlock block, ResourceLocation texture) void
pressurePlateBlock
(PressurePlateBlock block, ModelFile pressurePlate, ModelFile pressurePlateDown) protected abstract void
void
private void
saveBlockState
(HashCache cache, com.google.gson.JsonObject stateJson, Block owner) void
signBlock
(StandingSignBlock signBlock, WallSignBlock wallSignBlock, ResourceLocation texture) void
signBlock
(StandingSignBlock signBlock, WallSignBlock wallSignBlock, ModelFile sign) void
simpleBlock
(Block block) void
simpleBlock
(Block block, Function<ModelFile, ConfiguredModel[]> expander) void
simpleBlock
(Block block, ConfiguredModel... models) void
simpleBlock
(Block block, ModelFile model) void
simpleBlockItem
(Block block, ModelFile model) void
slabBlock
(SlabBlock block, ResourceLocation doubleslab, ResourceLocation texture) void
slabBlock
(SlabBlock block, ResourceLocation doubleslab, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) void
void
stairsBlock
(StairBlock block, String name, ResourceLocation texture) void
stairsBlock
(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) void
stairsBlock
(StairBlock block, ResourceLocation texture) void
stairsBlock
(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) void
stairsBlock
(StairBlock block, ModelFile stairs, ModelFile stairsInner, ModelFile stairsOuter) private void
stairsBlockInternal
(StairBlock block, String baseName, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) void
trapdoorBlock
(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable) void
trapdoorBlock
(TrapDoorBlock block, ResourceLocation texture, boolean orientable) void
trapdoorBlock
(TrapDoorBlock block, ModelFile bottom, ModelFile top, ModelFile open, boolean orientable) private void
trapdoorBlockInternal
(TrapDoorBlock block, String baseName, ResourceLocation texture, boolean orientable) void
wallBlock
(WallBlock block, String name, ResourceLocation texture) void
wallBlock
(WallBlock block, ResourceLocation texture) void
private void
wallBlockInternal
(WallBlock block, String baseName, ResourceLocation texture) private void
wallSidePart
(MultiPartBlockStateBuilder builder, ModelFile model, Map.Entry<Direction, Property<WallSide>> entry, WallSide height)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
GSON
private static final com.google.gson.Gson GSON -
registeredBlocks
-
generator
-
modid
-
blockModels
-
itemModels
-
DEFAULT_ANGLE_OFFSET
private static final int DEFAULT_ANGLE_OFFSET- See Also:
-
WALL_PROPS
-
-
Constructor Details
-
BlockStateProvider
-
-
Method Details
-
run
- Specified by:
run
in interfaceDataProvider
- Throws:
IOException
-
registerStatesAndModels
protected abstract void registerStatesAndModels() -
getVariantBuilder
-
getMultipartBuilder
-
models
-
itemModels
-
modLoc
-
mcLoc
-
name
-
blockTexture
-
extend
-
cubeAll
-
simpleBlock
-
simpleBlock
-
simpleBlock
-
simpleBlockItem
-
simpleBlock
-
axisBlock
-
logBlock
-
axisBlock
-
axisBlock
-
axisBlock
-
horizontalBlock
public void horizontalBlock(Block block, ResourceLocation side, ResourceLocation front, ResourceLocation top) -
horizontalBlock
-
horizontalBlock
-
horizontalBlock
-
horizontalBlock
-
horizontalFaceBlock
-
horizontalFaceBlock
-
horizontalFaceBlock
-
horizontalFaceBlock
public void horizontalFaceBlock(Block block, Function<BlockState, ModelFile> modelFunc, int angleOffset) -
directionalBlock
-
directionalBlock
-
directionalBlock
-
directionalBlock
public void directionalBlock(Block block, Function<BlockState, ModelFile> modelFunc, int angleOffset) -
stairsBlock
-
stairsBlock
-
stairsBlock
public void stairsBlock(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
stairsBlock
public void stairsBlock(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
stairsBlockInternal
private void stairsBlockInternal(StairBlock block, String baseName, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
stairsBlock
public void stairsBlock(StairBlock block, ModelFile stairs, ModelFile stairsInner, ModelFile stairsOuter) -
slabBlock
-
slabBlock
public void slabBlock(SlabBlock block, ResourceLocation doubleslab, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
slabBlock
-
buttonBlock
-
buttonBlock
-
pressurePlateBlock
-
pressurePlateBlock
public void pressurePlateBlock(PressurePlateBlock block, ModelFile pressurePlate, ModelFile pressurePlateDown) -
signBlock
public void signBlock(StandingSignBlock signBlock, WallSignBlock wallSignBlock, ResourceLocation texture) -
signBlock
-
fourWayBlock
-
fourWayMultipart
-
fenceBlock
-
fenceBlock
-
fenceGateBlock
-
fenceGateBlock
-
fenceGateBlockInternal
private void fenceGateBlockInternal(FenceGateBlock block, String baseName, ResourceLocation texture) -
fenceGateBlock
public void fenceGateBlock(FenceGateBlock block, ModelFile gate, ModelFile gateOpen, ModelFile gateWall, ModelFile gateWallOpen) -
wallBlock
-
wallBlock
-
wallBlockInternal
-
wallBlock
-
wallSidePart
-
paneBlock
-
paneBlock
public void paneBlock(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge) -
paneBlockInternal
private void paneBlockInternal(IronBarsBlock block, String baseName, ResourceLocation pane, ResourceLocation edge) -
paneBlock
-
doorBlock
-
doorBlock
-
doorBlockInternal
private void doorBlockInternal(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top) -
doorBlock
-
trapdoorBlock
-
trapdoorBlock
public void trapdoorBlock(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable) -
trapdoorBlockInternal
private void trapdoorBlockInternal(TrapDoorBlock block, String baseName, ResourceLocation texture, boolean orientable) -
trapdoorBlock
public void trapdoorBlock(TrapDoorBlock block, ModelFile bottom, ModelFile top, ModelFile open, boolean orientable) -
saveBlockState
-
getName
- Specified by:
getName
in interfaceDataProvider
-