From 0b74f5be272f57a65d277add3a7e6e9ee55c0764 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 2 Mar 2023 17:11:26 +0700 Subject: [PATCH] =?UTF-8?q?=D0=B3=D0=B8=D1=80=D1=88=D0=BE=D0=BA=D1=83=20?= =?UTF-8?q?=D0=BD=D1=83=D0=B6=D0=BD=D1=8B=20blockstate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/dbotthepony/mc/otm/datagen/DecorativeData.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DecorativeData.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DecorativeData.kt index d1e531f91..b135513aa 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DecorativeData.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DecorativeData.kt @@ -1,6 +1,7 @@ package ru.dbotthepony.mc.otm.datagen 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.StairBlock import net.minecraft.world.level.block.WallBlock @@ -38,6 +39,17 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr 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) { DataGen.decorativeStairs(block as StairBlock, MRegistry.TRITANIUM_BLOCK.allBlocks[color]!!.registryName!!.path, MRegistry.TRITANIUM_BLOCK.allBlocks[color]!!.registryName!!.path) }