Compare commits
No commits in common. "05907276e1abd2676c82c8ec70101dc594f85df7" and "9621356682b586e096b6f89d6cc2751d2aab1bcd" have entirely different histories.
05907276e1
...
9621356682
@ -97,14 +97,13 @@ class HoloSignBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryB
|
||||
override fun loadAdditional(nbt: CompoundTag, registry: HolderLookup.Provider) {
|
||||
super.loadAdditional(nbt, registry)
|
||||
|
||||
if (!isLocked) {
|
||||
if (!isLocked)
|
||||
signText = truncate(signText)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val DEFAULT_MAX_NEWLINES = 10
|
||||
const val DEFAULT_MAX_LINE_LENGTH = 60
|
||||
const val DEFAULT_MAX_NEWLINES = 8
|
||||
const val DEFAULT_MAX_LINE_LENGTH = 15
|
||||
private val NEWLINES = Regex("\r?\n")
|
||||
|
||||
fun truncate(input: String): String {
|
||||
|
@ -4,7 +4,6 @@ import com.mojang.blaze3d.vertex.PoseStack
|
||||
import net.minecraft.client.renderer.MultiBufferSource
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider
|
||||
import net.minecraft.world.phys.AABB
|
||||
import ru.dbotthepony.mc.otm.block.entity.blackhole.BlackHoleGeneratorBlockEntity
|
||||
import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource
|
||||
import ru.dbotthepony.mc.otm.client.render.render
|
||||
@ -22,12 +21,4 @@ class BlackHoleGeneratorRenderer(private val context: BlockEntityRendererProvide
|
||||
tile.multiblock?.render(poseStack, DynamicBufferSource.WORLD, tile.blockPos)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getRenderBoundingBox(blockEntity: BlackHoleGeneratorBlockEntity): AABB {
|
||||
if (blockEntity.drawBuildingGuide) {
|
||||
return blockEntity.multiblock?.boundingBox ?: super.getRenderBoundingBox(blockEntity)
|
||||
}
|
||||
|
||||
return super.getRenderBoundingBox(blockEntity)
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import net.minecraft.world.level.Level
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.entity.BlockEntity
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.phys.AABB
|
||||
import ru.dbotthepony.mc.otm.core.collect.WeakHashSet
|
||||
import java.util.*
|
||||
|
||||
@ -19,8 +18,6 @@ interface IMultiblockAccess {
|
||||
val currentDirection: Direction?
|
||||
val currentNodes: Map<BlockPos, IMultiblockNode>
|
||||
|
||||
val boundingBox: AABB?
|
||||
|
||||
/**
|
||||
* Returns block counts present on nodes tagged by [tag]
|
||||
*/
|
||||
|
@ -14,14 +14,11 @@ import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.entity.BlockEntity
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.phys.AABB
|
||||
import ru.dbotthepony.mc.otm.core.AABB
|
||||
import ru.dbotthepony.mc.otm.core.addAll
|
||||
import ru.dbotthepony.mc.otm.core.collect.collect
|
||||
import ru.dbotthepony.mc.otm.core.collect.map
|
||||
import ru.dbotthepony.mc.otm.core.getBlockEntityNow
|
||||
import ru.dbotthepony.mc.otm.core.getBlockStateNow
|
||||
import ru.dbotthepony.mc.otm.core.math.Vector
|
||||
import ru.dbotthepony.mc.otm.core.math.plus
|
||||
import ru.dbotthepony.mc.otm.core.registryName
|
||||
import ru.dbotthepony.mc.otm.network.syncher.IRemoteState
|
||||
@ -260,13 +257,6 @@ class ShapedMultiblock(pos: BlockPos, factory: ShapedMultiblockFactory) : IMulti
|
||||
override val currentNodes: Map<BlockPos, IMultiblockNode>
|
||||
get() = parts
|
||||
|
||||
override val boundingBox: AABB by lazy {
|
||||
AABB(
|
||||
Vector(parts.minOf { it.pos.x }.toDouble(), parts.minOf { it.pos.y }.toDouble(), parts.minOf { it.pos.z }.toDouble()),
|
||||
Vector(parts.maxOf { it.pos.x + 1.0 }, parts.maxOf { it.pos.y + 1.0 }, parts.maxOf { it.pos.z + 1.0 }),
|
||||
)
|
||||
}
|
||||
|
||||
private val tag2BlockEntity = HashMap<BlockEntityTag<*>, BlockEntitySet<*>>()
|
||||
private val tag2BlockState = HashMap<Any, Reference2IntMap<BlockState>>()
|
||||
private val tag2Block = HashMap<Any, Reference2IntMap<Block>>()
|
||||
@ -535,9 +525,6 @@ class ShapedMultiblock(pos: BlockPos, factory: ShapedMultiblockFactory) : IMulti
|
||||
override val currentDirection: Direction?
|
||||
get() = if (isValid) activeConfig.currentDirection else null
|
||||
|
||||
override val boundingBox: AABB?
|
||||
get() = if (isValid) activeConfig.boundingBox else null
|
||||
|
||||
override val currentNodes: Map<BlockPos, IMultiblockNode>
|
||||
get() = activeConfig.parts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user