Merge branch '1.19.4' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into 1.19.3
This commit is contained in:
commit
2ae5166a01
@ -107,6 +107,11 @@ object DataGen {
|
||||
blockStateProvider.simpleBlockM(block)
|
||||
}
|
||||
|
||||
fun decorativePillar(block: Block, side: String, top: String) {
|
||||
blockModelProvider.decorativeColumn(block, side, top)
|
||||
blockStateProvider.simplePillar(block)
|
||||
}
|
||||
|
||||
fun stairs(block: StairBlock, side: String, top: String) {
|
||||
blockStateProvider.exec {
|
||||
blockStateProvider.stairsBlock(block, modLocation(side), modLocation(top), modLocation(top))
|
||||
|
@ -192,7 +192,7 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
|
||||
}
|
||||
|
||||
DataGen.decorativeCubeAll(MBlocks.DANGER_STRIPE_BLOCK)
|
||||
DataGen.decorativeColumn(MBlocks.METAL_BEAM, "metal_beam_side", "metal_beam_top")
|
||||
DataGen.decorativePillar(MBlocks.METAL_BEAM, "metal_beam_side", "metal_beam_top")
|
||||
|
||||
var labLampOn: BlockModelBuilder? = null
|
||||
var labLampOff: BlockModelBuilder? = null
|
||||
|
@ -1,6 +1,8 @@
|
||||
package ru.dbotthepony.mc.otm.datagen.blocks
|
||||
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.RotatedPillarBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraftforge.client.model.generators.BlockStateProvider
|
||||
import net.minecraftforge.client.model.generators.ConfiguredModel
|
||||
@ -10,10 +12,10 @@ import ru.dbotthepony.mc.otm.core.getValueNullable
|
||||
import ru.dbotthepony.mc.otm.core.math.BlockRotationFreedom
|
||||
import ru.dbotthepony.mc.otm.core.math.xRotationBlockstateNorth
|
||||
import ru.dbotthepony.mc.otm.core.math.yRotationBlockstateNorth
|
||||
import ru.dbotthepony.mc.otm.datagen.DataGen
|
||||
import ru.dbotthepony.mc.otm.core.registryName
|
||||
import ru.dbotthepony.mc.otm.datagen.DataGen
|
||||
import ru.dbotthepony.mc.otm.datagen.modLocation
|
||||
import java.util.LinkedList
|
||||
import java.util.*
|
||||
|
||||
typealias BlockStateTransform = (state: BlockState, builder: ConfiguredModel.Builder<*>, path: String) -> String?
|
||||
private val EMPTY: BlockStateTransform = { _, _, _ -> null }
|
||||
@ -95,6 +97,22 @@ class MatteryBlockStateProvider(event: GatherDataEvent) : BlockStateProvider(eve
|
||||
return this
|
||||
}
|
||||
|
||||
fun simplePillar(vararg blocks: Block): MatteryBlockStateProvider {
|
||||
for (block in blocks) {
|
||||
exec {
|
||||
getVariantBuilder(block)
|
||||
.partialState().with(RotatedPillarBlock.AXIS, Direction.Axis.Y)
|
||||
.modelForState().modelFile(models().getExistingFile(block.registryName)).addModel()
|
||||
.partialState().with(RotatedPillarBlock.AXIS, Direction.Axis.Z)
|
||||
.modelForState().modelFile(models().getExistingFile(block.registryName)).rotationX(90).addModel()
|
||||
.partialState().with(RotatedPillarBlock.AXIS, Direction.Axis.X)
|
||||
.modelForState().modelFile(models().getExistingFile(block.registryName)).rotationX(90).rotationY(90).addModel()
|
||||
}
|
||||
}
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
fun simpleBlockM(blocks: Collection<Block>): MatteryBlockStateProvider {
|
||||
blocks.forEach(this::simpleBlockM)
|
||||
return this
|
||||
|
Loading…
Reference in New Issue
Block a user