diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt index 99a6e7856..6729cade1 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt @@ -372,6 +372,7 @@ private fun blocks(provider: MatteryLanguageProvider) { add(MBlocks.BLACK_HOLE, "Local Anomalous Singular Gravitation Field") add(MBlocks.ENGINE, "Ship Engine") + add(MBlocks.HOLO_SIGN, "Holo Sign") add(MBlocks.TRITANIUM_INGOT_BLOCK, "Tritanium Plating Block") diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt index bec55be61..8658d3e89 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/Russian.kt @@ -377,6 +377,7 @@ private fun blocks(provider: MatteryLanguageProvider) { add(MBlocks.BLACK_HOLE, "Локализированное Аномальное Сингулярное Гравитационное Поле") add(MBlocks.ENGINE, "Двигатель Корабля") + add(MBlocks.HOLO_SIGN, "Голографическая Табличка") add(MBlocks.TRITANIUM_INGOT_BLOCK, "Блок Слитков Тритана") diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesData.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesData.kt index dd4a30389..3b0d5f6f3 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesData.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesData.kt @@ -12,6 +12,7 @@ import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity.Companion.ENERGY_KE import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity.Companion.MATTER_STORAGE_KEY import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity.Companion.REDSTONE_SETTING_KEY import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity.Companion.REDSTONE_SIGNAL_KEY +import ru.dbotthepony.mc.otm.block.entity.decorative.HoloSignBlockEntity import ru.dbotthepony.mc.otm.block.entity.matter.MatterBottlerBlockEntity import ru.dbotthepony.mc.otm.block.entity.storage.AbstractStorageImportExport.Companion.FILTER_KEY import ru.dbotthepony.mc.otm.block.entity.storage.StoragePowerSupplierBlockEntity @@ -145,6 +146,8 @@ fun addLootTables(lootTables: LootTables) { REDSTONE_SETTING_KEY, ) + lootTables.tile(MBlocks.HOLO_SIGN, HoloSignBlockEntity.TEXT_KEY) + lootTables.dropsSelf(MBlocks.STORAGE_CABLE) lootTables.poweredTile(MBlocks.ANDROID_STATION) lootTables.basicTile(MBlocks.BATTERY_BANK) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/CraftingTableRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/CraftingTableRecipes.kt index a2eac90db..2cda8c5f5 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/CraftingTableRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/CraftingTableRecipes.kt @@ -48,6 +48,11 @@ fun addCraftingTableRecipes(consumer: Consumer) { .unlockedBy(MItems.ENERGY_COUNTER) .save(consumer, modLocation("energy_counter_reset")) + ShapelessRecipeBuilder(machinesCategory, MItems.HOLO_SIGN, 1) + .requires(MItems.HOLO_SIGN) + .unlockedBy(MItems.HOLO_SIGN) + .save(consumer, modLocation("holo_sign_reset")) + MatteryRecipe(MBlocks.PLATE_PRESS, category = machinesCategory) .row(MItems.ELECTRIC_PARTS, MItems.ENERGY_BUS, MItems.ELECTRIC_PARTS) .row(MItemTags.TRITANIUM_INGOTS, Items.BLAST_FURNACE, MItemTags.TRITANIUM_INGOTS) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/tags/Tags.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/tags/Tags.kt index c31990cbe..e726c1a6e 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/tags/Tags.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/tags/Tags.kt @@ -144,6 +144,7 @@ fun addTags(tagsProvider: TagsProvider) { MBlocks.TRITANIUM_INGOT_BLOCK, MBlocks.ENGINE, + MBlocks.HOLO_SIGN, ), Tiers.IRON) tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_ORE, Tiers.IRON) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/HoloSignBlock.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/HoloSignBlock.kt new file mode 100644 index 000000000..f49adacbd --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/decorative/HoloSignBlock.kt @@ -0,0 +1,17 @@ +package ru.dbotthepony.mc.otm.block.decorative + +import net.minecraft.core.BlockPos +import net.minecraft.world.level.block.EntityBlock +import net.minecraft.world.level.block.entity.BlockEntity +import net.minecraft.world.level.block.state.BlockState +import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock +import ru.dbotthepony.mc.otm.block.entity.decorative.HoloSignBlockEntity + +class HoloSignBlock : RotatableMatteryBlock(), EntityBlock { + override val hasFreeRotation: Boolean + get() = true + + override fun newBlockEntity(p_153215_: BlockPos, p_153216_: BlockState): BlockEntity { + return HoloSignBlockEntity(p_153215_, p_153216_) + } +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/HoloSignBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/HoloSignBlockEntity.kt new file mode 100644 index 000000000..ba6eec801 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/HoloSignBlockEntity.kt @@ -0,0 +1,41 @@ +package ru.dbotthepony.mc.otm.block.entity.decorative + +import net.minecraft.core.BlockPos +import net.minecraft.nbt.CompoundTag +import net.minecraft.network.chat.Component +import net.minecraft.world.MenuProvider +import net.minecraft.world.entity.player.Inventory +import net.minecraft.world.entity.player.Player +import net.minecraft.world.inventory.AbstractContainerMenu +import net.minecraft.world.level.block.state.BlockState +import ru.dbotthepony.mc.otm.block.entity.SynchronizedBlockEntity +import ru.dbotthepony.mc.otm.core.nbt.set +import ru.dbotthepony.mc.otm.menu.HoloSignMenu +import ru.dbotthepony.mc.otm.registry.MBlockEntities +import ru.dbotthepony.mc.otm.registry.MBlocks + +class HoloSignBlockEntity(blockPos: BlockPos, blockState: BlockState) : SynchronizedBlockEntity(MBlockEntities.HOLO_SIGN, blockPos, blockState), MenuProvider { + var text by synchronizer.string("АМОГУС", name = "text") + + override fun createMenu(p_39954_: Int, p_39955_: Inventory, p_39956_: Player): AbstractContainerMenu { + return HoloSignMenu(p_39954_, p_39955_, this) + } + + override fun getDisplayName(): Component { + return MBlocks.HOLO_SIGN.name + } + + override fun saveAdditional(p_187471_: CompoundTag) { + super.saveAdditional(p_187471_) + p_187471_[TEXT_KEY] = text + } + + override fun load(p_155245_: CompoundTag) { + super.load(p_155245_) + text = p_155245_.getString(TEXT_KEY) + } + + companion object { + const val TEXT_KEY = "SignText" + } +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/HoloSignRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/HoloSignRenderer.kt new file mode 100644 index 000000000..a06a15d92 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/HoloSignRenderer.kt @@ -0,0 +1,36 @@ +package ru.dbotthepony.mc.otm.client.render.blockentity + +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 ru.dbotthepony.mc.otm.block.entity.decorative.HoloSignBlockEntity +import ru.dbotthepony.mc.otm.client.font +import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource +import ru.dbotthepony.mc.otm.client.render.TextAlign +import ru.dbotthepony.mc.otm.client.render.drawAligned +import ru.dbotthepony.mc.otm.core.math.RGBAColor +import ru.dbotthepony.mc.otm.core.math.rotateX +import ru.dbotthepony.mc.otm.core.math.rotateY + +class HoloSignRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer { + override fun render( + tile: HoloSignBlockEntity, + partialTick: Float, + poseStack: PoseStack, + badSorse: MultiBufferSource, + p_112311_: Int, + p_112312_: Int + ) { + poseStack.pushPose() + poseStack.translate(0.5f, 0.5f, -0.1f) + poseStack.rotateX(Math.PI.toFloat()) + poseStack.rotateY(Math.PI.toFloat()) + poseStack.scale(0.01f, 0.01f, 0.01f) + + val sorse = DynamicBufferSource.WORLD + + font.drawAligned(poseStack = poseStack, buffer = sorse, text = tile.text, align = TextAlign.CENTER_CENTER, x = 0f, y = 0f, color = RGBAColor.BLUE.toInt()) + poseStack.popPose() + } +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/DataStreams.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/DataStreams.kt index 095b0addd..a41e5a94e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/DataStreams.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/DataStreams.kt @@ -73,6 +73,7 @@ val BigDecimalValueCodec = StreamCodec(DataInputStream::readBigDecimal, DataOutp val UUIDValueCodec = StreamCodec({ s -> UUID(s.readLong(), s.readLong()) }, { s, v -> s.writeLong(v.mostSignificantBits); s.writeLong(v.leastSignificantBits) }) val VarIntValueCodec = StreamCodec(DataInputStream::readVarIntLE, DataOutputStream::writeVarIntLE) val VarLongValueCodec = StreamCodec(DataInputStream::readVarLongLE, DataOutputStream::writeVarLongLE) +val BinaryStringCodec = StreamCodec(DataInputStream::readBinaryString, DataOutputStream::writeBinaryString) class EnumValueCodec>(private val clazz: Class) : IStreamCodec { private val values = clazz.enumConstants @@ -248,6 +249,19 @@ fun OutputStream.writeVarLongLE(value: Long) { } } +fun InputStream.readBinaryString(): String { + val size = readVarIntLE() + val bytes = ByteArray(size) + read(bytes) + return bytes.decodeToString() +} + +fun OutputStream.writeBinaryString(input: String) { + val bytes = input.encodeToByteArray() + writeVarIntLE(bytes.size) + write(bytes) +} + private data class IndexedStreamCodec( val condition: Predicate, val id: Int, @@ -282,6 +296,7 @@ private val codecs: List> = com.google.common.collect.Immu it.add(IndexedStreamCodec(codecID++, ImpreciseFractionValueCodec)) it.add(IndexedStreamCodec(codecID++, BigDecimalValueCodec)) it.add(IndexedStreamCodec(codecID++, UUIDValueCodec)) + it.add(IndexedStreamCodec(codecID++, BinaryStringCodec)) it.build() } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/HoloSignMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/HoloSignMenu.kt new file mode 100644 index 000000000..b031f4b1d --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/HoloSignMenu.kt @@ -0,0 +1,15 @@ +package ru.dbotthepony.mc.otm.menu + +import net.minecraft.world.entity.player.Inventory +import net.minecraft.world.inventory.Slot +import ru.dbotthepony.mc.otm.block.entity.decorative.HoloSignBlockEntity +import ru.dbotthepony.mc.otm.registry.MMenus + +class HoloSignMenu @JvmOverloads constructor( + containerId: Int, + inventory: Inventory, + tile: HoloSignBlockEntity? = null +) : MatteryMenu(MMenus.HOLO_SIGN, containerId, inventory, tile) { + override val storageSlots: Collection + get() = listOf() +} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/network/FieldSynchronizer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/network/FieldSynchronizer.kt index 1761b0832..9ac6c20c1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/network/FieldSynchronizer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/network/FieldSynchronizer.kt @@ -14,6 +14,7 @@ import ru.dbotthepony.mc.otm.core.* import ru.dbotthepony.mc.otm.core.collect.ProxiedMap import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.core.util.BigDecimalValueCodec +import ru.dbotthepony.mc.otm.core.util.BinaryStringCodec import ru.dbotthepony.mc.otm.core.util.BooleanValueCodec import ru.dbotthepony.mc.otm.core.util.ByteValueCodec import ru.dbotthepony.mc.otm.core.util.DoubleValueCodec @@ -289,6 +290,15 @@ class FieldSynchronizer(private val callback: Runnable, private val alwaysCallCa return Field(value, VarIntValueCodec, getter, setter, name = name) } + fun string( + value: String = "", + getter: FieldGetter? = null, + setter: FieldSetter? = null, + name: String = nextFieldName(), + ): Field { + return Field(value, BinaryStringCodec, getter, setter, name = name) + } + fun fixedInt( value: Int = 0, getter: FieldGetter? = null, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/CreativeTabs.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/CreativeTabs.kt index ea4040cb5..4e43c9d01 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/CreativeTabs.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/CreativeTabs.kt @@ -102,6 +102,7 @@ internal fun addMainCreativeTabItems(consumer: CreativeModeTab.Output) { accept(MItems.MACHINES) accept(MRegistry.CARGO_CRATES.item) + accept(MItems.HOLO_SIGN) base(MItems.TRITANIUM_DOOR) base(MItems.TRITANIUM_TRAPDOOR) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MBlockEntities.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MBlockEntities.kt index 4617a7940..3f80fa3c3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MBlockEntities.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MBlockEntities.kt @@ -13,6 +13,7 @@ import ru.dbotthepony.mc.otm.block.entity.blackhole.BlackHoleBlockEntity import ru.dbotthepony.mc.otm.block.entity.blackhole.BlockEntityExplosionDebugger import ru.dbotthepony.mc.otm.block.entity.blackhole.BlockEntitySphereDebugger import ru.dbotthepony.mc.otm.block.entity.decorative.CargoCrateBlockEntity +import ru.dbotthepony.mc.otm.block.entity.decorative.HoloSignBlockEntity import ru.dbotthepony.mc.otm.block.entity.matter.* import ru.dbotthepony.mc.otm.block.entity.storage.* import ru.dbotthepony.mc.otm.block.entity.tech.AndroidStationBlockEntity @@ -24,6 +25,7 @@ import ru.dbotthepony.mc.otm.client.render.blockentity.BatteryBankRenderer import ru.dbotthepony.mc.otm.client.render.blockentity.BlackHoleRenderer import ru.dbotthepony.mc.otm.client.render.blockentity.EnergyCounterRenderer import ru.dbotthepony.mc.otm.client.render.blockentity.GravitationStabilizerRenderer +import ru.dbotthepony.mc.otm.client.render.blockentity.HoloSignRenderer import ru.dbotthepony.mc.otm.client.render.blockentity.MatterBatteryBankRenderer import ru.dbotthepony.mc.otm.client.render.blockentity.MatterReplicatorRenderer @@ -62,6 +64,8 @@ object MBlockEntities { val STORAGE_EXPORTER: BlockEntityType<*> by registry.register(MNames.STORAGE_EXPORTER) { BlockEntityType.Builder.of(::StorageExporterBlockEntity, MBlocks.STORAGE_EXPORTER).build(null) } val STORAGE_POWER_SUPPLIER: BlockEntityType<*> by registry.register(MNames.STORAGE_POWER_SUPPLIER) { BlockEntityType.Builder.of(::StoragePowerSupplierBlockEntity, MBlocks.STORAGE_POWER_SUPPLIER).build(null) } + val HOLO_SIGN: BlockEntityType by registry.register(MNames.HOLO_SIGN) { BlockEntityType.Builder.of(::HoloSignBlockEntity, MBlocks.HOLO_SIGN).build(null) } + val DEBUG_EXPLOSION_SMALL: BlockEntityType<*> by registry.register(MNames.DEBUG_EXPLOSION_SMALL) { BlockEntityType.Builder.of(::BlockEntityExplosionDebugger, MBlocks.DEBUG_EXPLOSION_SMALL).build(null) } val DEBUG_SPHERE_POINTS: BlockEntityType<*> by registry.register(MNames.DEBUG_SPHERE_POINTS) { BlockEntityType.Builder.of(::BlockEntitySphereDebugger, MBlocks.DEBUG_SPHERE_POINTS).build(null) } @@ -79,6 +83,7 @@ object MBlockEntities { BlockEntityRenderers.register(BATTERY_BANK as BlockEntityType, ::BatteryBankRenderer) BlockEntityRenderers.register(MATTER_CAPACITOR_BANK as BlockEntityType, ::MatterBatteryBankRenderer) BlockEntityRenderers.register(MATTER_REPLICATOR as BlockEntityType, ::MatterReplicatorRenderer) + BlockEntityRenderers.register(HOLO_SIGN, ::HoloSignRenderer) } } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MBlocks.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MBlocks.kt index 69472a02e..610485890 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MBlocks.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MBlocks.kt @@ -44,6 +44,7 @@ import ru.dbotthepony.mc.otm.block.tech.PhantomAttractorBlock import ru.dbotthepony.mc.otm.block.tech.PlatePressBlock import ru.dbotthepony.mc.otm.block.StorageCableBlock import ru.dbotthepony.mc.otm.block.decorative.EngineBlock +import ru.dbotthepony.mc.otm.block.decorative.HoloSignBlock import ru.dbotthepony.mc.otm.block.matter.MatterBottlerBlock import ru.dbotthepony.mc.otm.block.matter.MatterCapacitorBankBlock import ru.dbotthepony.mc.otm.block.matter.MatterDecomposerBlock @@ -133,6 +134,7 @@ object MBlocks { val DANGER_STRIPE_BLOCK: Block by registry.register(MNames.DANGER_STRIPE_BLOCK) { Block(BlockBehaviour.Properties.of(Material.METAL, DyeColor.GRAY).explosionResistance(6f).destroyTime(1.5f).requiresCorrectToolForDrops()) } val METAL_BEAM: Block by registry.register(MNames.METAL_BEAM) { Block(BlockBehaviour.Properties.of(Material.METAL, DyeColor.GRAY).explosionResistance(14f).destroyTime(2.5f).requiresCorrectToolForDrops()) } val ENGINE: Block by registry.register(MNames.ENGINE) { EngineBlock() } + val HOLO_SIGN: Block by registry.register(MNames.HOLO_SIGN) { HoloSignBlock() } val TRITANIUM_DOOR = registry.allColored(MNames.TRITANIUM_DOOR) { color, _ -> object : DoorBlock(Properties.of(Material.METAL, color ?: DyeColor.LIGHT_BLUE).explosionResistance(80f).noOcclusion().destroyTime(3f).requiresCorrectToolForDrops(), SoundEvents.IRON_DOOR_CLOSE, SoundEvents.IRON_DOOR_OPEN) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt index 9aedf07d7..9d123f2bb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt @@ -266,6 +266,7 @@ object MItems { val DANGER_STRIPE_BLOCK: Item by registry.register(MNames.DANGER_STRIPE_BLOCK) { BlockItem(MBlocks.DANGER_STRIPE_BLOCK, DEFAULT_PROPERTIES) } val METAL_BEAM: Item by registry.register(MNames.METAL_BEAM) { BlockItem(MBlocks.METAL_BEAM, DEFAULT_PROPERTIES) } val ENGINE: Item by registry.register(MNames.ENGINE) { BlockItem(MBlocks.ENGINE, DEFAULT_PROPERTIES) } + val HOLO_SIGN: Item by registry.register(MNames.HOLO_SIGN) { BlockItem(MBlocks.HOLO_SIGN, DEFAULT_PROPERTIES) } val TRITANIUM_DOOR = registry.allColored(MNames.TRITANIUM_DOOR) { color, _ -> DoubleHighBlockItem(MBlocks.TRITANIUM_DOOR[color]!!, DEFAULT_PROPERTIES) } val TRITANIUM_TRAPDOOR = registry.allColored(MNames.TRITANIUM_TRAPDOOR) { color, _ -> BlockItem(MBlocks.TRITANIUM_TRAPDOOR[color]!!, DEFAULT_PROPERTIES) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MMenus.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MMenus.kt index ec03ab814..6df9e3c7c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MMenus.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MMenus.kt @@ -33,6 +33,7 @@ object MMenus { val PLATE_PRESS: MenuType<*> by registry.register(MNames.PLATE_PRESS) { MenuType(::PlatePressMenu) } val MATTER_RECYCLER: MenuType<*> by registry.register(MNames.MATTER_RECYCLER) { MenuType(::MatterRecyclerMenu) } val ENERGY_SERVO: MenuType<*> by registry.register(MNames.ENERGY_SERVO) { MenuType(::EnergyServoMenu) } + val HOLO_SIGN: MenuType<*> by registry.register(MNames.HOLO_SIGN) { MenuType(::HoloSignMenu) } val STORAGE_BUS: MenuType<*> by registry.register(MNames.STORAGE_BUS) { MenuType(::StorageBusMenu) } val STORAGE_EXPORTER: MenuType<*> by registry.register(MNames.STORAGE_EXPORTER) { MenuType(::StorageExporterMenu) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt index 4218e4815..228b39c0e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt @@ -10,6 +10,7 @@ object MNames { const val DANGER_STRIPE_BLOCK = "danger_stripe_block" const val METAL_BEAM = "metal_beam" const val ENGINE = "engine" + const val HOLO_SIGN = "holo_sign" // blocks const val ANDROID_STATION = "android_station"