Actual fix for ladder datagen

This commit is contained in:
DBotThePony 2025-03-18 00:02:31 +07:00
parent 2f1b698810
commit dec8aab382
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 10 additions and 7 deletions

View File

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

View File

@ -53,9 +53,11 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve
}
fun decorativeLadder(block: Block) {
withExistingParent(block.registryName!!.path, ResourceLocation("minecraft", "block/ladder"))
.texture("texture", modLocation("block/decorative/${block.registryName!!.path}"))
.renderType("cutout")
exec {
withExistingParent(block.registryName!!.path, ResourceLocation("minecraft", "block/ladder"))
.texture("texture", modLocation("block/decorative/${block.registryName!!.path}"))
.renderType("cutout")
}
}
fun decorativeGlassAll(blocks: Collection<Block>) {