Rename itemrepairer to matter reconstructor internally everywhere but resource location
This commit is contained in:
parent
df130211c3
commit
5b36988ac1
@ -365,8 +365,8 @@ private fun blocks(provider: MatteryLanguageProvider) {
|
||||
add(MBlocks.COBBLESTONE_GENERATOR, "Cobblestone Generator")
|
||||
add(MBlocks.ESSENCE_STORAGE, "Essence Storage")
|
||||
add(MBlocks.ESSENCE_STORAGE, "desc", "Allows to store and retrieve experience levels")
|
||||
add(MBlocks.ITEM_REPAIRER, "Matter Reconstructor")
|
||||
add(MBlocks.ITEM_REPAIRER, "desc", "Repairs tools using matter")
|
||||
add(MBlocks.MATTER_RECONSTRUCTOR, "Matter Reconstructor")
|
||||
add(MBlocks.MATTER_RECONSTRUCTOR, "desc", "Repairs tools using matter")
|
||||
|
||||
add(MBlocks.ENGINE, "Ship Engine")
|
||||
add(MBlocks.HOLO_SIGN, "Holo Sign")
|
||||
|
@ -372,8 +372,8 @@ private fun blocks(provider: MatteryLanguageProvider) {
|
||||
add(MBlocks.COBBLESTONE_GENERATOR, "Генератор булыжника")
|
||||
add(MBlocks.ESSENCE_STORAGE, "Хранилище эссенции")
|
||||
add(MBlocks.ESSENCE_STORAGE, "desc", "Позволяет хранить очки опыта")
|
||||
add(MBlocks.ITEM_REPAIRER, "Материальный реконструктор")
|
||||
add(MBlocks.ITEM_REPAIRER, "desc", "Чинит инструменты используя материю")
|
||||
add(MBlocks.MATTER_RECONSTRUCTOR, "Материальный реконструктор")
|
||||
add(MBlocks.MATTER_RECONSTRUCTOR, "desc", "Чинит инструменты используя материю")
|
||||
|
||||
add(MBlocks.ENGINE, "Двигатель корабля")
|
||||
add(MBlocks.HOLO_SIGN, "Голографическая табличка")
|
||||
|
@ -137,7 +137,7 @@ fun addLootTables(lootTables: LootTables) {
|
||||
|
||||
lootTables.tile(MBlocks.COBBLESTONE_GENERATOR)
|
||||
lootTables.tile(MBlocks.ESSENCE_STORAGE)
|
||||
lootTables.tile(MBlocks.ITEM_REPAIRER)
|
||||
lootTables.tile(MBlocks.MATTER_RECONSTRUCTOR)
|
||||
|
||||
lootTables.tile(MBlocks.ENERGY_SERVO)
|
||||
lootTables.tile(MBlocks.ENERGY_COUNTER)
|
||||
|
@ -298,7 +298,7 @@ fun addCraftingTableRecipes(consumer: Consumer<FinishedRecipe>) {
|
||||
.rowB(Tags.Items.RODS_WOODEN)
|
||||
.build(consumer)
|
||||
|
||||
MatteryRecipe(MItems.ITEM_REPAIRER, category = machinesCategory)
|
||||
MatteryRecipe(MItems.MATTER_RECONSTRUCTOR, category = machinesCategory)
|
||||
.setUpgradeSource(MItems.MATTER_REPLICATOR)
|
||||
.addUpgradeOps(
|
||||
UpgradeRecipe.Indirect("BlockEntityTag.${MatteryBlockEntity.ENERGY_KEY}", "BlockEntityTag.energy"),
|
||||
|
@ -172,7 +172,7 @@ fun addTags(tagsProvider: TagsProvider) {
|
||||
MBlocks.HOLO_SIGN,
|
||||
MBlocks.COBBLESTONE_GENERATOR,
|
||||
MBlocks.ESSENCE_STORAGE,
|
||||
MBlocks.ITEM_REPAIRER,
|
||||
MBlocks.MATTER_RECONSTRUCTOR,
|
||||
), Tiers.IRON)
|
||||
|
||||
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_ANVIL, Tiers.IRON)
|
||||
|
@ -33,11 +33,11 @@ import ru.dbotthepony.mc.otm.graph.matter.MatterGraph
|
||||
import ru.dbotthepony.mc.otm.graph.matter.MatterNode
|
||||
import ru.dbotthepony.mc.otm.matter.IMatterValue
|
||||
import ru.dbotthepony.mc.otm.matter.MatterManager
|
||||
import ru.dbotthepony.mc.otm.menu.matter.ItemRepairerMenu
|
||||
import ru.dbotthepony.mc.otm.menu.matter.MatterReconstructorMenu
|
||||
import ru.dbotthepony.mc.otm.registry.MBlockEntities
|
||||
import ru.dbotthepony.mc.otm.registry.MNames
|
||||
|
||||
class ItemRepairerBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryPoweredBlockEntity(MBlockEntities.ITEM_REPAIRER, blockPos, blockState) {
|
||||
class MatterReconstructorBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryPoweredBlockEntity(MBlockEntities.MATTER_RECONSTRUCTOR, blockPos, blockState) {
|
||||
val repairContainer = MatteryContainer(::containerChanged, 1).also(::addDroppableContainer)
|
||||
|
||||
private var matterPerTick = Decimal.ZERO
|
||||
@ -119,7 +119,7 @@ class ItemRepairerBlockEntity(blockPos: BlockPos, blockState: BlockState) : Matt
|
||||
)
|
||||
|
||||
override fun createMenu(containerID: Int, inventory: Inventory, ply: Player): AbstractContainerMenu {
|
||||
return ItemRepairerMenu(containerID, inventory, this)
|
||||
return MatterReconstructorMenu(containerID, inventory, this)
|
||||
}
|
||||
|
||||
override fun setRemoved() {
|
||||
@ -267,7 +267,7 @@ class ItemRepairerBlockEntity(blockPos: BlockPos, blockState: BlockState) : Matt
|
||||
private set
|
||||
|
||||
fun registerConfig(builder: ForgeConfigSpec.Builder) {
|
||||
builder.push(MNames.ITEM_REPAIRER)
|
||||
builder.push(MNames.MATTER_RECONSTRUCTOR)
|
||||
|
||||
ENERGY_VALUES = BlockEnergyStorageImpl.makeConfigEntry(builder, capacity = Decimal(400_000), throughput = Decimal(2_000))
|
||||
|
@ -8,17 +8,17 @@ import net.minecraft.world.level.block.entity.BlockEntityTicker
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.ItemRepairerBlockEntity
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.MatterReconstructorBlockEntity
|
||||
|
||||
class ItemRepairerBlock : RotatableMatteryBlock(), EntityBlock {
|
||||
override fun newBlockEntity(pPos: BlockPos, pState: BlockState): BlockEntity {
|
||||
return ItemRepairerBlockEntity(pPos, pState)
|
||||
return MatterReconstructorBlockEntity(pPos, pState)
|
||||
}
|
||||
|
||||
override fun <T : BlockEntity?> getTicker(pLevel: Level, pState: BlockState, pBlockEntityType: BlockEntityType<T>): BlockEntityTicker<T>? {
|
||||
if (pLevel.isClientSide)
|
||||
return null
|
||||
|
||||
return BlockEntityTicker { _, _, _, pBlockEntity -> if (pBlockEntity is ItemRepairerBlockEntity) pBlockEntity.tick() }
|
||||
return BlockEntityTicker { _, _, _, pBlockEntity -> if (pBlockEntity is MatterReconstructorBlockEntity) pBlockEntity.tick() }
|
||||
}
|
||||
}
|
||||
|
@ -9,9 +9,9 @@ import ru.dbotthepony.mc.otm.client.screen.panels.slot.BatterySlotPanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.slot.SlotPanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel
|
||||
import ru.dbotthepony.mc.otm.menu.matter.ItemRepairerMenu
|
||||
import ru.dbotthepony.mc.otm.menu.matter.MatterReconstructorMenu
|
||||
|
||||
class ItemRepairerScreen(menu: ItemRepairerMenu, inventory: Inventory, title: Component) : MatteryScreen<ItemRepairerMenu>(menu, inventory, title) {
|
||||
class MatterReconstructorScreen(menu: MatterReconstructorMenu, inventory: Inventory, title: Component) : MatteryScreen<MatterReconstructorMenu>(menu, inventory, title) {
|
||||
override fun makeMainFrame(): FramePanel<MatteryScreen<*>> {
|
||||
val frame = super.makeMainFrame()!!
|
||||
|
@ -1,6 +1,6 @@
|
||||
package ru.dbotthepony.mc.otm.config
|
||||
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.ItemRepairerBlockEntity
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.MatterReconstructorBlockEntity
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.MatterBottlerBlockEntity
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.MatterDecomposerBlockEntity
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.MatterRecyclerBlockEntity
|
||||
@ -21,7 +21,7 @@ object MachinesConfig : AbstractConfig("machines") {
|
||||
MatterReplicatorBlockEntity.registerConfig(builder)
|
||||
MatterScannerBlockEntity.registerConfig(builder)
|
||||
MatterDecomposerBlockEntity.registerConfig(builder)
|
||||
ItemRepairerBlockEntity.registerConfig(builder)
|
||||
MatterReconstructorBlockEntity.registerConfig(builder)
|
||||
}
|
||||
|
||||
val PLATE_PRESS = BlockEnergyStorageImpl.makeConfigEntry(builder, MNames.PLATE_PRESS)
|
||||
|
@ -4,8 +4,7 @@ import net.minecraft.world.SimpleContainer
|
||||
import net.minecraft.world.entity.player.Inventory
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import ru.dbotthepony.mc.otm.block.entity.RedstoneSetting
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.ItemRepairerBlockEntity
|
||||
import ru.dbotthepony.mc.otm.capability.matter.matter
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.MatterReconstructorBlockEntity
|
||||
import ru.dbotthepony.mc.otm.menu.MatteryPoweredMenu
|
||||
import ru.dbotthepony.mc.otm.menu.MatterySlot
|
||||
import ru.dbotthepony.mc.otm.menu.input.EnergyPlayerInput
|
||||
@ -14,10 +13,10 @@ import ru.dbotthepony.mc.otm.menu.input.ItemHandlerPlayerInput
|
||||
import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget
|
||||
import ru.dbotthepony.mc.otm.registry.MMenus
|
||||
|
||||
class ItemRepairerMenu(
|
||||
class MatterReconstructorMenu(
|
||||
containerId: Int,
|
||||
inventory: Inventory,
|
||||
tile: ItemRepairerBlockEntity? = null
|
||||
tile: MatterReconstructorBlockEntity? = null
|
||||
) : MatteryPoweredMenu(MMenus.ITEM_REPAIER, containerId, inventory, tile) {
|
||||
val matterWidget = LevelGaugeWidget(this, tile?.matter)
|
||||
val slot = object : MatterySlot(tile?.repairContainer ?: SimpleContainer(1), 0) {
|
@ -57,7 +57,7 @@ object MBlockEntities {
|
||||
val ENERGY_SERVO: BlockEntityType<EnergyServoBlockEntity> by registry.register(MNames.ENERGY_SERVO) { BlockEntityType.Builder.of(::EnergyServoBlockEntity, MBlocks.ENERGY_SERVO).build(null) }
|
||||
val COBBLESTONE_GENERATOR: BlockEntityType<CobblerBlockEntity> by registry.register(MNames.COBBLESTONE_GENERATOR) { BlockEntityType.Builder.of(::CobblerBlockEntity, MBlocks.COBBLESTONE_GENERATOR).build(null) }
|
||||
val ESSENCE_STORAGE: BlockEntityType<EssenceStorageBlockEntity> by registry.register(MNames.ESSENCE_STORAGE) { BlockEntityType.Builder.of(::EssenceStorageBlockEntity, MBlocks.ESSENCE_STORAGE).build(null) }
|
||||
val ITEM_REPAIRER: BlockEntityType<ItemRepairerBlockEntity> by registry.register(MNames.ITEM_REPAIRER) { BlockEntityType.Builder.of(::ItemRepairerBlockEntity, MBlocks.ITEM_REPAIRER).build(null) }
|
||||
val MATTER_RECONSTRUCTOR: BlockEntityType<MatterReconstructorBlockEntity> by registry.register(MNames.MATTER_RECONSTRUCTOR) { BlockEntityType.Builder.of(::MatterReconstructorBlockEntity, MBlocks.MATTER_RECONSTRUCTOR).build(null) }
|
||||
|
||||
val STORAGE_BUS: BlockEntityType<StorageBusBlockEntity> by registry.register(MNames.STORAGE_BUS) { BlockEntityType.Builder.of(::StorageBusBlockEntity, MBlocks.STORAGE_BUS).build(null) }
|
||||
val STORAGE_IMPORTER: BlockEntityType<StorageImporterBlockEntity> by registry.register(MNames.STORAGE_IMPORTER) { BlockEntityType.Builder.of(::StorageImporterBlockEntity, MBlocks.STORAGE_IMPORTER).build(null) }
|
||||
|
@ -6,7 +6,6 @@ import net.minecraft.network.chat.Component
|
||||
import net.minecraft.sounds.SoundEvents
|
||||
import net.minecraft.util.valueproviders.UniformInt
|
||||
import net.minecraft.world.entity.Entity
|
||||
import net.minecraft.world.entity.EntityType
|
||||
import net.minecraft.world.entity.monster.Zombie
|
||||
import net.minecraft.world.item.DyeColor
|
||||
import net.minecraft.world.item.ItemStack
|
||||
@ -68,7 +67,6 @@ import ru.dbotthepony.mc.otm.block.tech.CobblerBlock
|
||||
import ru.dbotthepony.mc.otm.block.tech.EssenceStorageBlock
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
import ru.dbotthepony.mc.otm.core.collect.SupplierList
|
||||
import java.util.function.Supplier
|
||||
|
||||
object MBlocks {
|
||||
private val registry = DeferredRegister.create(ForgeRegistries.BLOCKS, OverdriveThatMatters.MOD_ID)
|
||||
@ -94,7 +92,7 @@ object MBlocks {
|
||||
val ENERGY_SERVO: Block by registry.register(MNames.ENERGY_SERVO) { EnergyServoBlock() }
|
||||
val COBBLESTONE_GENERATOR: Block by registry.register(MNames.COBBLESTONE_GENERATOR) { CobblerBlock() }
|
||||
val ESSENCE_STORAGE: EssenceStorageBlock by registry.register(MNames.ESSENCE_STORAGE) { EssenceStorageBlock() }
|
||||
val ITEM_REPAIRER: ItemRepairerBlock by registry.register(MNames.ITEM_REPAIRER) { ItemRepairerBlock() }
|
||||
val MATTER_RECONSTRUCTOR: ItemRepairerBlock by registry.register(MNames.MATTER_RECONSTRUCTOR) { ItemRepairerBlock() }
|
||||
|
||||
val STORAGE_BUS: Block by registry.register(MNames.STORAGE_BUS) { StorageBusBlock() }
|
||||
val STORAGE_IMPORTER: Block by registry.register(MNames.STORAGE_IMPORTER) { StorageImporterBlock() }
|
||||
|
@ -109,8 +109,8 @@ object MItems {
|
||||
}
|
||||
}
|
||||
|
||||
val ITEM_REPAIRER: BlockItem by registry.register(MNames.ITEM_REPAIRER) {
|
||||
object : BlockItem(MBlocks.ITEM_REPAIRER, DEFAULT_PROPERTIES) {
|
||||
val MATTER_RECONSTRUCTOR: BlockItem by registry.register(MNames.MATTER_RECONSTRUCTOR) {
|
||||
object : BlockItem(MBlocks.MATTER_RECONSTRUCTOR, DEFAULT_PROPERTIES) {
|
||||
override fun appendHoverText(p_40572_: ItemStack, p_40573_: Level?, p_40574_: MutableList<Component>, p_40575_: TooltipFlag) {
|
||||
super.appendHoverText(p_40572_, p_40573_, p_40574_, p_40575_)
|
||||
p_40574_.add(TranslatableComponent("$descriptionId.desc").withStyle(ChatFormatting.GRAY))
|
||||
@ -124,7 +124,7 @@ object MItems {
|
||||
::PLATE_PRESS, ::MATTER_RECYCLER, ::STORAGE_BUS, ::STORAGE_IMPORTER, ::STORAGE_EXPORTER, ::DRIVE_VIEWER,
|
||||
::DRIVE_RACK, ::ITEM_MONITOR, ::STORAGE_CABLE, ::STORAGE_POWER_SUPPLIER, ::ENERGY_SERVO,
|
||||
::PHANTOM_ATTRACTOR, ::GRAVITATION_STABILIZER, ::COBBLESTONE_GENERATOR, ::ESSENCE_STORAGE,
|
||||
::ITEM_REPAIRER
|
||||
::MATTER_RECONSTRUCTOR
|
||||
)
|
||||
|
||||
val DEBUG_EXPLOSION_SMALL: Item by registry.register(MNames.DEBUG_EXPLOSION_SMALL) { BlockItem(MBlocks.DEBUG_EXPLOSION_SMALL, Item.Properties().stacksTo(64)) }
|
||||
|
@ -10,7 +10,7 @@ import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.client.screen.decorative.CargoCrateScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.decorative.HoloSignScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.decorative.MinecartCargoCrateScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.matter.ItemRepairerScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.matter.MatterReconstructorScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.matter.MatterBottlerScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.matter.MatterCapacitorBankScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.matter.MatterDecomposerScreen
|
||||
@ -37,7 +37,7 @@ import ru.dbotthepony.mc.otm.client.screen.tech.PlatePressScreen
|
||||
import ru.dbotthepony.mc.otm.menu.decorative.CargoCrateMenu
|
||||
import ru.dbotthepony.mc.otm.menu.decorative.HoloSignMenu
|
||||
import ru.dbotthepony.mc.otm.menu.decorative.MinecartCargoCrateMenu
|
||||
import ru.dbotthepony.mc.otm.menu.matter.ItemRepairerMenu
|
||||
import ru.dbotthepony.mc.otm.menu.matter.MatterReconstructorMenu
|
||||
import ru.dbotthepony.mc.otm.menu.matter.MatterBottlerMenu
|
||||
import ru.dbotthepony.mc.otm.menu.matter.MatterCapacitorBankMenu
|
||||
import ru.dbotthepony.mc.otm.menu.matter.MatterDecomposerMenu
|
||||
@ -87,7 +87,7 @@ object MMenus {
|
||||
val HOLO_SIGN: MenuType<HoloSignMenu> by registry.register(MNames.HOLO_SIGN) { MenuType(::HoloSignMenu) }
|
||||
val COBBLESTONE_GENERATOR: MenuType<CobblerMenu> by registry.register(MNames.COBBLESTONE_GENERATOR) { MenuType(::CobblerMenu) }
|
||||
val ESSENCE_STORAGE: MenuType<EssenceStorageMenu> by registry.register(MNames.ESSENCE_STORAGE) { MenuType(::EssenceStorageMenu) }
|
||||
val ITEM_REPAIER: MenuType<ItemRepairerMenu> by registry.register(MNames.ITEM_REPAIRER) { MenuType(::ItemRepairerMenu) }
|
||||
val ITEM_REPAIER: MenuType<MatterReconstructorMenu> by registry.register(MNames.MATTER_RECONSTRUCTOR) { MenuType(::MatterReconstructorMenu) }
|
||||
|
||||
val STORAGE_BUS: MenuType<*> by registry.register(MNames.STORAGE_BUS) { MenuType(::StorageBusMenu) }
|
||||
val STORAGE_EXPORTER: MenuType<*> by registry.register(MNames.STORAGE_EXPORTER) { MenuType(::StorageExporterMenu) }
|
||||
@ -128,7 +128,7 @@ object MMenus {
|
||||
MenuScreens.register(HOLO_SIGN, ::HoloSignScreen)
|
||||
MenuScreens.register(COBBLESTONE_GENERATOR, ::CobblerScreen)
|
||||
MenuScreens.register(ESSENCE_STORAGE, ::EssenceStorageScreen)
|
||||
MenuScreens.register(ITEM_REPAIER, ::ItemRepairerScreen)
|
||||
MenuScreens.register(ITEM_REPAIER, ::MatterReconstructorScreen)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ object MNames {
|
||||
const val MATTER_PANEL = "matter_panel"
|
||||
const val MATTER_REPLICATOR = "matter_replicator"
|
||||
const val MATTER_BOTTLER = "matter_bottler"
|
||||
const val ITEM_REPAIRER = "item_repairer"
|
||||
const val MATTER_RECONSTRUCTOR = "item_repairer"
|
||||
const val DRIVE_VIEWER = "drive_viewer"
|
||||
const val DRIVE_RACK = "drive_rack"
|
||||
const val ITEM_MONITOR = "item_monitor"
|
||||
|
Loading…
Reference in New Issue
Block a user