гиршоку нужны blockstate

This commit is contained in:
DBotThePony 2023-03-02 17:11:26 +07:00
parent 04f8da559b
commit 0b74f5be27
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -1,6 +1,7 @@
package ru.dbotthepony.mc.otm.datagen package ru.dbotthepony.mc.otm.datagen
import net.minecraft.resources.ResourceLocation import net.minecraft.resources.ResourceLocation
import net.minecraft.world.level.block.AnvilBlock
import net.minecraft.world.level.block.SlabBlock import net.minecraft.world.level.block.SlabBlock
import net.minecraft.world.level.block.StairBlock import net.minecraft.world.level.block.StairBlock
import net.minecraft.world.level.block.WallBlock import net.minecraft.world.level.block.WallBlock
@ -38,6 +39,17 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
DataGen.decoratives(MRegistry.TRITANIUM_BLOCK) DataGen.decoratives(MRegistry.TRITANIUM_BLOCK)
for (anvil in MBlocks.TRITANIUM_ANVIL) {
blockStateProvider.exec {
blockStateProvider.getVariantBuilder(anvil).forAllStates {
ConfiguredModel.builder()
.modelFile(blockStateProvider.models().getExistingFile(modLocation("blocks/${anvil.registryName!!.path}")))
.rotationY(it[AnvilBlock.FACING].yRotationBlockstateNorth())
.build()
}
}
}
for ((color, block) in MRegistry.TRITANIUM_STAIRS.allBlocks) { for ((color, block) in MRegistry.TRITANIUM_STAIRS.allBlocks) {
DataGen.decorativeStairs(block as StairBlock, MRegistry.TRITANIUM_BLOCK.allBlocks[color]!!.registryName!!.path, MRegistry.TRITANIUM_BLOCK.allBlocks[color]!!.registryName!!.path) DataGen.decorativeStairs(block as StairBlock, MRegistry.TRITANIUM_BLOCK.allBlocks[color]!!.registryName!!.path, MRegistry.TRITANIUM_BLOCK.allBlocks[color]!!.registryName!!.path)
} }