Fix ladder datagen

This commit is contained in:
DBotThePony 2025-03-17 23:54:08 +07:00
parent 62c05b3c3f
commit aedd545a39
Signed by: DBot
GPG Key ID: DCC23B5715498507
3 changed files with 16 additions and 7 deletions

View File

@ -134,7 +134,7 @@ object DataGen {
blockStateProvider.simplePillar(block)
}
fun decorativeLadder(block: Block){
fun decorativeLadder(block: Block) {
blockModelProvider.decorativeLadder(block)
blockStateProvider.simpleLadder(block)
}

View File

@ -265,7 +265,6 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
itemModelProvider.generatedBlockDecorative(MItems.INDUSTRIAL_LADDER)
itemModelProvider.block(MItems.TIRE_BLOCK)
blockStateProvider.block(MBlocks.METAL_BEAM_CENTER)

View File

@ -124,19 +124,29 @@ class MatteryBlockStateProvider(event: GatherDataEvent) : BlockStateProvider(eve
fun simpleLadder(vararg blocks: Block): MatteryBlockStateProvider {
for (block in blocks) {
exec {
getVariantBuilder(block)
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.NORTH)
.modelForState().modelFile(models().getExistingFile(modLocation("block/decorative/${block.registryName!!.path}"))).addModel()
.modelForState()
.modelFile(models().getExistingFile(modLocation("block/${block.registryName!!.path}")))
.addModel()
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.SOUTH)
.modelForState().modelFile(models().getExistingFile(modLocation("block/decorative/${block.registryName!!.path}"))).rotationY(180).addModel()
.modelForState()
.modelFile(models().getExistingFile(modLocation("block/${block.registryName!!.path}")))
.rotationY(180)
.addModel()
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.WEST)
.modelForState().modelFile(models().getExistingFile(modLocation("block/decorative/${block.registryName!!.path}"))).rotationY(270).addModel()
.modelForState()
.modelFile(models().getExistingFile(modLocation("block/${block.registryName!!.path}")))
.rotationY(270)
.addModel()
.partialState().with(HorizontalDirectionalBlock.FACING, Direction.EAST)
.modelForState().modelFile(models().getExistingFile(modLocation("block/decorative/${block.registryName!!.path}"))).rotationY(90).addModel()
.modelForState()
.modelFile(models().getExistingFile(modLocation("block/${block.registryName!!.path}")))
.rotationY(90)
.addModel()
}
}