I just need multiblock rendering
Have to add a little multiblock rendering Are you okay? - Yeah, i just need to `add a little more multiblock rendering` Rend-er-ing Rend and R in ING is RENDER-MAN Hard Rendy the Bender Render Fender
This commit is contained in:
parent
05907276e1
commit
5f6da754f9
@ -54,6 +54,22 @@ fun IMultiblockAccess.render(
|
||||
val nodes = currentNodes
|
||||
|
||||
for (node in nodes.values) {
|
||||
if (node.displayBlocks.isNotEmpty() && node.status == NodeStatus.VALID) {
|
||||
continue
|
||||
}
|
||||
|
||||
// TODO: rendering
|
||||
// TODO: rendering
|
||||
// TODO: rendering
|
||||
// TODO: Rendering
|
||||
// TODO: Rendering...
|
||||
// TODO: Rendering!..
|
||||
// TODO: Rendering!..
|
||||
// TODO: Rendering!
|
||||
// TODO: Rendering!!
|
||||
// TODO: RENDERING!!
|
||||
// TODO: RENDERING!!!
|
||||
|
||||
val color = when (node.status) {
|
||||
NodeStatus.UNKNOWN -> UNKNOWN
|
||||
NodeStatus.VALID -> VALID
|
||||
|
@ -1,8 +1,12 @@
|
||||
package ru.dbotthepony.mc.otm.core.multiblock
|
||||
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
|
||||
interface IMultiblockNode {
|
||||
val pos: BlockPos
|
||||
val status: NodeStatus
|
||||
|
||||
val displayBlocks: List<BlockState>
|
||||
get() = listOf()
|
||||
}
|
||||
|
@ -85,6 +85,8 @@ class ShapedMultiblock(pos: BlockPos, factory: ShapedMultiblockFactory) : IMulti
|
||||
private var lastSuccessfulPathPredicate = -1
|
||||
private var lastSuccessfulPathChildren = -1
|
||||
|
||||
override val displayBlocks: List<BlockState> = prototype.displayBlocks.asList()
|
||||
|
||||
override var status: NodeStatus = NodeStatus.UNKNOWN
|
||||
private set
|
||||
|
||||
|
@ -51,6 +51,7 @@ class ShapedMultiblockBuilder {
|
||||
val blockStateTags = ObjectArraySet<Any>()
|
||||
val blockTags = ObjectArraySet<Any>()
|
||||
val blockEntityTags = ObjectArraySet<BlockEntityTag<*>>()
|
||||
val displayBlocks = HashSet<BlockState>()
|
||||
|
||||
/**
|
||||
* Marks this node report its block in [ShapedMultiblock.blockStates] method when called with specified [value]
|
||||
@ -192,6 +193,7 @@ class ShapedMultiblockBuilder {
|
||||
ImmutableSet.copyOf(blockStateTags),
|
||||
ImmutableSet.copyOf(blockTags),
|
||||
ImmutableSet.copyOf(blockEntityTags),
|
||||
ImmutableSet.copyOf(displayBlocks)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableList
|
||||
import com.google.common.collect.ImmutableSet
|
||||
import net.minecraft.core.BlockPos
|
||||
import net.minecraft.world.level.block.Rotation
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import ru.dbotthepony.mc.otm.core.collect.collect
|
||||
import ru.dbotthepony.mc.otm.core.collect.map
|
||||
import java.util.function.Predicate
|
||||
@ -17,6 +18,7 @@ class ShapedMultiblockFactory(val north: ImmutableSet<Part>, val customChecks: I
|
||||
val blockStateTags: ImmutableSet<Any>,
|
||||
val blockTags: ImmutableSet<Any>,
|
||||
val blockEntityTags: ImmutableSet<BlockEntityTag<*>>,
|
||||
val displayBlocks: ImmutableSet<BlockState>,
|
||||
)
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user