Class BlockStateProvider
java.lang.Object
net.minecraftforge.client.model.generators.BlockStateProvider
- All Implemented Interfaces:
DataProvider
Data provider for blockstate files. Extends
BlockModelProvider
so that
blockstates and their referenced models can be provided in tandem.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BlockModelProvider
private static final int
private static final com.google.gson.Gson
private final ItemModelProvider
private static final org.apache.logging.log4j.Logger
private final String
private final PackOutput
protected final Map<Block,
IGeneratedBlockState> Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, KEY_COMPARATOR
-
Constructor Summary
ConstructorDescriptionBlockStateProvider
(PackOutput output, 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) void
axisBlockWithRenderType
(RotatedPillarBlock block, String renderType) void
axisBlockWithRenderType
(RotatedPillarBlock block, ResourceLocation renderType) void
axisBlockWithRenderType
(RotatedPillarBlock block, ResourceLocation baseName, String renderType) void
axisBlockWithRenderType
(RotatedPillarBlock block, ResourceLocation baseName, ResourceLocation renderType) void
axisBlockWithRenderType
(RotatedPillarBlock block, ResourceLocation side, ResourceLocation end, String renderType) void
axisBlockWithRenderType
(RotatedPillarBlock block, ResourceLocation side, ResourceLocation end, ResourceLocation renderType) 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 bottomLeftOpen, ModelFile bottomRight, ModelFile bottomRightOpen, ModelFile topLeft, ModelFile topLeftOpen, ModelFile topRight, ModelFile topRightOpen) private void
doorBlockInternal
(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top) private void
doorBlockInternalWithRenderType
(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) void
doorBlockWithRenderType
(DoorBlock block, String name, ResourceLocation bottom, ResourceLocation top, String renderType) void
doorBlockWithRenderType
(DoorBlock block, String name, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) void
doorBlockWithRenderType
(DoorBlock block, ResourceLocation bottom, ResourceLocation top, String renderType) void
doorBlockWithRenderType
(DoorBlock block, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) private ResourceLocation
extend
(ResourceLocation rl, String suffix) void
fenceBlock
(FenceBlock block, String name, ResourceLocation texture) void
fenceBlock
(FenceBlock block, ResourceLocation texture) void
fenceBlockWithRenderType
(FenceBlock block, String name, ResourceLocation texture, String renderType) void
fenceBlockWithRenderType
(FenceBlock block, String name, ResourceLocation texture, ResourceLocation renderType) void
fenceBlockWithRenderType
(FenceBlock block, ResourceLocation texture, String renderType) void
fenceBlockWithRenderType
(FenceBlock block, ResourceLocation texture, ResourceLocation renderType) 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) private void
fenceGateBlockInternalWithRenderType
(FenceGateBlock block, String baseName, ResourceLocation texture, ResourceLocation renderType) void
fenceGateBlockWithRenderType
(FenceGateBlock block, String name, ResourceLocation texture, String renderType) void
fenceGateBlockWithRenderType
(FenceGateBlock block, String name, ResourceLocation texture, ResourceLocation renderType) void
fenceGateBlockWithRenderType
(FenceGateBlock block, ResourceLocation texture, String renderType) void
fenceGateBlockWithRenderType
(FenceGateBlock block, ResourceLocation texture, ResourceLocation renderType) void
fourWayBlock
(CrossCollisionBlock block, ModelFile post, ModelFile side) void
fourWayMultipart
(MultiPartBlockStateBuilder builder, ModelFile side) @NotNull String
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) private ResourceLocation
void
logBlock
(RotatedPillarBlock block) void
logBlockWithRenderType
(RotatedPillarBlock block, String renderType) void
logBlockWithRenderType
(RotatedPillarBlock block, ResourceLocation renderType) 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) private void
paneBlockInternalWithRenderType
(IronBarsBlock block, String baseName, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) void
paneBlockWithRenderType
(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge, String renderType) void
paneBlockWithRenderType
(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) void
paneBlockWithRenderType
(IronBarsBlock block, ResourceLocation pane, ResourceLocation edge, String renderType) void
paneBlockWithRenderType
(IronBarsBlock block, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) void
pressurePlateBlock
(PressurePlateBlock block, ResourceLocation texture) void
pressurePlateBlock
(PressurePlateBlock block, ModelFile pressurePlate, ModelFile pressurePlateDown) protected abstract void
run
(CachedOutput cache) private CompletableFuture<?>
saveBlockState
(CachedOutput 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
simpleBlockWithItem
(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) private void
stairsBlockInternalWithRenderType
(StairBlock block, String baseName, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) void
stairsBlockWithRenderType
(StairBlock block, String name, ResourceLocation texture, String renderType) void
stairsBlockWithRenderType
(StairBlock block, String name, ResourceLocation texture, ResourceLocation renderType) void
stairsBlockWithRenderType
(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, String renderType) void
stairsBlockWithRenderType
(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) void
stairsBlockWithRenderType
(StairBlock block, ResourceLocation texture, String renderType) void
stairsBlockWithRenderType
(StairBlock block, ResourceLocation texture, ResourceLocation renderType) void
stairsBlockWithRenderType
(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, String renderType) void
stairsBlockWithRenderType
(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) 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) private void
trapdoorBlockInternalWithRenderType
(TrapDoorBlock block, String baseName, ResourceLocation texture, boolean orientable, ResourceLocation renderType) void
trapdoorBlockWithRenderType
(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable, String renderType) void
trapdoorBlockWithRenderType
(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable, ResourceLocation renderType) void
trapdoorBlockWithRenderType
(TrapDoorBlock block, ResourceLocation texture, boolean orientable, String renderType) void
trapdoorBlockWithRenderType
(TrapDoorBlock block, ResourceLocation texture, boolean orientable, ResourceLocation renderType) 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
wallBlockInternalWithRenderType
(WallBlock block, String baseName, ResourceLocation texture, ResourceLocation renderType) void
wallBlockWithRenderType
(WallBlock block, String name, ResourceLocation texture, String renderType) void
wallBlockWithRenderType
(WallBlock block, String name, ResourceLocation texture, ResourceLocation renderType) void
wallBlockWithRenderType
(WallBlock block, ResourceLocation texture, String renderType) void
wallBlockWithRenderType
(WallBlock block, ResourceLocation texture, ResourceLocation renderType) 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
-
output
-
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
-
registerStatesAndModels
protected abstract void registerStatesAndModels() -
getVariantBuilder
-
getMultipartBuilder
-
models
-
itemModels
-
modLoc
-
mcLoc
-
key
-
name
-
blockTexture
-
extend
-
cubeAll
-
simpleBlock
-
simpleBlock
-
simpleBlock
-
simpleBlockItem
-
simpleBlockWithItem
-
simpleBlock
-
axisBlock
-
logBlock
-
axisBlock
-
axisBlock
-
axisBlockWithRenderType
-
logBlockWithRenderType
-
axisBlockWithRenderType
public void axisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation baseName, String renderType) -
axisBlockWithRenderType
public void axisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation side, ResourceLocation end, String renderType) -
axisBlockWithRenderType
-
logBlockWithRenderType
-
axisBlockWithRenderType
public void axisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation baseName, ResourceLocation renderType) -
axisBlockWithRenderType
public void axisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation side, ResourceLocation end, ResourceLocation renderType) -
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) -
stairsBlockWithRenderType
public void stairsBlockWithRenderType(StairBlock block, ResourceLocation texture, String renderType) -
stairsBlockWithRenderType
public void stairsBlockWithRenderType(StairBlock block, String name, ResourceLocation texture, String renderType) -
stairsBlockWithRenderType
public void stairsBlockWithRenderType(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, String renderType) -
stairsBlockWithRenderType
public void stairsBlockWithRenderType(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, String renderType) -
stairsBlockWithRenderType
public void stairsBlockWithRenderType(StairBlock block, ResourceLocation texture, ResourceLocation renderType) -
stairsBlockWithRenderType
public void stairsBlockWithRenderType(StairBlock block, String name, ResourceLocation texture, ResourceLocation renderType) -
stairsBlockWithRenderType
public void stairsBlockWithRenderType(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) -
stairsBlockWithRenderType
public void stairsBlockWithRenderType(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) -
stairsBlockInternal
private void stairsBlockInternal(StairBlock block, String baseName, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) -
stairsBlockInternalWithRenderType
private void stairsBlockInternalWithRenderType(StairBlock block, String baseName, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) -
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
-
fenceBlockWithRenderType
-
fenceBlockWithRenderType
public void fenceBlockWithRenderType(FenceBlock block, String name, ResourceLocation texture, String renderType) -
fenceBlockWithRenderType
public void fenceBlockWithRenderType(FenceBlock block, ResourceLocation texture, ResourceLocation renderType) -
fenceBlockWithRenderType
public void fenceBlockWithRenderType(FenceBlock block, String name, ResourceLocation texture, ResourceLocation renderType) -
fenceGateBlock
-
fenceGateBlock
-
fenceGateBlockWithRenderType
public void fenceGateBlockWithRenderType(FenceGateBlock block, ResourceLocation texture, String renderType) -
fenceGateBlockWithRenderType
public void fenceGateBlockWithRenderType(FenceGateBlock block, String name, ResourceLocation texture, String renderType) -
fenceGateBlockWithRenderType
public void fenceGateBlockWithRenderType(FenceGateBlock block, ResourceLocation texture, ResourceLocation renderType) -
fenceGateBlockWithRenderType
public void fenceGateBlockWithRenderType(FenceGateBlock block, String name, ResourceLocation texture, ResourceLocation renderType) -
fenceGateBlockInternal
private void fenceGateBlockInternal(FenceGateBlock block, String baseName, ResourceLocation texture) -
fenceGateBlockInternalWithRenderType
private void fenceGateBlockInternalWithRenderType(FenceGateBlock block, String baseName, ResourceLocation texture, ResourceLocation renderType) -
fenceGateBlock
public void fenceGateBlock(FenceGateBlock block, ModelFile gate, ModelFile gateOpen, ModelFile gateWall, ModelFile gateWallOpen) -
wallBlock
-
wallBlock
-
wallBlockWithRenderType
-
wallBlockWithRenderType
public void wallBlockWithRenderType(WallBlock block, String name, ResourceLocation texture, String renderType) -
wallBlockWithRenderType
public void wallBlockWithRenderType(WallBlock block, ResourceLocation texture, ResourceLocation renderType) -
wallBlockWithRenderType
public void wallBlockWithRenderType(WallBlock block, String name, ResourceLocation texture, ResourceLocation renderType) -
wallBlockInternal
-
wallBlockInternalWithRenderType
private void wallBlockInternalWithRenderType(WallBlock block, String baseName, ResourceLocation texture, ResourceLocation renderType) -
wallBlock
-
wallSidePart
-
paneBlock
-
paneBlock
public void paneBlock(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge) -
paneBlockWithRenderType
public void paneBlockWithRenderType(IronBarsBlock block, ResourceLocation pane, ResourceLocation edge, String renderType) -
paneBlockWithRenderType
public void paneBlockWithRenderType(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge, String renderType) -
paneBlockWithRenderType
public void paneBlockWithRenderType(IronBarsBlock block, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) -
paneBlockWithRenderType
public void paneBlockWithRenderType(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) -
paneBlockInternal
private void paneBlockInternal(IronBarsBlock block, String baseName, ResourceLocation pane, ResourceLocation edge) -
paneBlockInternalWithRenderType
private void paneBlockInternalWithRenderType(IronBarsBlock block, String baseName, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) -
paneBlock
-
doorBlock
-
doorBlock
-
doorBlockWithRenderType
public void doorBlockWithRenderType(DoorBlock block, ResourceLocation bottom, ResourceLocation top, String renderType) -
doorBlockWithRenderType
public void doorBlockWithRenderType(DoorBlock block, String name, ResourceLocation bottom, ResourceLocation top, String renderType) -
doorBlockWithRenderType
public void doorBlockWithRenderType(DoorBlock block, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) -
doorBlockWithRenderType
public void doorBlockWithRenderType(DoorBlock block, String name, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) -
doorBlockInternal
private void doorBlockInternal(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top) -
doorBlockInternalWithRenderType
private void doorBlockInternalWithRenderType(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) -
doorBlock
-
trapdoorBlock
-
trapdoorBlock
public void trapdoorBlock(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable) -
trapdoorBlockWithRenderType
public void trapdoorBlockWithRenderType(TrapDoorBlock block, ResourceLocation texture, boolean orientable, String renderType) -
trapdoorBlockWithRenderType
public void trapdoorBlockWithRenderType(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable, String renderType) -
trapdoorBlockWithRenderType
public void trapdoorBlockWithRenderType(TrapDoorBlock block, ResourceLocation texture, boolean orientable, ResourceLocation renderType) -
trapdoorBlockWithRenderType
public void trapdoorBlockWithRenderType(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable, ResourceLocation renderType) -
trapdoorBlockInternal
private void trapdoorBlockInternal(TrapDoorBlock block, String baseName, ResourceLocation texture, boolean orientable) -
trapdoorBlockInternalWithRenderType
private void trapdoorBlockInternalWithRenderType(TrapDoorBlock block, String baseName, ResourceLocation texture, boolean orientable, ResourceLocation renderType) -
trapdoorBlock
public void trapdoorBlock(TrapDoorBlock block, ModelFile bottom, ModelFile top, ModelFile open, boolean orientable) -
saveBlockState
private CompletableFuture<?> saveBlockState(CachedOutput cache, com.google.gson.JsonObject stateJson, Block owner) -
getName
- Specified by:
getName
in interfaceDataProvider
-