This commit is contained in:
DBotThePony 2024-01-06 11:37:34 +07:00
commit b4c994f02f
Signed by: DBot
GPG Key ID: DCC23B5715498507
73 changed files with 122 additions and 92 deletions

View File

@ -72,7 +72,7 @@ fun addMachineAdvancements(serializer: Consumer<AdvancementHolder>, lang: Matter
val chem = AdvancementBuilder()
.parent(root)
.display(
itemStack = ItemStack(MItems.CHEMICAL_GENERATOR),
itemStack = ItemStack(MItems.CHEMICAL_GENERATOR[null]!!),
title = translation.add("chemical_generator", "Burning the Organics") {
russian("Сжигание органики")
},
@ -80,7 +80,11 @@ fun addMachineAdvancements(serializer: Consumer<AdvancementHolder>, lang: Matter
russian("Создайте химический генератор. Лучше установить его снаружи")
},
)
.addCriterion("has_machine", criterion(MItems.CHEMICAL_GENERATOR))
.also {
for ((i, v) in MItems.CHEMICAL_GENERATOR.values.withIndex())
it.addCriterion("has_machine_$i", criterion(v))
}
.requirements(AdvancementRequirements.Strategy.OR)
.save(serializer, modLocation("machines/chemical_generator"))
val press = AdvancementBuilder()
@ -119,7 +123,7 @@ fun addMachineAdvancements(serializer: Consumer<AdvancementHolder>, lang: Matter
val capacitor = CraftEntry(MItems.MATTER_CAPACITOR_BANK.values, "Modular Matter Tank",
russianName = "Модульный бак материи")
val counter = CraftEntry(MItems.ENERGY_COUNTER, "Visualize Power Burn",
val counter = CraftEntry(MItems.ENERGY_COUNTER.values, "Visualize Power Burn",
russianName = "Визуализация сжигания энергии")
val battery = CraftEntry(MItems.BATTERY_BANK.values, "Batteries Not Included", "By all means avoid the urge to hammer incompatible batteries into the power bus.",
russianName = "Батарейки в комплект не входят", russianSuffix = "Пожалуйста, воздержитесь от вбивания кувалдой несовместимых батарей в энергетическую шину.")

View File

@ -14,6 +14,7 @@ fun addBlockModels(provider: MatteryBlockModelProvider) {
colored(MBlocks.ESSENCE_STORAGE, listOf("0", "particle"))
colored(MBlocks.ITEM_MONITOR, listOf("0", "particle"))
colored(MBlocks.MATTER_RECONSTRUCTOR, listOf("0", "particle"))
colored(MBlocks.ENERGY_SERVO, listOf("0", "particle"))
colored("matter_capacitor_bank", listOf("1", "particle"), "mattercapacitorbank_frame")
colored("battery_bank", listOf("0", "particle"), "batterybank_frame")
@ -22,6 +23,9 @@ fun addBlockModels(provider: MatteryBlockModelProvider) {
colored("android_charger", "_middle", listOf("0", "particle"))
colored("android_charger", "_top", listOf("0", "particle"))
colored("chemical_generator", "_idle", listOf("0", "particle"))
colored("chemical_generator", "_working", listOf("0", "particle"))
colored("storage_power_supplier", listOf("0", "particle"))
colored("matter_panel", listOf("texture", "particle"))
colored("drive_viewer", "_idle", listOf("texture", "particle"))
@ -54,5 +58,16 @@ fun addBlockModels(provider: MatteryBlockModelProvider) {
colored("android_station", "_idle", mapOf("1" to "android_station_base", "particle" to "android_station_base"))
colored("android_station", "_working", mapOf("2" to "android_station_base", "particle" to "android_station_base"))
val energyCounter = setOf(
"down", "east", "north", "south",
"north_down", "north_east", "north_west",
"south_down", "south_east", "south_west",
"up", "west",
)
for (model in energyCounter) {
colored("energy_counter_$model", listOf("texture", "particle"), "energy_counter")
}
}
}

View File

@ -29,7 +29,7 @@ fun addBlockStates(provider: MatteryBlockStateProvider) {
provider.block(MBlocks.TRITANIUM_INGOT_BLOCK)
provider.block(MBlocks.METAL_MESH)
provider.block(MBlocks.CHEMICAL_GENERATOR)
provider.block(MBlocks.CHEMICAL_GENERATOR.values)
provider.block(MBlocks.MATTER_SCANNER.values)
provider.block(MBlocks.ITEM_MONITOR.values)
provider.block(MBlocks.HOLO_SIGN)
@ -110,7 +110,7 @@ fun addBlockStates(provider: MatteryBlockStateProvider) {
provider.block(MBlocks.MATTER_PANEL.values)
provider.block(MBlocks.MATTER_RECYCLER.values)
provider.block(MBlocks.MATTER_RECONSTRUCTOR.values)
provider.block(MBlocks.ENERGY_SERVO)
provider.block(MBlocks.ENERGY_SERVO.values)
provider.block(MBlocks.COBBLESTONE_GENERATOR.values)
provider.block(MBlocks.ESSENCE_STORAGE.values)

View File

@ -53,46 +53,49 @@ fun addComplexBlockStates(provider: MatteryBlockStateProvider) {
}
}
with(provider.getMultipartBuilder(MBlocks.ENERGY_COUNTER)) {
// даваааййй
val up = provider.models().getExistingFile(modLocation("block/energy_counter_up"))
val down = provider.models().getExistingFile(modLocation("block/energy_counter_down"))
val west = provider.models().getExistingFile(modLocation("block/energy_counter_west"))
val east = provider.models().getExistingFile(modLocation("block/energy_counter_east"))
for ((dye, block) in MBlocks.ENERGY_COUNTER) {
with(provider.getMultipartBuilder(block)) {
val dyeName = dye?.name?.lowercase()?.let { "_$it" } ?: ""
// даваааййй
val up = provider.models().getExistingFile(modLocation("block/energy_counter_up$dyeName"))
val down = provider.models().getExistingFile(modLocation("block/energy_counter_down$dyeName"))
val west = provider.models().getExistingFile(modLocation("block/energy_counter_west$dyeName"))
val east = provider.models().getExistingFile(modLocation("block/energy_counter_east$dyeName"))
// ДАААА ДАВАЙЙ ДАААВАААЙЙЙЙЙЙ
val north = provider.models().getExistingFile(modLocation("block/energy_counter_north"))
val northDown = provider.models().getExistingFile(modLocation("block/energy_counter_north_down"))
val northEast = provider.models().getExistingFile(modLocation("block/energy_counter_north_east"))
val northWest = provider.models().getExistingFile(modLocation("block/energy_counter_north_west"))
val south = provider.models().getExistingFile(modLocation("block/energy_counter_south"))
val southDown = provider.models().getExistingFile(modLocation("block/energy_counter_south_down"))
val southEast = provider.models().getExistingFile(modLocation("block/energy_counter_south_east"))
val southWest = provider.models().getExistingFile(modLocation("block/energy_counter_south_west"))
// ДАААА ДАВАЙЙ ДАААВАААЙЙЙЙЙЙ
val north = provider.models().getExistingFile(modLocation("block/energy_counter_north$dyeName"))
val northDown = provider.models().getExistingFile(modLocation("block/energy_counter_north_down$dyeName"))
val northEast = provider.models().getExistingFile(modLocation("block/energy_counter_north_east$dyeName"))
val northWest = provider.models().getExistingFile(modLocation("block/energy_counter_north_west$dyeName"))
val south = provider.models().getExistingFile(modLocation("block/energy_counter_south$dyeName"))
val southDown = provider.models().getExistingFile(modLocation("block/energy_counter_south_down$dyeName"))
val southEast = provider.models().getExistingFile(modLocation("block/energy_counter_south_east$dyeName"))
val southWest = provider.models().getExistingFile(modLocation("block/energy_counter_south_west$dyeName"))
for (dir in arrayOf(Direction.EAST, Direction.WEST, Direction.SOUTH, Direction.NORTH)) {
part().modelFile(down).rotationY(dir.yRotationBlockstateNorth()).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.UP).condition(EnergyCounterBlock.IF_DIRECTION, dir)
part().modelFile(up).rotationY(dir.yRotationBlockstateNorth()).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.DOWN).condition(EnergyCounterBlock.IF_DIRECTION, dir)
}
for (dir in arrayOf(Direction.EAST, Direction.WEST, Direction.SOUTH, Direction.NORTH)) {
part().modelFile(down).rotationY(dir.yRotationBlockstateNorth()).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.UP).condition(EnergyCounterBlock.IF_DIRECTION, dir)
part().modelFile(up).rotationY(dir.yRotationBlockstateNorth()).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.DOWN).condition(EnergyCounterBlock.IF_DIRECTION, dir)
}
// низкий поклон за полностью рабочий поворот вокруг оси Z
part().modelFile(north).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.NORTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.UP)
part().modelFile(northDown).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.NORTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.DOWN)
part().modelFile(northEast).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.NORTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.EAST)
part().modelFile(northWest).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.NORTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.WEST)
// низкий поклон за полностью рабочий поворот вокруг оси Z
part().modelFile(north).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.NORTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.UP)
part().modelFile(northDown).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.NORTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.DOWN)
part().modelFile(northEast).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.NORTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.EAST)
part().modelFile(northWest).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.NORTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.WEST)
part().modelFile(south).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.SOUTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.UP)
part().modelFile(southDown).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.SOUTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.DOWN)
part().modelFile(southEast).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.SOUTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.EAST)
part().modelFile(southWest).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.SOUTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.WEST)
part().modelFile(south).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.SOUTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.UP)
part().modelFile(southDown).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.SOUTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.DOWN)
part().modelFile(southEast).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.SOUTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.EAST)
part().modelFile(southWest).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, Direction.SOUTH).condition(EnergyCounterBlock.IF_DIRECTION, Direction.WEST)
for (dir in arrayOf(Direction.WEST, Direction.EAST)) {
val mdl = if (dir === Direction.WEST) west else east
for (dir in arrayOf(Direction.WEST, Direction.EAST)) {
val mdl = if (dir === Direction.WEST) west else east
part().modelFile(mdl).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, dir).condition(EnergyCounterBlock.IF_DIRECTION, Direction.NORTH)
part().modelFile(mdl).rotationX(-90).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, dir).condition(EnergyCounterBlock.IF_DIRECTION, Direction.UP)
part().modelFile(mdl).rotationX(180).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, dir).condition(EnergyCounterBlock.IF_DIRECTION, Direction.SOUTH)
part().modelFile(mdl).rotationX(90).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, dir).condition(EnergyCounterBlock.IF_DIRECTION, Direction.DOWN)
part().modelFile(mdl).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, dir).condition(EnergyCounterBlock.IF_DIRECTION, Direction.NORTH)
part().modelFile(mdl).rotationX(-90).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, dir).condition(EnergyCounterBlock.IF_DIRECTION, Direction.UP)
part().modelFile(mdl).rotationX(180).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, dir).condition(EnergyCounterBlock.IF_DIRECTION, Direction.SOUTH)
part().modelFile(mdl).rotationX(90).addModel().condition(EnergyCounterBlock.INPUT_DIRECTION, dir).condition(EnergyCounterBlock.IF_DIRECTION, Direction.DOWN)
}
}
}
}

View File

@ -166,15 +166,15 @@ fun addItemModels(provider: MatteryItemModelProvider) {
for (item in MRegistry.CARGO_CRATES.allItems.values)
provider.block(item, "${item.registryName!!.path}_closed")
provider.block(MItems.CHEMICAL_GENERATOR, "chemical_generator_working")
provider.block(MItems.ENERGY_COUNTER, "energy_counter_down")
provider.coloredWithBaseBlock(MItems.CHEMICAL_GENERATOR, "chemical_generator", "_working")
provider.coloredWithBaseBlock(MItems.ENERGY_COUNTER, "energy_counter_down")
provider.coloredWithBaseBlock(MItems.MATTER_BOTTLER, "matter_bottler", "_idle")
provider.coloredWithBaseBlock(MItems.MATTER_SCANNER, "matter_scanner", "_idle")
provider.coloredWithBaseBlock(MItems.MATTER_REPLICATOR, "matter_replicator", "_idle")
provider.coloredWithBaseBlock(MItems.DRIVE_VIEWER, "drive_viewer", "_idle")
provider.block(MItems.MATTER_CABLE, "matter_cable_core")
provider.coloredWithBaseBlock(MItems.MATTER_DECOMPOSER, "matter_decomposer", "_idle")
provider.block(MItems.ENERGY_SERVO, "energy_servo")
provider.coloredWithBaseBlock(MItems.ENERGY_SERVO, "energy_servo")
provider.coloredWithBaseBlock(MItems.ESSENCE_STORAGE, "essence_storage")
provider.coloredWithBaseBlock(MItems.MATTER_RECONSTRUCTOR, "matter_reconstructor")

View File

@ -453,12 +453,12 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.TRITANIUM_INGOT_BLOCK, "Tritanium Plating Block")
add(MBlocks.ENERGY_COUNTER, "Energy Counter")
add(MBlocks.ENERGY_COUNTER, "facing", "Input facing: %s")
add(MBlocks.ENERGY_COUNTER, "switch", "Switch input facing")
add(MBlocks.ENERGY_COUNTER, "limit", "I/O Limit. -1 means no limit")
addBlock(MBlocks.ENERGY_COUNTER.values, "Energy Counter")
add(MBlocks.ENERGY_COUNTER[null]!!, "facing", "Input facing: %s")
add(MBlocks.ENERGY_COUNTER[null]!!, "switch", "Switch input facing")
add(MBlocks.ENERGY_COUNTER[null]!!, "limit", "I/O Limit. -1 means no limit")
add(MBlocks.CHEMICAL_GENERATOR, "Chemical Generator")
addBlock(MBlocks.CHEMICAL_GENERATOR.values, "Chemical Generator")
add(MBlocks.DRIVE_RACK, "Condensation Drive Rack")
addBlock(MBlocks.ITEM_MONITOR.values, "Item Monitor")
addBlock(MBlocks.PLATE_PRESS.values, "Plate Press")
@ -469,8 +469,8 @@ private fun blocks(provider: MatteryLanguageProvider) {
addBlock(MBlocks.POWERED_BLAST_FURNACE.values, "Induction Furnace")
addBlock(MBlocks.MATTER_RECYCLER.values, "Matter Recycler")
add(MBlocks.ENERGY_SERVO, "Energy Servo")
add(MBlocks.ENERGY_SERVO, "desc", "Charges, Discharges or Exchanges energy of items")
addBlock(MBlocks.ENERGY_SERVO.values, "Energy Servo")
addBlock(MBlocks.ENERGY_SERVO.values, "desc", "Charges, Discharges or Exchanges energy of items")
add(MBlocks.CARBON_FIBRE_BLOCK, "Carbon Fibre Block")
add(MBlocks.METAL_JUNK, "Metal Junk Block")

View File

@ -455,12 +455,12 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.TRITANIUM_INGOT_BLOCK, "Блок слитков тритана")
add(MBlocks.ENERGY_COUNTER, "Счётчик энергии")
add(MBlocks.ENERGY_COUNTER, "Facing", "сторона входа: %s")
add(MBlocks.ENERGY_COUNTER, "Switch", "сменить сторону входа")
add(MBlocks.ENERGY_COUNTER, "Limit", "лимит ввода/вывода. -1 для отключения лимитов")
addBlock(MBlocks.ENERGY_COUNTER.values, "Счётчик энергии")
add(MBlocks.ENERGY_COUNTER[null]!!, "Facing", "сторона входа: %s")
add(MBlocks.ENERGY_COUNTER[null]!!, "Switch", "сменить сторону входа")
add(MBlocks.ENERGY_COUNTER[null]!!, "Limit", "лимит ввода/вывода. -1 для отключения лимитов")
add(MBlocks.CHEMICAL_GENERATOR, "Химический генератор")
addBlock(MBlocks.CHEMICAL_GENERATOR.values, "Химический генератор")
add(MBlocks.DRIVE_RACK, "Стеллаж дисков конденсации")
addBlock(MBlocks.ITEM_MONITOR.values, "Монитор предметов")
addBlock(MBlocks.PLATE_PRESS.values, "Пресс пластин")
@ -471,8 +471,8 @@ private fun blocks(provider: MatteryLanguageProvider) {
addBlock(MBlocks.POWERED_SMOKER.values, "Микроволновая печь")
addBlock(MBlocks.MATTER_RECYCLER.values, "Перерабатыватель материи")
add(MBlocks.ENERGY_SERVO, "Энергетическая помпа")
add(MBlocks.ENERGY_SERVO, "Desc", "заряжает, разряжает и передаёт энергию между предметами")
addBlock(MBlocks.ENERGY_SERVO.values, "Энергетическая помпа")
addBlock(MBlocks.ENERGY_SERVO.values, "desc", "заряжает, разряжает и передаёт энергию между предметами")
add(MBlocks.CARBON_FIBRE_BLOCK, "Блок углеродных трубок")
add(MBlocks.METAL_MESH, "Блок металлической сетки")

View File

@ -138,9 +138,9 @@ fun addLootTables(lootTables: LootTables) {
lootTables.tile(MBlocks.PAINTER)
lootTables.tile(MBlocks.MATTER_ENTANGLER)
lootTables.tile(MBlocks.ENERGY_SERVO)
lootTables.tile(MBlocks.ENERGY_COUNTER)
lootTables.tile(MBlocks.CHEMICAL_GENERATOR)
lootTables.tile(MBlocks.ENERGY_SERVO.values)
lootTables.tile(MBlocks.ENERGY_COUNTER.values)
lootTables.tile(MBlocks.CHEMICAL_GENERATOR.values)
lootTables.tile(MBlocks.HOLO_SIGN, "isLocked")
lootTables.tile(MBlocks.STORAGE_CABLE)
lootTables.tile(MBlocks.ANDROID_STATION.values)

View File

@ -44,10 +44,12 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) {
.unlockedBy(MItemTags.TRITANIUM_INGOTS_STORAGE)
.save(consumer, modLocation("tritanium_ingot_from_storage"))
ShapelessRecipeBuilder(machinesCategory, MItems.ENERGY_COUNTER, 1)
.requires(MItems.ENERGY_COUNTER)
.unlockedBy(MItems.ENERGY_COUNTER)
.save(consumer, modLocation("energy_counter_reset"))
MItems.ENERGY_COUNTER.values.forEach {
ShapelessRecipeBuilder(machinesCategory, it, 1)
.requires(it)
.unlockedBy(it)
.save(consumer, modLocation("${it.registryName!!.path}_reset"))
}
ShapelessRecipeBuilder(machinesCategory, MItems.HOLO_SIGN, 1)
.requires(MItems.HOLO_SIGN)
@ -173,7 +175,7 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) {
.unlockedBy(MItems.ELECTROMAGNET)
.build(consumer)
MatteryRecipe(MItems.ENERGY_SERVO, category = RecipeCategory.MISC)
MatteryRecipe(MItems.ENERGY_SERVO[null]!!, category = RecipeCategory.MISC)
.row(MItemTags.TRITANIUM_PLATES, MItems.MACHINE_FRAME, MItemTags.TRITANIUM_PLATES)
.row(MItemTags.TRITANIUM_PLATES, MItems.ENERGY_BUS, MItemTags.TRITANIUM_PLATES)
.unlockedBy(MItems.ENERGY_BUS)

View File

@ -293,6 +293,9 @@ fun addPainterRecipes(consumer: RecipeOutput) {
MItems.DRIVE_VIEWER,
MItems.ANDROID_CHARGER,
MItems.MATTER_PANEL,
MItems.ENERGY_SERVO,
MItems.ENERGY_COUNTER,
MItems.CHEMICAL_GENERATOR,
)
for (list in blocks) {

View File

@ -189,8 +189,8 @@ fun addTags(tagsProvider: TagsProvider) {
*MBlocks.MATTER_PANEL.values.toTypedArray(),
*MBlocks.MATTER_REPLICATOR.values.toTypedArray(),
*MBlocks.MATTER_BOTTLER.values.toTypedArray(),
MBlocks.ENERGY_COUNTER,
MBlocks.CHEMICAL_GENERATOR,
*MBlocks.ENERGY_COUNTER.values.toTypedArray(),
*MBlocks.CHEMICAL_GENERATOR.values.toTypedArray(),
*MBlocks.PLATE_PRESS.values.toTypedArray(),
*MBlocks.TWIN_PLATE_PRESS.values.toTypedArray(),
*MBlocks.MATTER_RECYCLER.values.toTypedArray(),
@ -210,7 +210,7 @@ fun addTags(tagsProvider: TagsProvider) {
*MBlocks.STORAGE_POWER_SUPPLIER.values.toTypedArray(),
MBlocks.PHANTOM_ATTRACTOR,
MBlocks.ENERGY_SERVO,
*MBlocks.ENERGY_SERVO.values.toTypedArray(),
MBlocks.TRITANIUM_INGOT_BLOCK,
MBlocks.METAL_JUNK,

View File

@ -53,16 +53,16 @@ fun Block.getShapeForEachState(properties: List<Property<*>>, fn: (BlockState) -
val builder = Object2ObjectArrayMap<BlockState, Supplier<VoxelShape>>()
if (properties.isEmpty()) {
val shape = fn(stateDefinition.possibleStates.first())
val shape = Util.backgroundExecutor().submit(Callable { fn(stateDefinition.possibleStates.first()) })
for (state in stateDefinition.possibleStates) {
builder.put(state, Supplier { shape })
builder[state] = shape.asSupplier()
}
} else {
val cache = Object2ObjectArrayMap<List<Any>, Supplier<VoxelShape>>()
for (state in stateDefinition.possibleStates) {
builder.put(state, cache.computeIfAbsent(properties.map { state[it] }, Object2ObjectFunction { Util.backgroundExecutor().submit(Callable { fn(state) }).asSupplier() }))
builder[state] = cache.computeIfAbsent(properties.map { state[it] }, Object2ObjectFunction { Util.backgroundExecutor().submit(Callable { fn(state) }).asSupplier() })
}
}

View File

@ -2,6 +2,7 @@ package ru.dbotthepony.mc.otm.block.tech
import net.minecraft.core.BlockPos
import net.minecraft.network.chat.Component
import net.minecraft.world.item.DyeColor
import net.minecraft.world.item.ItemStack
import net.minecraft.world.item.TooltipFlag
import net.minecraft.world.level.BlockGetter
@ -24,7 +25,7 @@ import ru.dbotthepony.mc.otm.core.get
import ru.dbotthepony.mc.otm.registry.MBlockEntities
import ru.dbotthepony.mc.otm.shapes.BlockShapes
class ChemicalGeneratorBlock : RotatableMatteryBlock(DEFAULT_MACHINE_PROPERTIES), EntityBlock {
class ChemicalGeneratorBlock(val color: DyeColor?) : RotatableMatteryBlock(DEFAULT_MACHINE_PROPERTIES), EntityBlock {
override fun newBlockEntity(p_153215_: BlockPos, p_153216_: BlockState): BlockEntity {
return ChemicalGeneratorBlockEntity(p_153215_, p_153216_)
}

View File

@ -4,6 +4,7 @@ import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap
import net.minecraft.Util
import net.minecraft.core.BlockPos
import net.minecraft.core.Direction
import net.minecraft.world.item.DyeColor
import net.minecraft.world.item.context.BlockPlaceContext
import net.minecraft.world.level.BlockGetter
import net.minecraft.world.level.Level
@ -26,7 +27,7 @@ import ru.dbotthepony.mc.otm.shapes.BlockShapes
import java.util.concurrent.Callable
import java.util.function.Supplier
class EnergyCounterBlock : MatteryBlock(DEFAULT_MACHINE_PROPERTIES), EntityBlock {
class EnergyCounterBlock(val color: DyeColor?) : MatteryBlock(DEFAULT_MACHINE_PROPERTIES), EntityBlock {
override fun newBlockEntity(blockPos: BlockPos, blockState: BlockState): BlockEntity {
return EnergyCounterBlockEntity(blockPos, blockState)
}

View File

@ -1,6 +1,7 @@
package ru.dbotthepony.mc.otm.block.tech
import net.minecraft.core.BlockPos
import net.minecraft.world.item.DyeColor
import net.minecraft.world.level.BlockGetter
import net.minecraft.world.level.Level
import net.minecraft.world.level.block.EntityBlock
@ -20,7 +21,7 @@ import ru.dbotthepony.mc.otm.core.get
import ru.dbotthepony.mc.otm.registry.MBlockEntities
import ru.dbotthepony.mc.otm.shapes.BlockShapes
class EnergyServoBlock : RotatableMatteryBlock(DEFAULT_MACHINE_PROPERTIES), EntityBlock {
class EnergyServoBlock(val color: DyeColor?) : RotatableMatteryBlock(DEFAULT_MACHINE_PROPERTIES), EntityBlock {
override fun newBlockEntity(p_153215_: BlockPos, p_153216_: BlockState): BlockEntity {
return EnergyServoBlockEntity(p_153215_, p_153216_)
}

View File

@ -65,7 +65,7 @@ class JEIPlugin : IModPlugin {
}
override fun registerRecipeCatalysts(registration: IRecipeCatalystRegistration) {
registration.addRecipeCatalyst(ItemStack(MItems.CHEMICAL_GENERATOR), RecipeTypes.FUELING)
registration.addRecipeCatalyst(ItemStack(MItems.CHEMICAL_GENERATOR[null]!!), RecipeTypes.FUELING)
registration.addRecipeCatalyst(ItemStack(MItems.POWERED_FURNACE[null]!!), RecipeTypes.SMELTING)
registration.addRecipeCatalyst(ItemStack(MItems.ExopackUpgrades.SMELTING_UPGRADE), RecipeTypes.SMELTING)
registration.addRecipeCatalyst(ItemStack(MItems.POWERED_BLAST_FURNACE[null]!!), RecipeTypes.BLASTING)

View File

@ -64,13 +64,13 @@ object MBlockEntities {
val CARGO_CRATE by register(MNames.CARGO_CRATE, ::CargoCrateBlockEntity, MRegistry.CARGO_CRATES.blocks)
val DRIVE_RACK by register(MNames.DRIVE_RACK, ::DriveRackBlockEntity, MBlocks::DRIVE_RACK)
val ITEM_MONITOR by register(MNames.ITEM_MONITOR, ::ItemMonitorBlockEntity, MBlocks.ITEM_MONITOR)
val ENERGY_COUNTER by register(MNames.ENERGY_COUNTER, ::EnergyCounterBlockEntity, MBlocks::ENERGY_COUNTER)
val CHEMICAL_GENERATOR by register(MNames.CHEMICAL_GENERATOR, ::ChemicalGeneratorBlockEntity, MBlocks::CHEMICAL_GENERATOR)
val ENERGY_COUNTER by register(MNames.ENERGY_COUNTER, ::EnergyCounterBlockEntity, MBlocks.ENERGY_COUNTER)
val CHEMICAL_GENERATOR by register(MNames.CHEMICAL_GENERATOR, ::ChemicalGeneratorBlockEntity, MBlocks.CHEMICAL_GENERATOR)
val PLATE_PRESS by register(MNames.PLATE_PRESS, ::PlatePressBlockEntity, MBlocks.PLATE_PRESS)
val TWIN_PLATE_PRESS by register(MNames.TWIN_PLATE_PRESS, { a, b -> PlatePressBlockEntity(a, b, true) }, MBlocks.TWIN_PLATE_PRESS)
val GRAVITATION_STABILIZER by register(MNames.GRAVITATION_STABILIZER, ::GravitationStabilizerBlockEntity, MBlocks::GRAVITATION_STABILIZER)
val MATTER_RECYCLER by register(MNames.MATTER_RECYCLER, ::MatterRecyclerBlockEntity, MBlocks.MATTER_RECYCLER)
val ENERGY_SERVO by register(MNames.ENERGY_SERVO, ::EnergyServoBlockEntity, MBlocks::ENERGY_SERVO)
val ENERGY_SERVO by register(MNames.ENERGY_SERVO, ::EnergyServoBlockEntity, MBlocks.ENERGY_SERVO)
val COBBLESTONE_GENERATOR by register(MNames.COBBLESTONE_GENERATOR, ::CobblerBlockEntity, MBlocks.COBBLESTONE_GENERATOR)
val ESSENCE_STORAGE by register(MNames.ESSENCE_STORAGE, ::EssenceStorageBlockEntity, MBlocks.ESSENCE_STORAGE)
val MATTER_RECONSTRUCTOR by register(MNames.MATTER_RECONSTRUCTOR, ::MatterReconstructorBlockEntity, MBlocks.MATTER_RECONSTRUCTOR)

View File

@ -97,15 +97,15 @@ object MBlocks {
val MATTER_PANEL = registry.coloredWithBase(MNames.MATTER_PANEL, ::MatterPanelBlock)
val MATTER_REPLICATOR = registry.coloredWithBase(MNames.MATTER_REPLICATOR, ::MatterReplicatorBlock)
val MATTER_BOTTLER = registry.coloredWithBase(MNames.MATTER_BOTTLER, ::MatterBottlerBlock)
val ENERGY_COUNTER by registry.register(MNames.ENERGY_COUNTER, ::EnergyCounterBlock)
val CHEMICAL_GENERATOR by registry.register(MNames.CHEMICAL_GENERATOR, ::ChemicalGeneratorBlock)
val ENERGY_COUNTER = registry.coloredWithBase(MNames.ENERGY_COUNTER, ::EnergyCounterBlock)
val CHEMICAL_GENERATOR = registry.coloredWithBase(MNames.CHEMICAL_GENERATOR, ::ChemicalGeneratorBlock)
val PLATE_PRESS = registry.coloredWithBase(MNames.PLATE_PRESS, ::PlatePressBlock)
val TWIN_PLATE_PRESS = registry.coloredWithBase(MNames.TWIN_PLATE_PRESS) { color -> PlatePressBlock(color, isTwin = true) }
val POWERED_FURNACE = registry.coloredWithBase(MNames.POWERED_FURNACE, ::PoweredFurnaceBlock)
val POWERED_BLAST_FURNACE = registry.coloredWithBase(MNames.POWERED_BLAST_FURNACE, ::PoweredBlastFurnaceBlock)
val POWERED_SMOKER = registry.coloredWithBase(MNames.POWERED_SMOKER, ::PoweredSmokerBlock)
val MATTER_RECYCLER = registry.coloredWithBase(MNames.MATTER_RECYCLER, ::MatterRecyclerBlock)
val ENERGY_SERVO by registry.register(MNames.ENERGY_SERVO, ::EnergyServoBlock)
val ENERGY_SERVO = registry.coloredWithBase(MNames.ENERGY_SERVO, ::EnergyServoBlock)
val COBBLESTONE_GENERATOR = registry.coloredWithBase(MNames.COBBLESTONE_GENERATOR, ::CobblerBlock)
val INFINITE_WATER_SOURCE by registry.register(MNames.INFINITE_WATER_SOURCE) { InfiniteWaterSourceBlock() }
val ESSENCE_STORAGE = registry.coloredWithBase(MNames.ESSENCE_STORAGE, ::EssenceStorageBlock)

View File

@ -77,8 +77,8 @@ object MItems {
val TRITANIUM_ORE: BlockItem by registry.register(MNames.TRITANIUM_ORE) { BlockItem(MBlocks.TRITANIUM_ORE, DEFAULT_PROPERTIES) }
val DEEPSLATE_TRITANIUM_ORE: BlockItem by registry.register(MNames.DEEPSLATE_TRITANIUM_ORE) { BlockItem(MBlocks.DEEPSLATE_TRITANIUM_ORE, DEFAULT_PROPERTIES) }
val TRITANIUM_RAW_BLOCK: BlockItem by registry.register(MNames.TRITANIUM_RAW_BLOCK) { BlockItem(MBlocks.TRITANIUM_RAW_BLOCK, DEFAULT_PROPERTIES) }
val ENERGY_COUNTER: BlockItem by registry.register(MNames.ENERGY_COUNTER) { BlockItem(MBlocks.ENERGY_COUNTER, DEFAULT_PROPERTIES) }
val CHEMICAL_GENERATOR: BlockItem by registry.register(MNames.CHEMICAL_GENERATOR) { BlockItem(MBlocks.CHEMICAL_GENERATOR, DEFAULT_PROPERTIES) }
val ENERGY_COUNTER = register(MNames.ENERGY_COUNTER, MBlocks.ENERGY_COUNTER)
val CHEMICAL_GENERATOR = register(MNames.CHEMICAL_GENERATOR, MBlocks.CHEMICAL_GENERATOR)
val PLATE_PRESS = register(MNames.PLATE_PRESS, MBlocks.PLATE_PRESS)
val TWIN_PLATE_PRESS = register(MNames.TWIN_PLATE_PRESS, MBlocks.TWIN_PLATE_PRESS)
val MATTER_RECYCLER = register(MNames.MATTER_RECYCLER, MBlocks.MATTER_RECYCLER)
@ -99,7 +99,7 @@ object MItems {
val GRAVITATION_STABILIZER: BlockItem by registry.register(MNames.GRAVITATION_STABILIZER) { BlockItem(MBlocks.GRAVITATION_STABILIZER, DEFAULT_PROPERTIES) }
val PHANTOM_ATTRACTOR: DoubleHighBlockItem by registry.register(MNames.PHANTOM_ATTRACTOR) { DoubleHighBlockItem(MBlocks.PHANTOM_ATTRACTOR, DEFAULT_PROPERTIES) }
val ENERGY_SERVO: BlockItem by registry.register(MNames.ENERGY_SERVO) { BlockItem(MBlocks.ENERGY_SERVO, DEFAULT_PROPERTIES) }
val ENERGY_SERVO = register(MNames.ENERGY_SERVO, MBlocks.ENERGY_SERVO)
val COBBLESTONE_GENERATOR = register(MNames.COBBLESTONE_GENERATOR, MBlocks.COBBLESTONE_GENERATOR)
val INFINITE_WATER_SOURCE: BlockItem by registry.register(MNames.INFINITE_WATER_SOURCE) { BlockItem(MBlocks.INFINITE_WATER_SOURCE, DEFAULT_PROPERTIES) }
@ -121,12 +121,12 @@ object MItems {
machines.addAll(POWERED_BLAST_FURNACE.asSupplierArray())
machines.addAll(POWERED_SMOKER.asSupplierArray())
machines.addAll(ANDROID_STATION.asSupplierArray().iterator())
machines.addAll(ANDROID_CHARGER.asSupplierArray().iterator())
machines.addAll(BATTERY_BANK.asSupplierArray().iterator())
machines.add(::ENERGY_COUNTER)
machines.add(::CHEMICAL_GENERATOR)
machines.add(::ENERGY_SERVO)
machines.addAll(ANDROID_STATION.asSupplierArray())
machines.addAll(ANDROID_CHARGER.asSupplierArray())
machines.addAll(BATTERY_BANK.asSupplierArray())
machines.addAll(ENERGY_COUNTER.asSupplierArray())
machines.addAll(CHEMICAL_GENERATOR.asSupplierArray())
machines.addAll(ENERGY_SERVO.asSupplierArray())
machines.add(::PAINTER)
machines.addAll(COBBLESTONE_GENERATOR.asSupplierArray().iterator())

View File

@ -1,6 +1,6 @@
{
"credit": "Made with Blockbench",
"render_type": "translucent",
"render_type": "cutout",
"texture_size": [32, 32],
"textures": {
"0": "overdrive_that_matters:block/powered_smoker_base",

View File

@ -1,6 +1,6 @@
{
"credit": "Made with Blockbench",
"render_type": "translucent",
"render_type": "cutout",
"texture_size": [32, 32],
"textures": {
"0": "overdrive_that_matters:block/powered_smoker_base",

View File

@ -1,6 +1,6 @@
{
"credit": "Made with Blockbench",
"render_type": "translucent",
"render_type": "cutout",
"texture_size": [32, 32],
"textures": {
"0": "overdrive_that_matters:block/powered_smoker_base",

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB