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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockModelProviderprivate static final intprivate final DataGeneratorprivate static final com.google.gson.Gsonprivate final ItemModelProviderprivate static final org.apache.logging.log4j.Loggerprivate final Stringprotected final Map<Block,IGeneratedBlockstate> Fields inherited from interface net.minecraft.data.DataProvider
SHA1 -
Constructor Summary
ConstructorsConstructorDescriptionBlockStateProvider(DataGenerator gen, 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) 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 bottomRight, ModelFile topLeft, ModelFile topRight) private voiddoorBlockInternal(DoorBlock block, String baseName, ResourceLocation bottom, ResourceLocation top) private ResourceLocationextend(ResourceLocation rl, String suffix) voidfenceBlock(FenceBlock block, String name, ResourceLocation texture) voidfenceBlock(FenceBlock block, ResourceLocation texture) 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) voidfourWayBlock(CrossCollisionBlock block, ModelFile post, ModelFile side) voidfourWayMultipart(MultiPartBlockStateBuilder builder, ModelFile side) getName()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) voidlogBlock(RotatedPillarBlock block) 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) voidpressurePlateBlock(PressurePlateBlock block, ResourceLocation texture) voidpressurePlateBlock(PressurePlateBlock block, ModelFile pressurePlate, ModelFile pressurePlateDown) protected abstract voidvoidprivate voidsaveBlockState(HashCache 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) 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) 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) voidwallBlock(WallBlock block, String name, ResourceLocation texture) voidwallBlock(WallBlock block, ResourceLocation texture) voidprivate voidwallBlockInternal(WallBlock block, String baseName, ResourceLocation texture) 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
-
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:
runin 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:
getNamein interfaceDataProvider
-