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 ClassesNested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockModelProviderprivate static final intprivate static final com.google.gson.Gsonprivate final ItemModelProviderprivate static final org.apache.logging.log4j.Loggerprivate final Stringprivate final PackOutputprotected final Map<Block, IGeneratedBlockState> Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, KEY_COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionBlockStateProvider(PackOutput output, String modid, ExistingFileHelper exFileHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoidaxisBlock(RotatedPillarBlock block) voidaxisBlock(RotatedPillarBlock block, ResourceLocation baseName) voidaxisBlock(RotatedPillarBlock block, ResourceLocation side, ResourceLocation end) voidaxisBlock(RotatedPillarBlock block, ModelFile vertical, ModelFile horizontal) voidaxisBlockWithRenderType(RotatedPillarBlock block, String renderType) voidaxisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation renderType) voidaxisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation baseName, String renderType) voidaxisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation baseName, ResourceLocation renderType) voidaxisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation side, ResourceLocation end, String renderType) voidaxisBlockWithRenderType(RotatedPillarBlock block, ResourceLocation side, ResourceLocation end, ResourceLocation renderType) blockTexture(Block block) voidbuttonBlock(ButtonBlock block, ResourceLocation texture) voidbuttonBlock(ButtonBlock block, ModelFile button, ModelFile buttonPressed) voiddirectionalBlock(Block block, Function<BlockState, ModelFile> modelFunc) voiddirectionalBlock(Block block, Function<BlockState, ModelFile> modelFunc, int angleOffset) voiddirectionalBlock(Block block, ModelFile model) voiddirectionalBlock(Block block, ModelFile model, int angleOffset) voiddoorBlock(DoorBlock block, String name, ResourceLocation bottom, ResourceLocation top) voiddoorBlock(DoorBlock block, ResourceLocation bottom, ResourceLocation top) voiddoorBlock(DoorBlock block, ModelFile bottomLeft, ModelFile bottomLeftOpen, ModelFile bottomRight, ModelFile bottomRightOpen, ModelFile topLeft, ModelFile topLeftOpen, ModelFile topRight, ModelFile topRightOpen) private voiddoorBlockInternal(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top) private voiddoorBlockInternalWithRenderType(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) voiddoorBlockWithRenderType(DoorBlock block, String name, ResourceLocation bottom, ResourceLocation top, String renderType) voiddoorBlockWithRenderType(DoorBlock block, String name, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) voiddoorBlockWithRenderType(DoorBlock block, ResourceLocation bottom, ResourceLocation top, String renderType) voiddoorBlockWithRenderType(DoorBlock block, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) private ResourceLocationextend(ResourceLocation rl, String suffix) voidfenceBlock(FenceBlock block, String name, ResourceLocation texture) voidfenceBlock(FenceBlock block, ResourceLocation texture) voidfenceBlockWithRenderType(FenceBlock block, String name, ResourceLocation texture, String renderType) voidfenceBlockWithRenderType(FenceBlock block, String name, ResourceLocation texture, ResourceLocation renderType) voidfenceBlockWithRenderType(FenceBlock block, ResourceLocation texture, String renderType) voidfenceBlockWithRenderType(FenceBlock block, ResourceLocation texture, ResourceLocation renderType) voidfenceGateBlock(FenceGateBlock block, String name, ResourceLocation texture) voidfenceGateBlock(FenceGateBlock block, ResourceLocation texture) voidfenceGateBlock(FenceGateBlock block, ModelFile gate, ModelFile gateOpen, ModelFile gateWall, ModelFile gateWallOpen) private voidfenceGateBlockInternal(FenceGateBlock block, String baseName, ResourceLocation texture) private voidfenceGateBlockInternalWithRenderType(FenceGateBlock block, String baseName, ResourceLocation texture, ResourceLocation renderType) voidfenceGateBlockWithRenderType(FenceGateBlock block, String name, ResourceLocation texture, String renderType) voidfenceGateBlockWithRenderType(FenceGateBlock block, String name, ResourceLocation texture, ResourceLocation renderType) voidfenceGateBlockWithRenderType(FenceGateBlock block, ResourceLocation texture, String renderType) voidfenceGateBlockWithRenderType(FenceGateBlock block, ResourceLocation texture, ResourceLocation renderType) voidfourWayBlock(CrossCollisionBlock block, ModelFile post, ModelFile side) voidfourWayMultipart(MultiPartBlockStateBuilder builder, ModelFile side) @NotNull StringgetName()voidhorizontalBlock(Block block, Function<BlockState, ModelFile> modelFunc) voidhorizontalBlock(Block block, Function<BlockState, ModelFile> modelFunc, int angleOffset) voidhorizontalBlock(Block block, ResourceLocation side, ResourceLocation front, ResourceLocation top) voidhorizontalBlock(Block block, ModelFile model) voidhorizontalBlock(Block block, ModelFile model, int angleOffset) voidhorizontalFaceBlock(Block block, Function<BlockState, ModelFile> modelFunc) voidhorizontalFaceBlock(Block block, Function<BlockState, ModelFile> modelFunc, int angleOffset) voidhorizontalFaceBlock(Block block, ModelFile model) voidhorizontalFaceBlock(Block block, ModelFile model, int angleOffset) private ResourceLocationvoidlogBlock(RotatedPillarBlock block) voidlogBlockWithRenderType(RotatedPillarBlock block, String renderType) voidlogBlockWithRenderType(RotatedPillarBlock block, ResourceLocation renderType) models()private StringvoidpaneBlock(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge) voidpaneBlock(IronBarsBlock block, ResourceLocation pane, ResourceLocation edge) voidpaneBlock(IronBarsBlock block, ModelFile post, ModelFile side, ModelFile sideAlt, ModelFile noSide, ModelFile noSideAlt) private voidpaneBlockInternal(IronBarsBlock block, String baseName, ResourceLocation pane, ResourceLocation edge) private voidpaneBlockInternalWithRenderType(IronBarsBlock block, String baseName, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) voidpaneBlockWithRenderType(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge, String renderType) voidpaneBlockWithRenderType(IronBarsBlock block, String name, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) voidpaneBlockWithRenderType(IronBarsBlock block, ResourceLocation pane, ResourceLocation edge, String renderType) voidpaneBlockWithRenderType(IronBarsBlock block, ResourceLocation pane, ResourceLocation edge, ResourceLocation renderType) voidpressurePlateBlock(PressurePlateBlock block, ResourceLocation texture) voidpressurePlateBlock(PressurePlateBlock block, ModelFile pressurePlate, ModelFile pressurePlateDown) protected abstract voidrun(CachedOutput cache) private CompletableFuture<?> saveBlockState(CachedOutput cache, com.google.gson.JsonObject stateJson, Block owner) voidsignBlock(StandingSignBlock signBlock, WallSignBlock wallSignBlock, ResourceLocation texture) voidsignBlock(StandingSignBlock signBlock, WallSignBlock wallSignBlock, ModelFile sign) voidsimpleBlock(Block block) voidsimpleBlock(Block block, Function<ModelFile, ConfiguredModel[]> expander) voidsimpleBlock(Block block, ConfiguredModel... models) voidsimpleBlock(Block block, ModelFile model) voidsimpleBlockItem(Block block, ModelFile model) voidsimpleBlockWithItem(Block block, ModelFile model) voidslabBlock(SlabBlock block, ResourceLocation doubleslab, ResourceLocation texture) voidslabBlock(SlabBlock block, ResourceLocation doubleslab, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) voidvoidstairsBlock(StairBlock block, String name, ResourceLocation texture) voidstairsBlock(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) voidstairsBlock(StairBlock block, ResourceLocation texture) voidstairsBlock(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) voidstairsBlock(StairBlock block, ModelFile stairs, ModelFile stairsInner, ModelFile stairsOuter) private voidstairsBlockInternal(StairBlock block, String baseName, ResourceLocation side, ResourceLocation bottom, ResourceLocation top) private voidstairsBlockInternalWithRenderType(StairBlock block, String baseName, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) voidstairsBlockWithRenderType(StairBlock block, String name, ResourceLocation texture, String renderType) voidstairsBlockWithRenderType(StairBlock block, String name, ResourceLocation texture, ResourceLocation renderType) voidstairsBlockWithRenderType(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, String renderType) voidstairsBlockWithRenderType(StairBlock block, String name, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) voidstairsBlockWithRenderType(StairBlock block, ResourceLocation texture, String renderType) voidstairsBlockWithRenderType(StairBlock block, ResourceLocation texture, ResourceLocation renderType) voidstairsBlockWithRenderType(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, String renderType) voidstairsBlockWithRenderType(StairBlock block, ResourceLocation side, ResourceLocation bottom, ResourceLocation top, ResourceLocation renderType) voidtrapdoorBlock(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable) voidtrapdoorBlock(TrapDoorBlock block, ResourceLocation texture, boolean orientable) voidtrapdoorBlock(TrapDoorBlock block, ModelFile bottom, ModelFile top, ModelFile open, boolean orientable) private voidtrapdoorBlockInternal(TrapDoorBlock block, String baseName, ResourceLocation texture, boolean orientable) private voidtrapdoorBlockInternalWithRenderType(TrapDoorBlock block, String baseName, ResourceLocation texture, boolean orientable, ResourceLocation renderType) voidtrapdoorBlockWithRenderType(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable, String renderType) voidtrapdoorBlockWithRenderType(TrapDoorBlock block, String name, ResourceLocation texture, boolean orientable, ResourceLocation renderType) voidtrapdoorBlockWithRenderType(TrapDoorBlock block, ResourceLocation texture, boolean orientable, String renderType) voidtrapdoorBlockWithRenderType(TrapDoorBlock block, ResourceLocation texture, boolean orientable, ResourceLocation renderType) voidwallBlock(WallBlock block, String name, ResourceLocation texture) voidwallBlock(WallBlock block, ResourceLocation texture) voidprivate voidwallBlockInternal(WallBlock block, String baseName, ResourceLocation texture) private voidwallBlockInternalWithRenderType(WallBlock block, String baseName, ResourceLocation texture, ResourceLocation renderType) voidwallBlockWithRenderType(WallBlock block, String name, ResourceLocation texture, String renderType) voidwallBlockWithRenderType(WallBlock block, String name, ResourceLocation texture, ResourceLocation renderType) voidwallBlockWithRenderType(WallBlock block, ResourceLocation texture, String renderType) voidwallBlockWithRenderType(WallBlock block, ResourceLocation texture, ResourceLocation renderType) private voidwallSidePart(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:
runin 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:
getNamein interfaceDataProvider
-