From b38ebfaa3b5bf616e0929f81aa95e03be0961efb Mon Sep 17 00:00:00 2001 From: GearShocky Date: Tue, 4 Mar 2025 00:13:32 +0500 Subject: [PATCH 01/29] I want this --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 19847cef5..abaa278cd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -190,7 +190,7 @@ dependencies { compileOnly("curse.maven:resourceful-config-714059:${resourceful_config_id}") compileOnly("curse.maven:botarium-704113:${botarium_id}") compileOnly("curse.maven:ad-astra-635042:${ad_astra_id}") - //runtimeOnly("curse.maven:worldedit-225608:${worldedit_id}") + runtimeOnly("curse.maven:worldedit-225608:${worldedit_id}") runtimeOnly("me.shedaniel.cloth:cloth-config-neoforge:${cloth_config_version}") implementation("io.wispforest:condensed_creative-neoforge:${condensed_creative_version}") From 440b7fff2bab5c40d3627c5613a1873d61845652 Mon Sep 17 00:00:00 2001 From: GearShocky Date: Tue, 4 Mar 2025 06:18:01 +0500 Subject: [PATCH 02/29] Falling sun --- .../mc/otm/datagen/lang/English.kt | 6 + .../mc/otm/datagen/lang/Russian.kt | 6 + .../dbotthepony/mc/otm/config/ToolsConfig.kt | 2 + .../mc/otm/item/weapon/FallingSunItem.kt | 232 +++++++++++++++++ .../ru/dbotthepony/mc/otm/registry/MNames.kt | 1 + .../dbotthepony/mc/otm/registry/MRegistry.kt | 9 + .../mc/otm/registry/game/MItems.kt | 2 + .../models/item/falling_sun.json | 22 ++ .../models/item/falling_sun_inventory.json | 6 + .../models/item/falling_sun_powered.json | 241 ++++++++++++++++++ .../models/item/falling_sun_unpowered.json | 200 +++++++++++++++ .../textures/item/falling_sun.png | Bin 0 -> 691 bytes .../textures/item/falling_sun_charge.png | Bin 0 -> 2546 bytes .../item/falling_sun_charge.png.mcmeta | 1 + .../textures/item/falling_sun_icon.png | Bin 0 -> 547 bytes .../weapon_attributes/falling_sun.json | 40 +++ 16 files changed, 768 insertions(+) create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/FallingSunItem.kt create mode 100644 src/main/resources/assets/overdrive_that_matters/models/item/falling_sun.json create mode 100644 src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_inventory.json create mode 100644 src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_powered.json create mode 100644 src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_unpowered.json create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun_charge.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun_charge.png.mcmeta create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun_icon.png create mode 100644 src/main/resources/data/overdrive_that_matters/weapon_attributes/falling_sun.json 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 47a522393..35455c300 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 @@ -859,6 +859,12 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.ENERGY_SWORD, "desc3", "Always strikes surrounding enemies with full damage if empowered") add(MItems.ENERGY_SWORD, "desc4", "Does not benefit from Sweeping Edge enchantment") + add(MItems.FALLING_SUN, "◄ Falling Sun ►") + add(MItems.FALLING_SUN, "desc", "Prototype weapon, needs power to operate") + add(MItems.FALLING_SUN, "desc2", "Deals extra damage to androids when empowered") + add(MItems.FALLING_SUN, "desc3", "Always strikes surrounding enemies with full damage if empowered") + add(MItems.FALLING_SUN, "desc4", "Does not benefit from Sweeping Edge enchantment") + add(MItems.PORTABLE_CONDENSATION_DRIVE, "Portable Condensation Drive") add(MItems.PORTABLE_DENSE_CONDENSATION_DRIVE, "Portable Dense Condensation Drive") add(MItems.TRITANIUM_ORE_CLUMP, "Raw Tritanium") 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 fd30292c9..f0bb29256 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 @@ -852,6 +852,12 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.ENERGY_SWORD, "desc3", "Всегда наносит полный урон по площади если имеет заряд") add(MItems.ENERGY_SWORD, "desc4", "Зачарование 'Разящий клинок' не имеет никакого эффекта на данном оружии") + add(MItems.FALLING_SUN, "◄ Падающее Солнце ►") + add(MItems.FALLING_SUN, "desc", "Прототип,требует энергию для работы") + add(MItems.FALLING_SUN, "desc2", "Наносит дополнительный урон андроидам если имеет заряд") + add(MItems.FALLING_SUN, "desc3", "Всегда наносит полный урон по площади если имеет заряд") + add(MItems.FALLING_SUN, "desc4", "Зачарование 'Разящий клинок' не имеет никакого эффекта на данном оружии") + add(MItems.PORTABLE_CONDENSATION_DRIVE, "Portable Condensation Drive") add(MItems.PORTABLE_DENSE_CONDENSATION_DRIVE, "Portable Dense Condensation Drive") add(MItems.TRITANIUM_ORE_CLUMP, "Рудный тритан") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/config/ToolsConfig.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/config/ToolsConfig.kt index f6aadb631..81039877d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/config/ToolsConfig.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/config/ToolsConfig.kt @@ -1,12 +1,14 @@ package ru.dbotthepony.mc.otm.config import ru.dbotthepony.mc.otm.item.weapon.EnergySwordItem +import ru.dbotthepony.mc.otm.item.weapon.FallingSunItem object ToolsConfig : AbstractConfig("tools") { val AXES_BREAK_LEAVES_INSTANTLY: Boolean by builder.define("AXES_BREAK_LEAVES_INSTANTLY", true) init { EnergySwordItem.registerConfig(builder) + FallingSunItem.registerConfig(builder) } object ExplosiveHammer { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/FallingSunItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/FallingSunItem.kt new file mode 100644 index 000000000..b9275fdff --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/FallingSunItem.kt @@ -0,0 +1,232 @@ +package ru.dbotthepony.mc.otm.item.weapon + +import net.minecraft.core.BlockPos +import net.minecraft.core.component.DataComponents +import net.minecraft.tags.BlockTags +import net.minecraft.world.entity.EquipmentSlotGroup +import net.minecraft.world.entity.LivingEntity +import net.minecraft.world.entity.ai.attributes.AttributeModifier +import net.minecraft.world.entity.ai.attributes.Attributes +import net.minecraft.world.entity.player.Player +import net.minecraft.world.item.ItemStack +import net.minecraft.world.item.Rarity +import net.minecraft.world.item.component.ItemAttributeModifiers +import net.minecraft.world.level.Level +import net.minecraft.world.level.block.Blocks +import net.minecraft.world.level.block.state.BlockState +import net.neoforged.neoforge.capabilities.Capabilities +import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent +import net.neoforged.neoforge.common.ItemAbilities +import net.neoforged.neoforge.common.ItemAbility +import net.neoforged.neoforge.common.ModConfigSpec +import ru.dbotthepony.mc.otm.OverdriveThatMatters +import ru.dbotthepony.mc.otm.capability.MatteryCapability +import ru.dbotthepony.mc.otm.capability.energy.EnergyConsumerItem +import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact +import ru.dbotthepony.mc.otm.capability.energy.getBarColor +import ru.dbotthepony.mc.otm.capability.energy.getBarWidth +import ru.dbotthepony.mc.otm.capability.matteryEnergy +import ru.dbotthepony.mc.otm.capability.matteryPlayer +import ru.dbotthepony.mc.otm.core.ResourceLocation +import ru.dbotthepony.mc.otm.core.damageType +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.core.math.DecimalConfigValue +import ru.dbotthepony.mc.otm.core.math.defineDecimal +import ru.dbotthepony.mc.otm.core.math.nextVariance +import ru.dbotthepony.mc.otm.core.otmRandom +import ru.dbotthepony.mc.otm.core.util.WriteOnce +import ru.dbotthepony.mc.otm.item.MatteryItem +import ru.dbotthepony.mc.otm.item.addSimpleDescription +import ru.dbotthepony.mc.otm.registry.CapabilitiesRegisterListener +import ru.dbotthepony.mc.otm.registry.MDamageTypes +import ru.dbotthepony.mc.otm.registry.MatteryDamageSource + +class FallingSunItem : MatteryItem(Properties().stacksTo(1).rarity(Rarity.EPIC)), CapabilitiesRegisterListener { + private val chargedAttributes: ItemAttributeModifiers + private val dischargedAttributes: ItemAttributeModifiers + + init { + var builder = ItemAttributeModifiers.builder() + + builder.add(Attributes.ATTACK_DAMAGE, AttributeModifier(BASE_ATTACK_DAMAGE_ID, 13.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.2, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + builder.add(Attributes.SWEEPING_DAMAGE_RATIO, AttributeModifier(ResourceLocation(OverdriveThatMatters.MOD_ID, "energy_sword_sweeping_edge"), 1.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + + chargedAttributes = builder.build() + builder = ItemAttributeModifiers.builder() + + builder.add(Attributes.ATTACK_DAMAGE, AttributeModifier(BASE_ATTACK_DAMAGE_ID, 5.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.2, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + dischargedAttributes = builder.build() + } + + override fun isEnchantable(p_41456_: ItemStack): Boolean { + return p_41456_.count == 1 + } + + override fun getEnchantmentValue(stack: ItemStack): Int { + return 12 + } + + override fun getDestroySpeed(itemStack: ItemStack, blockState: BlockState): Float { + val energy = itemStack.getCapability(MatteryCapability.ITEM_ENERGY) ?: return 1f + + if (blockState.`is`(Blocks.COBWEB)) { + return if (energy.batteryLevel < COBWEB_POWER_COST) 2f else 25f + } else if (blockState.`is`(BlockTags.SWORD_EFFICIENT)) { + return if (energy.batteryLevel < PLANT_POWER_COST) 1.5f else 8f + } else { + return 1f + } + } + + override fun canAttackBlock(p_41441_: BlockState, p_41442_: Level, p_41443_: BlockPos, p_41444_: Player): Boolean { + return !p_41444_.isCreative + } + + override fun hurtEnemy(itemStack: ItemStack, victim: LivingEntity, attacker: LivingEntity): Boolean { + if (attacker is Player && attacker.isCreative) { + victim.matteryPlayer?.let { + if (it.isAndroid) { + victim.invulnerableTime = 0 + victim.hurt(MatteryDamageSource(attacker.level().registryAccess().damageType(MDamageTypes.EMP), attacker, itemStack), 8f) + } + } + + return true + } + + itemStack.getCapability(MatteryCapability.ITEM_ENERGY)?.let { + if (it.extractEnergyExact(ENERGY_PER_SWING, false)) { + it.extractEnergy(attacker.level().otmRandom.nextVariance(ENERGY_PER_SWING_VARIANCE), false) + victim.matteryPlayer?.let { + if (it.isAndroid && it.androidEnergy.extractEnergyExact(ENERGY_ZAP, false)) { + it.androidEnergy.extractEnergy(attacker.level().otmRandom.nextVariance(ENERGY_ZAP_VARIANCE), false) + victim.hurt(MatteryDamageSource(attacker.level().registryAccess().damageType(MDamageTypes.EMP), attacker, itemStack), 8f) + } + } + } + } + + return true + } + + override fun isBarVisible(p_150899_: ItemStack): Boolean { + return p_150899_.matteryEnergy != null + } + + override fun getBarWidth(p_150900_: ItemStack): Int { + return p_150900_.matteryEnergy?.getBarWidth() ?: super.getBarWidth(p_150900_) + } + + override fun getBarColor(p_150901_: ItemStack): Int { + return p_150901_.matteryEnergy?.getBarColor() ?: super.getBarColor(p_150901_) + } + + init { + tooltips.itemEnergy() + + addSimpleDescription() + addSimpleDescription("2") + addSimpleDescription("3") + addSimpleDescription("4") + } + + override fun mineBlock( + itemStack: ItemStack, + p_41417_: Level, + blockState: BlockState, + p_41419_: BlockPos, + user: LivingEntity + ): Boolean { + if (blockState.getDestroySpeed(p_41417_, p_41419_) > 0f && (user !is Player || !user.isCreative)) { + val energy = itemStack.matteryEnergy + + if (blockState.`is`(BlockTags.SWORD_EFFICIENT)) { + if (energy?.extractEnergyExact(PLANT_POWER_COST, false) == true) + energy.extractEnergyExact(user.level().otmRandom.nextVariance(PLANT_POWER_COST_VARIANCE), false) + } + + if (blockState.`is`(Blocks.COBWEB)) { + if (energy?.extractEnergyExact(COBWEB_POWER_COST, false) == true) + energy.extractEnergyExact(user.level().otmRandom.nextVariance(COBWEB_POWER_COST_VARIANCE), false) + } + } + + return true + } + + override fun isCorrectToolForDrops(stack: ItemStack, state: BlockState): Boolean { + val energy = stack.matteryEnergy ?: return super.isCorrectToolForDrops(stack, state) + + if (state.`is`(BlockTags.SWORD_EFFICIENT) && energy.batteryLevel >= PLANT_POWER_COST) + return true + else if (state.`is`(Blocks.COBWEB) && energy.batteryLevel >= COBWEB_POWER_COST) + return true + + return super.isCorrectToolForDrops(stack, state) + } + + private fun cap(stack: ItemStack) = EnergyConsumerItem(stack, MAX_ENERGY) + + override fun registerCapabilities(event: RegisterCapabilitiesEvent) { + event.registerItem(MatteryCapability.ITEM_ENERGY, { o, _ -> cap(o) }, this) + event.registerItem(Capabilities.EnergyStorage.ITEM, { o, _ -> cap(o) }, this) + } + + override fun getDefaultAttributeModifiers(stack: ItemStack): ItemAttributeModifiers { + val energy = cap(stack) + + if (energy.batteryLevel >= ENERGY_PER_SWING) { + return chargedAttributes + } + + return dischargedAttributes + } + + override fun canPerformAction(stack: ItemStack, toolAction: ItemAbility): Boolean { + if (cap(stack).extractEnergyExact(ENERGY_PER_SWING, true)) { + return ItemAbilities.DEFAULT_SWORD_ACTIONS.contains(toolAction) + } + + return false + } + + companion object { + val MAX_ENERGY get() = _MAX_ENERGY.get() + val ENERGY_ZAP get() = _ENERGY_ZAP.get() + val ENERGY_ZAP_VARIANCE get() = _ENERGY_ZAP_VARIANCE.get() + val ENERGY_PER_SWING get() = _ENERGY_PER_SWING.get() + val ENERGY_PER_SWING_VARIANCE get() = _ENERGY_PER_SWING_VARIANCE.get() + val COBWEB_POWER_COST get() = _COBWEB_POWER_COST.get() + val COBWEB_POWER_COST_VARIANCE get() = _COBWEB_POWER_COST_VARIANCE.get() + val PLANT_POWER_COST get() = _PLANT_POWER_COST.get() + val PLANT_POWER_COST_VARIANCE get() = _PLANT_POWER_COST_VARIANCE.get() + + private var _MAX_ENERGY: DecimalConfigValue by WriteOnce() + private var _ENERGY_ZAP: DecimalConfigValue by WriteOnce() + private var _ENERGY_ZAP_VARIANCE: DecimalConfigValue by WriteOnce() + private var _ENERGY_PER_SWING: DecimalConfigValue by WriteOnce() + private var _ENERGY_PER_SWING_VARIANCE: DecimalConfigValue by WriteOnce() + private var _COBWEB_POWER_COST: DecimalConfigValue by WriteOnce() + private var _COBWEB_POWER_COST_VARIANCE: DecimalConfigValue by WriteOnce() + private var _PLANT_POWER_COST: DecimalConfigValue by WriteOnce() + private var _PLANT_POWER_COST_VARIANCE: DecimalConfigValue by WriteOnce() + + fun registerConfig(builder: ModConfigSpec.Builder) { + builder.comment("Falling Sun values").push("FallingSun") + + _MAX_ENERGY = builder.defineDecimal("MAX_ENERGY", Decimal(3_500_000), Decimal.ZERO) + _ENERGY_ZAP = builder.comment("Extra energy required when hitting androids").defineDecimal("ENERGY_ZAP", Decimal(4_000), Decimal.ZERO) + _ENERGY_ZAP_VARIANCE = builder.comment("Random deviation from ENERGY_ZAP").defineDecimal("ENERGY_ZAP_VARIANCE", Decimal(1200), Decimal.ZERO) + _ENERGY_PER_SWING = builder.defineDecimal("ENERGY_PER_SWING", Decimal(3_000), Decimal.ZERO) + _ENERGY_PER_SWING_VARIANCE = builder.comment("Random deviation from ENERGY_PER_SWING").defineDecimal("ENERGY_PER_SWING_VARIANCE", Decimal(600), Decimal.ZERO) + _COBWEB_POWER_COST = builder.defineDecimal("COBWEB_POWER_COST", Decimal(2_500), Decimal.ZERO) + _COBWEB_POWER_COST_VARIANCE = builder.comment("Random deviation from COBWEB_POWER_COST").defineDecimal("COBWEB_POWER_COST_VARIANCE", Decimal(500), Decimal.ZERO) + _PLANT_POWER_COST = builder.defineDecimal("PLANT_POWER_COST", Decimal(500), Decimal.ZERO) + _PLANT_POWER_COST_VARIANCE = builder.comment("Random deviation from PLANT_POWER_COST").defineDecimal("PLANT_POWER_COST_VARIANCE", Decimal(100), Decimal.ZERO) + + builder.pop() + } + } +} 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 a3612f1f0..a283cc490 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt @@ -194,6 +194,7 @@ object MNames { const val TRITANIUM_SHIELD = "tritanium_shield" const val ENERGY_SWORD = "energy_sword" + const val FALLING_SUN = "falling_sun" const val PLASMA_RIFLE = "plasma_rifle" diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt index cd58f1a2d..b0a70f9d3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt @@ -42,6 +42,7 @@ import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.isClient import ru.dbotthepony.mc.otm.item.armor.TritaniumArmorItem import ru.dbotthepony.mc.otm.item.weapon.EnergySwordItem +import ru.dbotthepony.mc.otm.item.weapon.FallingSunItem import ru.dbotthepony.mc.otm.registry.game.MItems import ru.dbotthepony.mc.otm.registry.game.MStats import ru.dbotthepony.mc.otm.registry.objects.ColoredDecorativeBlock @@ -284,6 +285,14 @@ object MRegistry : IBlockItemRegistryAcceptor { } } + ItemProperties.register(MItems.FALLING_SUN, ResourceLocation(OverdriveThatMatters.MOD_ID, "is_powered")) { stack, _, _, _ -> + if ((stack.matteryEnergy?.batteryLevel ?: Decimal.ZERO) >= FallingSunItem.ENERGY_PER_SWING) { + 1f + } else { + 0f + } + } + ItemProperties.register(MItems.EXPLOSIVE_HAMMER, ResourceLocation(OverdriveThatMatters.MOD_ID, "is_primed")) { stack, level, entity, _ -> if (MItems.EXPLOSIVE_HAMMER.isPrimed(stack) || entity == null) { 1f diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt index 82de7fba6..fd87871a6 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt @@ -72,6 +72,7 @@ import ru.dbotthepony.mc.otm.item.tool.ExplosiveHammerItem import ru.dbotthepony.mc.otm.item.tool.MatteryAxeItem import ru.dbotthepony.mc.otm.item.tool.RedstoneInteractorItem import ru.dbotthepony.mc.otm.item.weapon.EnergySwordItem +import ru.dbotthepony.mc.otm.item.weapon.FallingSunItem import ru.dbotthepony.mc.otm.item.weapon.WitheredSteelSwordItem import ru.dbotthepony.mc.otm.registry.MDeferredRegister import ru.dbotthepony.mc.otm.registry.MItemTags @@ -407,6 +408,7 @@ object MItems { val EXPLOSIVE_HAMMER: ExplosiveHammerItem by registry.register("explosive_hammer") { ExplosiveHammerItem() } val ENERGY_SWORD: Item by registry.register(MNames.ENERGY_SWORD) { EnergySwordItem() } + val FALLING_SUN: Item by registry.register(MNames.FALLING_SUN) { FallingSunItem() } val WITHERED_STEEL_SWORD: Item by registry.register(MNames.WITHERED_STEEL_SWORD) { WitheredSteelSwordItem(Item.Properties().durability(420)) } diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun.json b/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun.json new file mode 100644 index 000000000..cf79584ea --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun.json @@ -0,0 +1,22 @@ +{ + "loader": "neoforge:separate_transforms", + "gui_light": "front", + "base": + { + "parent": "overdrive_that_matters:item/falling_sun_unpowered" + }, + "perspectives": { + "gui": { + "parent": "overdrive_that_matters:item/falling_sun_inventory" + }, + "fixed": { + "parent": "overdrive_that_matters:item/falling_sun_inventory" + }, + "ground": { + "parent": "overdrive_that_matters:item/falling_sun_inventory" + } + }, + "overrides": [ + { "predicate": { "overdrive_that_matters:is_powered": 1.0 }, "model": "overdrive_that_matters:item/falling_sun_powered" } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_inventory.json b/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_inventory.json new file mode 100644 index 000000000..4a768a3b1 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_inventory.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "overdrive_that_matters:item/falling_sun_icon" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_powered.json b/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_powered.json new file mode 100644 index 000000000..58eb91a45 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_powered.json @@ -0,0 +1,241 @@ +{ + "loader": "neoforge:separate_transforms", + "gui_light": "front", + "base": + { + "texture_size": [32, 32], + "textures": { + "0": "overdrive_that_matters:item/falling_sun", + "1": "overdrive_that_matters:item/falling_sun_charge", + "particle": "overdrive_that_matters:item/falling_sun" + }, + "elements": [ + { + "name": "frame", + "from": [7.999, 8, 9.6], + "to": [8.002, 22, 11.6], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 11, 10.6]}, + "faces": { + "east": {"uv": [11.5, 0, 10.5, 7], "texture": "#0"}, + "west": {"uv": [10.5, 0, 11.5, 7], "texture": "#0"} + } + }, + { + "name": "frame", + "from": [8, 22, 9.6], + "to": [8, 29, 11.6], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 22, 9.6]}, + "faces": { + "east": {"uv": [12.5, 0, 11.5, 3.5], "texture": "#0"}, + "west": {"uv": [11.5, 0, 12.5, 3.5], "texture": "#0"} + } + }, + { + "name": "cap", + "from": [7.4, 6, 7.6], + "to": [8.6, 11, 9.6], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, 7, 7.6]}, + "faces": { + "north": {"uv": [7.5, 4, 8, 6.5], "texture": "#0"}, + "east": {"uv": [9, 4, 8, 6.5], "texture": "#0"}, + "south": {"uv": [9, 4, 9.5, 6.5], "texture": "#0"}, + "west": {"uv": [8, 4, 9, 6.5], "texture": "#0"}, + "up": {"uv": [8, 3.5, 9, 4], "rotation": 90, "texture": "#0"} + } + }, + { + "name": "handle", + "from": [7, -5, 4], + "to": [9, -4, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7, -5, 7]}, + "faces": { + "north": {"uv": [8, 10, 9, 10.5], "texture": "#0"}, + "east": {"uv": [7.5, 7, 8, 10], "rotation": 270, "texture": "#0"}, + "south": {"uv": [8, 6.5, 9, 7], "texture": "#0"}, + "west": {"uv": [7.5, 7, 8, 10], "rotation": 90, "texture": "#0"}, + "up": {"uv": [8, 7, 9, 10], "rotation": 180, "texture": "#0"}, + "down": {"uv": [9, 7, 10, 10], "texture": "#0"} + } + }, + { + "name": "handle", + "from": [8, -4, 4.6], + "to": [8, 3, 7.6], + "rotation": {"angle": 0, "axis": "y", "origin": [6, -3, 5.6]}, + "faces": { + "east": {"uv": [9, 0, 10.5, 3.5], "texture": "#0"}, + "west": {"uv": [10.5, 0, 9, 3.5], "texture": "#0"} + } + }, + { + "name": "handle", + "from": [7.5, -4, 7.2], + "to": [8.5, 3, 9.2], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, -3, 7.2]}, + "faces": { + "north": {"uv": [7, 0, 7.5, 3.5], "texture": "#0"}, + "east": {"uv": [8.5, 0, 7.5, 3.5], "texture": "#0"}, + "south": {"uv": [8.5, 0, 9, 3.5], "texture": "#0"}, + "west": {"uv": [7.5, 0, 8.5, 3.5], "texture": "#0"} + } + }, + { + "name": "guard", + "from": [6.5, 5, 4], + "to": [9.5, 6, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 5, 7]}, + "faces": { + "north": {"uv": [4, 8, 5.5, 8.5], "texture": "#0"}, + "east": {"uv": [3.5, 5, 4, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [4, 4.5, 5.5, 5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [5.5, 5, 6, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [4, 5, 5.5, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [6, 5, 7.5, 8], "texture": "#0"} + } + }, + { + "name": "guard", + "from": [6.5, 3, 4], + "to": [9.5, 4, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 3, 7]}, + "faces": { + "north": {"uv": [4, 8, 5.5, 8.5], "texture": "#0"}, + "east": {"uv": [3.5, 5, 4, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [4, 4.5, 5.5, 5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [5.5, 5, 6, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [4, 5, 5.5, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [6, 5, 7.5, 8], "texture": "#0"} + } + }, + { + "name": "blade", + "from": [7.5, 4, 4.5], + "to": [8.5, 22, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 6, 5.5]}, + "faces": { + "north": {"uv": [0, 0.5, 0.5, 9.5], "texture": "#0"}, + "east": {"uv": [3, 0.5, 0.5, 9.5], "texture": "#0"}, + "south": {"uv": [3, 0.5, 3.5, 9.5], "texture": "#0"}, + "west": {"uv": [0.5, 0.5, 3, 9.5], "texture": "#0"}, + "up": {"uv": [0.5, 0, 3, 0.5], "rotation": 90, "texture": "#0"} + } + }, + { + "name": "blade", + "from": [7.501, 22.001, 4.501], + "to": [8.499, 29.999, 9.499], + "rotation": {"angle": 22.5, "axis": "x", "origin": [7.5, 22, 4.5]}, + "faces": { + "north": {"uv": [3.5, 0.5, 4, 4.5], "texture": "#0"}, + "east": {"uv": [6.5, 0.5, 4, 4.5], "texture": "#0"}, + "south": {"uv": [6.5, 0.5, 7, 4.5], "texture": "#0"}, + "west": {"uv": [4, 0.5, 6.5, 4.5], "texture": "#0"}, + "up": {"uv": [4, 0, 6.5, 0.5], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [7.501, 26.801, 8.601], + "to": [8.499, 25.799, 9.699], + "rotation": {"angle": 22.5, "axis": "x", "origin": [7.5, 26.8, 8.6]}, + "faces": { + "north": {"uv": [4.5, 1.5, 5, 2], "texture": "#0"}, + "south": {"uv": [5.5, 1.5, 6, 2], "texture": "#0"}, + "up": {"uv": [5, 2, 5.5, 2.5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [5, 1, 5.5, 1.5], "texture": "#0"} + } + }, + { + "name": "charge", + "from": [7.6, 6, 3.8], + "to": [8.4, 22, 10.2], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, 12, 4]}, + "faces": { + "north": {"uv": [4, 4, 4.5, 12], "texture": "#1"}, + "east": {"uv": [1, 4, 4, 12], "texture": "#1"}, + "south": {"uv": [7.5, 4, 8, 12], "texture": "#1"}, + "west": {"uv": [4.5, 4, 7.5, 12], "texture": "#1"} + } + }, + { + "name": "charge", + "from": [7.6, 21.9, 3.8], + "to": [8.4, 30.8, 10.2], + "rotation": {"angle": 22.5, "axis": "x", "origin": [6.5, 22, 4]}, + "faces": { + "north": {"uv": [4, 2.5, 4.5, 5], "texture": "#1"}, + "east": {"uv": [1, 2.5, 4, 5], "texture": "#1"}, + "south": {"uv": [7.5, 2.5, 8, 5], "texture": "#1"}, + "west": {"uv": [4.5, 2.5, 7.5, 5], "texture": "#1"}, + "up": {"uv": [3.5, 0.5, 6, 1], "rotation": 90, "texture": "#1"} + } + }, + { + "name": "battery", + "from": [7.5, 7, 9.6], + "to": [8.5, 8, 11.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [7.5, 7, 9.6]}, + "faces": { + "east": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 270, "texture": "#0"}, + "south": {"uv": [12.5, 0, 13, 0.5], "texture": "#0"}, + "west": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [12.5, 0.5, 13, 1.5], "texture": "#0"} + } + }, + { + "name": "battery", + "from": [7.5, 9, 9.6], + "to": [8.5, 10, 11.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [7.5, 9, 9.6]}, + "faces": { + "east": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 270, "texture": "#0"}, + "south": {"uv": [12.5, 0, 13, 0.5], "texture": "#0"}, + "west": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [12.5, 0.5, 13, 1.5], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [0, 5.75, 1.25] + }, + "thirdperson_lefthand": { + "translation": [0, 5.75, 1.25] + }, + "firstperson_righthand": { + "rotation": [-35, 0, 0], + "translation": [1.5, 1.5, -3.5] + }, + "firstperson_lefthand": { + "rotation": [-35, 0, 0], + "translation": [1.5, 0, -3.5] + }, + "ground": { + "rotation": [-60, 0, 0], + "translation": [0, 2, 0], + "scale": [0.5, 0.5, 0.5] + }, + "gui": { + "rotation": [0, 90, 0], + "translation": [0, -1.5, 0], + "scale": [0.5, 0.5, 0.5] + }, + "head": { + "rotation": [-127, 0, 0], + "translation": [0, 12.25, 0] + } + } + }, + "perspectives": { + "gui": { + "parent": "overdrive_that_matters:item/falling_sun_inventory" + }, + "fixed": { + "parent": "overdrive_that_matters:item/falling_sun_inventory" + }, + "ground": { + "parent": "overdrive_that_matters:item/falling_sun_inventory" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_unpowered.json b/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_unpowered.json new file mode 100644 index 000000000..e31c94612 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/item/falling_sun_unpowered.json @@ -0,0 +1,200 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [32, 32], + "textures": { + "0": "overdrive_that_matters:item/falling_sun", + "particle": "overdrive_that_matters:item/falling_sun" + }, + "elements": [ + { + "name": "frame", + "from": [7.999, 8, 9.6], + "to": [8.002, 22, 11.6], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 11, 10.6]}, + "faces": { + "east": {"uv": [11.5, 0, 10.5, 7], "texture": "#0"}, + "west": {"uv": [10.5, 0, 11.5, 7], "texture": "#0"} + } + }, + { + "name": "frame", + "from": [8, 22, 9.6], + "to": [8, 29, 11.6], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 22, 9.6]}, + "faces": { + "east": {"uv": [12.5, 0, 11.5, 3.5], "texture": "#0"}, + "west": {"uv": [11.5, 0, 12.5, 3.5], "texture": "#0"} + } + }, + { + "name": "cap", + "from": [7.4, 6, 7.6], + "to": [8.6, 11, 9.6], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, 7, 7.6]}, + "faces": { + "north": {"uv": [7.5, 4, 8, 6.5], "texture": "#0"}, + "east": {"uv": [9, 4, 8, 6.5], "texture": "#0"}, + "south": {"uv": [9, 4, 9.5, 6.5], "texture": "#0"}, + "west": {"uv": [8, 4, 9, 6.5], "texture": "#0"}, + "up": {"uv": [8, 3.5, 9, 4], "rotation": 90, "texture": "#0"} + } + }, + { + "name": "handle", + "from": [7, -5, 4], + "to": [9, -4, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7, -5, 7]}, + "faces": { + "north": {"uv": [8, 10, 9, 10.5], "texture": "#0"}, + "east": {"uv": [7.5, 7, 8, 10], "rotation": 270, "texture": "#0"}, + "south": {"uv": [8, 6.5, 9, 7], "texture": "#0"}, + "west": {"uv": [7.5, 7, 8, 10], "rotation": 90, "texture": "#0"}, + "up": {"uv": [8, 7, 9, 10], "rotation": 180, "texture": "#0"}, + "down": {"uv": [9, 7, 10, 10], "texture": "#0"} + } + }, + { + "name": "handle", + "from": [8, -4, 4.6], + "to": [8, 3, 7.6], + "rotation": {"angle": 0, "axis": "y", "origin": [6, -3, 5.6]}, + "faces": { + "east": {"uv": [9, 0, 10.5, 3.5], "texture": "#0"}, + "west": {"uv": [10.5, 0, 9, 3.5], "texture": "#0"} + } + }, + { + "name": "handle", + "from": [7.5, -4, 7.2], + "to": [8.5, 3, 9.2], + "rotation": {"angle": 0, "axis": "y", "origin": [6.5, -3, 7.2]}, + "faces": { + "north": {"uv": [7, 0, 7.5, 3.5], "texture": "#0"}, + "east": {"uv": [8.5, 0, 7.5, 3.5], "texture": "#0"}, + "south": {"uv": [8.5, 0, 9, 3.5], "texture": "#0"}, + "west": {"uv": [7.5, 0, 8.5, 3.5], "texture": "#0"} + } + }, + { + "name": "guard", + "from": [6.5, 5, 4], + "to": [9.5, 6, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 5, 7]}, + "faces": { + "north": {"uv": [4, 8, 5.5, 8.5], "texture": "#0"}, + "east": {"uv": [3.5, 5, 4, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [4, 4.5, 5.5, 5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [5.5, 5, 6, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [4, 5, 5.5, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [6, 5, 7.5, 8], "texture": "#0"} + } + }, + { + "name": "guard", + "from": [6.5, 3, 4], + "to": [9.5, 4, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 3, 7]}, + "faces": { + "north": {"uv": [4, 8, 5.5, 8.5], "texture": "#0"}, + "east": {"uv": [3.5, 5, 4, 8], "rotation": 270, "texture": "#0"}, + "south": {"uv": [4, 4.5, 5.5, 5], "rotation": 180, "texture": "#0"}, + "west": {"uv": [5.5, 5, 6, 8], "rotation": 90, "texture": "#0"}, + "up": {"uv": [4, 5, 5.5, 8], "rotation": 180, "texture": "#0"}, + "down": {"uv": [6, 5, 7.5, 8], "texture": "#0"} + } + }, + { + "name": "blade", + "from": [7.5, 4, 4.5], + "to": [8.5, 22, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [7.5, 6, 5.5]}, + "faces": { + "north": {"uv": [0, 0.5, 0.5, 9.5], "texture": "#0"}, + "east": {"uv": [3, 0.5, 0.5, 9.5], "texture": "#0"}, + "south": {"uv": [3, 0.5, 3.5, 9.5], "texture": "#0"}, + "west": {"uv": [0.5, 0.5, 3, 9.5], "texture": "#0"}, + "up": {"uv": [0.5, 0, 3, 0.5], "rotation": 90, "texture": "#0"} + } + }, + { + "name": "blade", + "from": [7.501, 22.001, 4.501], + "to": [8.499, 29.999, 9.499], + "rotation": {"angle": 22.5, "axis": "x", "origin": [7.5, 22, 4.5]}, + "faces": { + "north": {"uv": [3.5, 0.5, 4, 4.5], "texture": "#0"}, + "east": {"uv": [6.5, 0.5, 4, 4.5], "texture": "#0"}, + "south": {"uv": [6.5, 0.5, 7, 4.5], "texture": "#0"}, + "west": {"uv": [4, 0.5, 6.5, 4.5], "texture": "#0"}, + "up": {"uv": [4, 0, 6.5, 0.5], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [7.501, 26.801, 8.601], + "to": [8.499, 25.799, 9.699], + "rotation": {"angle": 22.5, "axis": "x", "origin": [7.5, 26.8, 8.6]}, + "faces": { + "north": {"uv": [4.5, 1.5, 5, 2], "texture": "#0"}, + "south": {"uv": [5.5, 1.5, 6, 2], "texture": "#0"}, + "up": {"uv": [5, 2, 5.5, 2.5], "rotation": 90, "texture": "#0"}, + "down": {"uv": [5, 1, 5.5, 1.5], "texture": "#0"} + } + }, + { + "name": "battery", + "from": [7.5, 6.5, 8.6], + "to": [8.5, 7.5, 10.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [7.5, 6.5, 8.6]}, + "faces": { + "east": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 270, "texture": "#0"}, + "south": {"uv": [12.5, 0, 13, 0.5], "texture": "#0"}, + "west": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [12.5, 0.5, 13, 1.5], "texture": "#0"} + } + }, + { + "name": "battery", + "from": [7.5, 8.5, 8.6], + "to": [8.5, 9.5, 10.6], + "rotation": {"angle": -22.5, "axis": "x", "origin": [7.5, 8.5, 8.6]}, + "faces": { + "east": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 270, "texture": "#0"}, + "south": {"uv": [12.5, 0, 13, 0.5], "texture": "#0"}, + "west": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [12.5, 0.5, 13, 1.5], "rotation": 180, "texture": "#0"}, + "down": {"uv": [12.5, 0.5, 13, 1.5], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [0, 5.75, 1.25] + }, + "thirdperson_lefthand": { + "translation": [0, 5.75, 1.25] + }, + "firstperson_righthand": { + "rotation": [-35, 0, 0], + "translation": [1.5, 1.5, -3.5] + }, + "firstperson_lefthand": { + "rotation": [-35, 0, 0], + "translation": [1.5, 0, -3.5] + }, + "ground": { + "rotation": [-60, 0, 0], + "translation": [0, 2, 0], + "scale": [0.5, 0.5, 0.5] + }, + "gui": { + "rotation": [0, 90, 0], + "translation": [0, -1.5, 0], + "scale": [0.5, 0.5, 0.5] + }, + "head": { + "rotation": [-127, 0, 0], + "translation": [0, 12.25, 0] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun.png b/src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun.png new file mode 100644 index 0000000000000000000000000000000000000000..5b17b37440da093130b53fd53bc3a40b2c2511ef GIT binary patch literal 691 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCikV0(?ST|NsAA6dIE3+AZW+?+uY63e03s9wjk+A{e0*I*~8(9}XOqv2@g8&oITqdx}AWI7%3#!Y|zyKt> zTw~w5-=YWK0GYo$T^vI!{NGOSEIVw#<80dgF+l6#-}g}y7D<`Es*Wv**3mirgGrH{ z({P!JP?4T%R`%L!TILhAmI?4INMN}7d)vzG@r^RUi~$@6w#l}8STF1spD^)&k5g-( zv#^xg8*zn4D^yif?%Za$ki-<&ZX7MZm1O2t!@h=jUTXoTO2$cj2KTFlek|<^Gx-zl zC}oNMaEoEEn58f`@_YaB&z-FQ54N)WS>Yth@crI(mbVSRHZaWjyS!yihscG`#)+&m z+?&4it$(bg#(IiD=irlhp5A;8+Pm%;`#LbZxaUwD^U&t|?SHd&s_kLSZdxC_pGo1* k(X9;cf3dgyt=kkPkEHTwydOzp2ty;Xo{JO{t1#o53|WRvCM$** zk3_ah8jq%tvUx{T>_(dqdE^!8y5F?@?!CYLf4}oPkN^43`Of*B$CpNRu~$S9PyhfZ zIy%_UAWQ@R7=V<8sHep-=OF}(rrBEoH9b3~Ax0+H@|Yz6)McSJ{XvMAk8+?#1Hd+k z6kw_(Cl(~c$JlzsxSa`#iS<7h2vGe)BV))ew(dk@vH{ufQ!}Cg(rF0vatv~G+zTKf z1_TH&5ONCuP7tVnrKMj(f+4=h;Sg;Ag98`{dqWVKD)U7i2GP><;XDkOLi`W^%_#s~ z@#Fv*NK@a?NFOHn%c|5PDEQ0L6^ND|IAj<8MU!^uAVhtA%RpaWdYftbz;giC>;eGD zVn-WG_c-78*N^6m9#FVcZfdf4;D_2rx$18S^zyLg1?6T3&k6Fq?l__w(<9^^_fU{xilY*)}&ABy^Ig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zx=8&4Rr`6A60ohleX%m*fyAvLHz!FM$qvQ4HYQ#La2?Lml~io7!cIh zL{yFZ$^CWP`>kN=BT6uXf?!^ibQv$*oSweJm;Zcc%<=zc{DT#CUS1NcE=;6n9;@9i P{c&-$b+M_j@=N{?umegr literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun_charge.png.mcmeta b/src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun_charge.png.mcmeta new file mode 100644 index 000000000..b14454b15 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun_charge.png.mcmeta @@ -0,0 +1 @@ +{ "animation": { "frametime": 1 } } \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun_icon.png b/src/main/resources/assets/overdrive_that_matters/textures/item/falling_sun_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b9e3bc6e77ed7cfdbdd47bf9578368f73e2926b1 GIT binary patch literal 547 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}Z0G|-oI5*e-|Nq~-c{9+~wkkR**~>G`!9iD7wJFdr?l_PVE(!7r2AY5d7&g`3;Q&f=7I;J!GcfQS1YyP< z6SLm}1tm&cBT9nv(@M${i&7Z^5;OBk^!!{y6ioFD^^AV+VcrH*vn@5kGtJXeiveT` zD}xjxD+42tjH>LQ-Ev`U;>)U1XdYjX#r$Gbr~8MfMl0z>|6I+ z^xzvHGtbk-F+?Lc_G~m?g94As#UO9puXq3IUvun`c-~!nnWgLgzQ%c_2~&hVn=q-K zoaNr&nqJGiv9nfBV`j?i4PqTjcTKspul4MM=dus4M$HnObJr(5=DPs5^&Ye98{W3> ocf0ZJv(-937K Date: Tue, 4 Mar 2025 14:15:04 +0300 Subject: [PATCH 03/29] =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3?= =?UTF-8?q?=D1=83=D1=80=D0=B0=D1=82=D0=BE=D1=80=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BF=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5=D0=BA=20#34?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/datagen/items/ItemModels.kt | 11 ++ .../mc/otm/datagen/lang/English.kt | 11 ++ .../mc/otm/datagen/lang/Russian.kt | 11 ++ .../mc/otm/block/entity/MatteryBlockEntity.kt | 15 +++ .../block/entity/MatteryDeviceBlockEntity.kt | 20 ++-- .../block/entity/MatteryWorkerBlockEntity.kt | 2 +- .../BlackHoleGeneratorBlockEntity.kt | 6 +- .../entity/decorative/HoloSignBlockEntity.kt | 14 +-- .../entity/decorative/PainterBlockEntity.kt | 2 +- .../entity/matter/MatterBottlerBlockEntity.kt | 4 +- .../entity/matter/MatterPanelBlockEntity.kt | 2 +- .../entity/storage/DriveRackBlockEntity.kt | 6 +- .../entity/storage/StorageBusBlockEntity.kt | 2 +- .../block/entity/storage/StorageInterfaces.kt | 2 +- .../entity/tech/EnergyCounterBlockEntity.kt | 2 +- .../mc/otm/item/ConfiguratorItem.kt | 111 ++++++++++++++++++ .../ru/dbotthepony/mc/otm/registry/MNames.kt | 1 + .../dbotthepony/mc/otm/registry/MRegistry.kt | 7 ++ .../mc/otm/registry/game/MCreativeTabs.kt | 1 + .../otm/registry/game/MDataComponentTypes.kt | 33 ++++++ .../mc/otm/registry/game/MItems.kt | 3 + .../ru/dbotthepony/mc/otm/server/Ext.kt | 9 ++ .../textures/item/configurator.png | Bin 0 -> 2677 bytes .../textures/item/configurator_ready.png | Bin 0 -> 2679 bytes 24 files changed, 244 insertions(+), 31 deletions(-) create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/item/ConfiguratorItem.kt create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/server/Ext.kt create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/configurator.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/configurator_ready.png diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt index f071a31a6..1c4bc7248 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt @@ -114,6 +114,17 @@ fun addItemModels(provider: MatteryItemModelProvider) { provider.handheld(MItems.CHEST_UPGRADER) + provider.exec { + val path = MItems.CONFIGURATOR.registryName!!.path + + val ready = provider.withExistingParent("${path}_ready", MatteryItemModelProvider.HANDHELD) + .texture("layer0", modLocation("item/${path}_ready")) + + provider.withExistingParent(path, MatteryItemModelProvider.HANDHELD) + .texture("layer0", modLocation("item/$path")) + .override().predicate(modLocation("has_configuration_saved"), 1f).model(ready).end() + } + provider.generated(MItems.BREAD_MONSTER_SPAWN_EGG, modLocation("item/egg/bread_monster")) provider.generated(MItems.LOADER_SPAWN_EGG, modLocation("item/egg/loader")) 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 35455c300..77f5db3cb 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 @@ -924,6 +924,12 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.CHEST_UPGRADER, "desc", "Replaces placed chests and barrels with cargo crates while keeping storage contents") add(MItems.CHEST_UPGRADER, "desc2", "Hold desired crates in the opposite hand") + add(MItems.CONFIGURATOR, "Configurator") + add(MItems.CONFIGURATOR, "desc", "Copies configuration from one block to another") + add(MItems.CONFIGURATOR, "desc2", "Sneak-use on block to copy, use to paste") + add(MItems.CONFIGURATOR, "desc3", "Use on air while sneaking to clear saved configuration") + add(MItems.CONFIGURATOR, "desc_saved", "Saved configuration for: %s") + add(MItems.BREAD_MONSTER_SPAWN_EGG, "Bread Monster Spawn Egg") add(MEntityTypes.BREAD_MONSTER, "Bread Monster") @@ -981,6 +987,11 @@ private fun gui(provider: MatteryLanguageProvider) { gui("flow_direction_set", "Flow direction set to %s") gui("tick_timer_set", "Timer set to %s ticks") + gui("config_copied", "Copied configuration for %s") + gui("config_pasted", "Applied saved configuration") + gui("config_cleared", "Configuration cleared") + gui("config_missing", "No configuration to apply") + gui("black_hole_generator.help0", "Generates energy using angular momentum of Singularities") gui("black_hole_generator.help1", "The stronger gravity Singularity has, the more power is generated!") gui("black_hole_generator.help2", "Using Spacetime Normalizers will reduce gravitation strength of Singularity, which will reduce power output.") 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 f0bb29256..48235c695 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 @@ -917,6 +917,12 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.CHEST_UPGRADER, "desc", "Заменяет установленные сундуки и бочки грузовыми ящиками с сохранением содержимого") add(MItems.CHEST_UPGRADER, "desc2", "Удерживайте необходимые ящики в противоположной руке") + add(MItems.CONFIGURATOR, "Конфигуратор") + add(MItems.CONFIGURATOR, "desc", "Копирует настройки между блоками") + add(MItems.CONFIGURATOR, "desc2", "Использование крадясь на блоке копирует настройки, простое использование применяет") + add(MItems.CONFIGURATOR, "desc3", "Используйте крадясь на воздухе для очистки") + add(MItems.CONFIGURATOR, "desc_saved", "Сохранены настройки для: %s") + add(MItems.BREAD_MONSTER_SPAWN_EGG, "Яйцо призыва хлебного монстра") add(MEntityTypes.BREAD_MONSTER, "Хлебный монстр") @@ -974,6 +980,11 @@ private fun gui(provider: MatteryLanguageProvider) { gui("flow_direction_set", "Направление потока установлено на %s") gui("tick_timer_set", "Таймер установлен на %s тиков") + gui("config_copied", "Скопированы настройки для %s") + gui("config_pasted", "Настройки применены") + gui("config_cleared", "Настройки очищены") + gui("config_missing", "Нет настроек для применения") + gui("black_hole_generator.help0", "Генерирует электричество используя угловое ускорение сингулярностей") gui("black_hole_generator.help1", "Чем сильнее гравитационное поле сингулярности, тем больше генерация!") gui("black_hole_generator.help2", "Использование стабилизаторов пространства-времени ослабляет гравитационное поле, снижая генерацию") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt index 40941bf09..ab8ad4363 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt @@ -96,6 +96,11 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc */ protected val savetablesLevel = Savetables() + /** + * Savetables for things configured from user input + */ + protected val savetablesConfig = Savetables() + /** * "shortcut" for getting [BlockRotation] * @@ -269,6 +274,7 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc */ open fun saveShared(nbt: CompoundTag, registry: Provider) { savetables.serializeNBT(nbt, registry) + saveConfiguration(nbt, registry) } /** @@ -282,6 +288,15 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc super.loadAdditional(nbt, registry) savetables.deserializeNBT(registry, nbt) savetablesLevel.deserializeNBT(registry, nbt) + loadConfiguration(nbt, registry) + } + + fun saveConfiguration(nbt: CompoundTag, registry: Provider) { + savetablesConfig.serializeNBT(nbt, registry) + } + + fun loadConfiguration(nbt: CompoundTag, registry: Provider) { + savetablesConfig.deserializeNBT(registry, nbt) } @Suppress("OVERRIDE_DEPRECATION") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryDeviceBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryDeviceBlockEntity.kt index 71085dd64..4580fcefe 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryDeviceBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryDeviceBlockEntity.kt @@ -56,7 +56,7 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo } init { - savetables.stateful(::redstoneControl, REDSTONE_CONTROL_KEY) + savetablesConfig.stateful(::redstoneControl, REDSTONE_CONTROL_KEY) } protected open val defaultDisplayName: Component @@ -146,9 +146,9 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo init { // https://tenor.com/view/simp-metal-gear-liquid-snake-running-gif-16717852 - savetables.enum(::flow, "fluid_${side}_flow", FlowDirection::valueOf) - savetables.bool(::automatePull, "fluid_${side}_pull") - savetables.bool(::automatePush, "fluid_${side}_push") + savetablesConfig.enum(::flow, "fluid_${side}_flow", FlowDirection::valueOf) + savetablesConfig.bool(::automatePull, "fluid_${side}_pull") + savetablesConfig.bool(::automatePush, "fluid_${side}_push") } var flow by syncher.enum(possibleModes, setter = { access, value -> @@ -375,9 +375,9 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo } init { - savetables.enum(::energyFlow, "energy_${side}_flow", FlowDirection::valueOf) - savetables.bool(::automatePull, "energy_${side}_pull") - savetables.bool(::automatePush, "energy_${side}_push") + savetablesConfig.enum(::energyFlow, "energy_${side}_flow", FlowDirection::valueOf) + savetablesConfig.bool(::automatePull, "energy_${side}_pull") + savetablesConfig.bool(::automatePush, "energy_${side}_push") dirtyListeners.addListener(Runnable { updateTickerState() @@ -626,9 +626,9 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo } init { - savetables.bool(::automatePull, "itemhandler_${side}_automatePull") - savetables.bool(::automatePush, "itemhandler_${side}_automatePush") - savetables.enum(::mode, "itemhandler_${side}_mode", ItemHandlerMode::valueOf) + savetablesConfig.bool(::automatePull, "itemhandler_${side}_automatePull") + savetablesConfig.bool(::automatePush, "itemhandler_${side}_automatePush") + savetablesConfig.enum(::mode, "itemhandler_${side}_mode", ItemHandlerMode::valueOf) waitForServerLevel { redstoneControl.addListener(::updateTickerState) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryWorkerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryWorkerBlockEntity.kt index 7b207ba54..4df7cc662 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryWorkerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryWorkerBlockEntity.kt @@ -73,7 +73,7 @@ abstract class MatteryWorkerBlockEntity( var balanceInputs = false init { - savetables.bool(::balanceInputs) + savetablesConfig.bool(::balanceInputs) } protected open fun jobUpdated(new: JobType?, old: JobType?, id: Int) {} diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/BlackHoleGeneratorBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/BlackHoleGeneratorBlockEntity.kt index 2c3ab16f5..84c9bba76 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/BlackHoleGeneratorBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/blackhole/BlackHoleGeneratorBlockEntity.kt @@ -118,9 +118,9 @@ class BlackHoleGeneratorBlockEntity(blockPos: BlockPos, blockState: BlockState) exposeSideless(MatteryCapability.BLOCK_ENERGY, energy) exposeSideless(Capabilities.EnergyStorage.BLOCK, energy) - savetables.enum(::mode, map = Mode::valueOf) - savetables.decimal(::injectionRate) - savetables.decimal(::targetMass) + savetablesConfig.enum(::mode, map = Mode::valueOf) + savetablesConfig.decimal(::injectionRate) + savetablesConfig.decimal(::targetMass) } private fun findBlackHoleRange(): Int { 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 index e6125efa4..02062bea9 100644 --- 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 @@ -64,16 +64,16 @@ class HoloSignBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryB var isLocked = false init { - savetables.string(::signText) + savetablesConfig.string(::signText) savetablesLevel.bool(::isLocked) - savetables.stateful(::redstoneControl) + savetablesConfig.stateful(::redstoneControl) - savetables.float(::textRed) - savetables.float(::textGreen) - savetables.float(::textBlue) - savetables.float(::textAlpha) + savetablesConfig.float(::textRed) + savetablesConfig.float(::textGreen) + savetablesConfig.float(::textBlue) + savetablesConfig.float(::textAlpha) - savetables.bool(::textAutoScale) + savetablesConfig.bool(::textAutoScale) } override fun createMenu(p_39954_: Int, p_39955_: Inventory, p_39956_: Player): AbstractContainerMenu { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/PainterBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/PainterBlockEntity.kt index 94311cead..59733f0ed 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/PainterBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/PainterBlockEntity.kt @@ -82,7 +82,7 @@ class PainterBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryDe init { addDroppableContainer(dyeInput) savetables.stateful(dyeInput, INVENTORY_KEY) - savetables.bool(::isBulk) + savetablesConfig.bool(::isBulk) exposeGlobally(Capabilities.FluidHandler.BLOCK, this) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt index 17aae98fe..dd474603b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt @@ -112,8 +112,8 @@ class MatterBottlerBlockEntity(blockPos: BlockPos, blockState: BlockState) : exposeGlobally(MatteryCapability.MATTER_BLOCK, matter) exposeGlobally(MatteryCapability.MATTER_NODE, matterNode) - savetables.bool(::isBottling) - savetables.bool(::spitItemsWhenCantWork) + savetablesConfig.bool(::isBottling) + savetablesConfig.bool(::spitItemsWhenCantWork) savetables.stateful(::energy, ENERGY_KEY) savetables.stateful(::matter, MATTER_STORAGE_KEY) savetables.stateful(::bottling) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterPanelBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterPanelBlockEntity.kt index 41490ae5b..8a5dc7ad7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterPanelBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterPanelBlockEntity.kt @@ -84,7 +84,7 @@ class MatterPanelBlockEntity(blockPos: BlockPos, blockState: BlockState) : Matte exposeGlobally(MatteryCapability.MATTER_NODE, matterNode) exposeGlobally(MatteryCapability.REPLICATION_TASK, this) - savetables.bool(::isProvidingTasks) + savetablesConfig.bool(::isProvidingTasks) } override fun setLevel(level: Level) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveRackBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveRackBlockEntity.kt index 66b0ca54a..877a2d08a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveRackBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/DriveRackBlockEntity.kt @@ -63,9 +63,9 @@ class DriveRackBlockEntity(blockPos: BlockPos, blockState: BlockState) : Mattery savetables.stateful(::energy, ENERGY_KEY) savetables.stateful(::container, INVENTORY_KEY) exposeGlobally(MatteryCapability.STORAGE_NODE, cell) - savetables.int(::insertPriority) - savetables.int(::extractPriority) - savetables.enum(::mode, map = FlowDirection::valueOf) + savetablesConfig.int(::insertPriority) + savetablesConfig.int(::extractPriority) + savetablesConfig.enum(::mode, map = FlowDirection::valueOf) redstoneControl.addListener(Consumer { cell.isDetached = it diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt index b5afdb850..9430419f0 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageBusBlockEntity.kt @@ -131,7 +131,7 @@ class StorageBusBlockEntity(blockPos: BlockPos, blockState: BlockState) : Matter } init { - savetables.codec(::filter, ItemFilter.CODEC, FILTER_KEY, Supplier { ItemFilter(MAX_FILTERS) }) + savetablesConfig.codec(::filter, ItemFilter.CODEC, FILTER_KEY, Supplier { ItemFilter(MAX_FILTERS) }) } override fun setLevel(level: Level) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageInterfaces.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageInterfaces.kt index 1a66a0424..17aa2e953 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageInterfaces.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/storage/StorageInterfaces.kt @@ -112,7 +112,7 @@ abstract class AbstractStorageImportExport( } init { - savetables.codec(::filter, ItemFilter.CODEC, FILTER_KEY, Supplier { ItemFilter(MAX_FILTERS) }) + savetablesConfig.codec(::filter, ItemFilter.CODEC, FILTER_KEY, Supplier { ItemFilter(MAX_FILTERS) }) } companion object { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/EnergyCounterBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/EnergyCounterBlockEntity.kt index dbe0da7a2..80b12d46f 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/EnergyCounterBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/tech/EnergyCounterBlockEntity.kt @@ -78,7 +78,7 @@ class EnergyCounterBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Mat } init { - savetables.int(::displayChartOnBlock) + savetablesConfig.int(::displayChartOnBlock) savetables.stateful(::history5s) savetables.stateful(::history15s) savetables.stateful(::history1m) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/ConfiguratorItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/ConfiguratorItem.kt new file mode 100644 index 000000000..b7799e9df --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/ConfiguratorItem.kt @@ -0,0 +1,111 @@ +package ru.dbotthepony.mc.otm.item + +import net.minecraft.nbt.CompoundTag +import net.minecraft.network.chat.Component +import net.minecraft.server.level.ServerPlayer +import net.minecraft.world.InteractionHand +import net.minecraft.world.InteractionResult +import net.minecraft.world.InteractionResultHolder +import net.minecraft.world.entity.player.Player +import net.minecraft.world.item.ItemStack +import net.minecraft.world.item.TooltipFlag +import net.minecraft.world.item.context.UseOnContext +import net.minecraft.world.level.Level +import net.minecraft.world.level.block.Blocks +import ru.dbotthepony.mc.otm.block.entity.MatteryBlockEntity +import ru.dbotthepony.mc.otm.core.TextComponent +import ru.dbotthepony.mc.otm.core.TranslatableComponent +import ru.dbotthepony.mc.otm.registry.game.MDataComponentTypes +import ru.dbotthepony.mc.otm.server.sendActionBarMessage + +class ConfiguratorItem : MatteryItem(Properties().stacksTo(1)) { + init { + addSimpleDescription() + addSimpleDescription("2") + addSimpleDescription("3") + } + + override fun appendHoverText( + stack: ItemStack, + context: TooltipContext, + components: MutableList, + tooltipType: TooltipFlag + ) { + super.appendHoverText(stack, context, components, tooltipType) + + val tag = getConfiguration(stack) + val block = stack.getOrDefault(MDataComponentTypes.Configurator.BLOCK, Blocks.AIR.defaultBlockState()) + if (!tag.isEmpty && !block.isAir) { + components.add(TranslatableComponent("$descriptionId.desc_saved", block.block.name)) + } + } + + override fun use(level: Level, player: Player, hand: InteractionHand): InteractionResultHolder { + if (player is ServerPlayer && player.isCrouching) { + val stack = player.getItemInHand(hand) + + setConfiguration(stack, CompoundTag()) + stack.set(MDataComponentTypes.Configurator.BLOCK, Blocks.AIR.defaultBlockState()) + + player.sendActionBarMessage(TranslatableComponent("otm.gui.config_cleared")) + + return InteractionResultHolder.success(stack) + } + + return super.use(level, player, hand) + } + + override fun onItemUseFirst(stack: ItemStack, context: UseOnContext): InteractionResult { + val player = context.player + if (player == null) return super.useOn(context) + + val level = context.level + + val tile = level.getBlockEntity(context.clickedPos) + if (tile == null || tile !is MatteryBlockEntity) return super.useOn(context) + + if (player.isCrouching == true) { + if (player is ServerPlayer) { + val tag = CompoundTag() + tile.saveConfiguration(tag, level.registryAccess()) + + if (tag.isEmpty) return super.onItemUseFirst(stack, context) + + setConfiguration(stack, tag) + + val block = level.getBlockState(context.clickedPos) + stack.set(MDataComponentTypes.Configurator.BLOCK, block) + + player.sendActionBarMessage(TranslatableComponent("otm.gui.config_copied", block.block.name)) + } + + return InteractionResult.SUCCESS + } + + val tag = getConfiguration(stack) + if (!tag.isEmpty) { + if (player is ServerPlayer) { + tile.loadConfiguration(tag, level.registryAccess()) + player.sendActionBarMessage(TranslatableComponent("otm.gui.config_pasted")) + } + + return InteractionResult.SUCCESS + } else { + if (player is ServerPlayer) { + player.sendActionBarMessage(TranslatableComponent("otm.gui.config_missing")) + } + + return InteractionResult.FAIL + } + + return super.useOn(context) + } + + fun getConfiguration(stack: ItemStack): CompoundTag { + return stack.getOrDefault(MDataComponentTypes.Configurator.CONFIGURATION, CompoundTag()) + } + + fun setConfiguration(stack: ItemStack, tag: CompoundTag) { + stack.set(MDataComponentTypes.Configurator.CONFIGURATION, tag) + } +} 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 a283cc490..6967c5d02 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt @@ -199,6 +199,7 @@ object MNames { const val PLASMA_RIFLE = "plasma_rifle" const val CHEST_UPGRADER = "chest_upgrader" + const val CONFIGURATOR = "configurator" const val WITHERED_STEEL_SWORD = "withered_steel_sword" diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt index b0a70f9d3..0cf69e5f3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt @@ -6,6 +6,7 @@ import net.minecraft.core.BlockPos import net.minecraft.core.cauldron.CauldronInteraction import net.minecraft.core.component.DataComponents import net.minecraft.core.registries.BuiltInRegistries +import net.minecraft.nbt.CompoundTag import net.minecraft.world.entity.EntityType import net.minecraft.world.item.DyeColor import net.minecraft.world.item.Item @@ -43,6 +44,7 @@ import ru.dbotthepony.mc.otm.isClient import ru.dbotthepony.mc.otm.item.armor.TritaniumArmorItem import ru.dbotthepony.mc.otm.item.weapon.EnergySwordItem import ru.dbotthepony.mc.otm.item.weapon.FallingSunItem +import ru.dbotthepony.mc.otm.registry.game.MDataComponentTypes import ru.dbotthepony.mc.otm.registry.game.MItems import ru.dbotthepony.mc.otm.registry.game.MStats import ru.dbotthepony.mc.otm.registry.objects.ColoredDecorativeBlock @@ -316,6 +318,11 @@ object MRegistry : IBlockItemRegistryAcceptor { } } } + + ItemProperties.register(MItems.CONFIGURATOR, ResourceLocation(OverdriveThatMatters.MOD_ID, "has_configuration_saved")) { stack, _, _, _ -> + val tag = stack.getOrDefault(MDataComponentTypes.Configurator.CONFIGURATION, CompoundTag()) + if (tag.isEmpty) 0f else 1f + } } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt index 3bea5d150..0d13a7607 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt @@ -263,6 +263,7 @@ private fun addMainCreativeTabItems(consumer: CreativeModeTab.Output) { accept(MItems.GRAVITATIONAL_DISRUPTOR) accept(MItems.CHEST_UPGRADER) + accept(MItems.CONFIGURATOR) accept(MItems.ESSENCE_SERVO) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MDataComponentTypes.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MDataComponentTypes.kt index 21d568866..1817fed3a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MDataComponentTypes.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MDataComponentTypes.kt @@ -5,9 +5,11 @@ import com.mojang.serialization.Codec import net.minecraft.core.UUIDUtil import net.minecraft.core.component.DataComponentType import net.minecraft.core.registries.BuiltInRegistries +import net.minecraft.nbt.CompoundTag import net.minecraft.network.RegistryFriendlyByteBuf import net.minecraft.network.codec.StreamCodec import net.minecraft.util.StringRepresentable +import net.minecraft.world.level.block.state.BlockState import net.neoforged.bus.api.IEventBus import net.neoforged.neoforge.fluids.SimpleFluidContent import ru.dbotthepony.mc.otm.capability.FlowDirection @@ -17,6 +19,7 @@ import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.data.codec.DecimalCodec import ru.dbotthepony.mc.otm.item.tool.RedstoneInteractorItem import ru.dbotthepony.mc.otm.network.StreamCodecs +import ru.dbotthepony.mc.otm.network.streamCodec import ru.dbotthepony.mc.otm.registry.MDeferredRegister import java.util.UUID @@ -34,6 +37,16 @@ object MDataComponentTypes { } } + private class CompoundTagComponent : DataComponentType { + override fun codec(): Codec { + return CompoundTag.CODEC + } + + override fun streamCodec(): StreamCodec { + return CompoundTag.CODEC.streamCodec() + } + } + val FLUID_STACK by registry.register("fluid_stack") { object : DataComponentType { override fun codec(): Codec { @@ -81,6 +94,26 @@ object MDataComponentTypes { } } + object Configurator { + val BLOCK: DataComponentType by registry.register("configurator_block") { + object : DataComponentType { + override fun codec(): Codec? { + return BlockState.CODEC + } + + override fun streamCodec(): StreamCodec { + return BlockState.CODEC.streamCodec() + } + + } + } + val CONFIGURATION: DataComponentType by registry.register("configurator_configuration") { CompoundTagComponent() } + } + + init { + Configurator + } + fun register(bus: IEventBus) { registry.register(bus) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt index fd87871a6..d9b809861 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt @@ -43,6 +43,7 @@ import ru.dbotthepony.mc.otm.core.collect.SupplierMap import ru.dbotthepony.mc.otm.core.math.Decimal import ru.dbotthepony.mc.otm.item.BatteryItem import ru.dbotthepony.mc.otm.item.ChestUpgraderItem +import ru.dbotthepony.mc.otm.item.ConfiguratorItem import ru.dbotthepony.mc.otm.item.CrudeBatteryItem import ru.dbotthepony.mc.otm.item.EssenceServoItem import ru.dbotthepony.mc.otm.item.FluidCapsuleItem @@ -674,6 +675,8 @@ object MItems { val ROFLITE_ALLOY_INGOT: Item by registry.register(MNames.ROFLITE_ALLOY_INGOT) { Item(DEFAULT_PROPERTIES) } val ROFLITE_ALLOY_BLOCK: BlockItem by registry.register(MNames.ROFLITE_ALLOY_BLOCK) { BlockItem(MBlocks.ROFLITE_ALLOY_BLOCK, DEFAULT_PROPERTIES) } + val CONFIGURATOR: Item by registry.register(MNames.CONFIGURATOR) { ConfiguratorItem() } + init { MRegistry.registerItems(registry) } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/server/Ext.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/server/Ext.kt new file mode 100644 index 000000000..31f82fd91 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/server/Ext.kt @@ -0,0 +1,9 @@ +package ru.dbotthepony.mc.otm.server + +import net.minecraft.network.chat.Component +import net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket +import net.minecraft.server.level.ServerPlayer + +fun ServerPlayer.sendActionBarMessage(component: Component) { + this.connection.send(ClientboundSetActionBarTextPacket(component)) +} diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/configurator.png b/src/main/resources/assets/overdrive_that_matters/textures/item/configurator.png new file mode 100644 index 0000000000000000000000000000000000000000..e9147615fb9f42120951dbb01165878e6f488f3f GIT binary patch literal 2677 zcmZ8jc{Cg77Ed%JikaxBYEcrYqH5pQ(x`oz5L;1dr_nx3Q%l7XgI0$|thJ4;YO9to zMT)AlXrrOFs??w*4HNqwdC{43-Z}4{bHDq$%Xjbn?)m<>=?-@0LdVY>2LJ#|K$G_1#n$i zU;v04siLN?0xbI{>rqACvVSrWx%h~9xOsVgM51(cxai+oswyf+-ZF{uc4tt}Gw#a~ zmPivP3v0tM%gn04DDaB9L9aeNy5?D3$KbS%7)Z2iCgIG-gc}HicQ238rOG%ELIj3@ z`{$jM)@lN1AqL9 z>nxqFaZz14ZxG3--8AN~ICooXO#S4mps(CRdlIqGr5^g>D#NXu6l_bspcgttp+HO_ zuqfp}rq6z%pXIe7I&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4UUtm^sRCkK@kKhS_f6WVOY`Z zqn~v-PfFwb0x&&5KxNE{q!S15xroh~2l(&46*pypUG{1u1fD1hq>W{Q1Et}{a<3 Date: Tue, 4 Mar 2025 15:00:12 +0300 Subject: [PATCH 04/29] =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=20=D1=8D=D0=BA=D1=80=D0=B0=D0=BD=20+=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=BA=D0=B0=20=D1=80=D0=B5=D1=86=D0=B5=D0=BF=D1=82=D0=BE?= =?UTF-8?q?=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GearShocky — Сегодня, в 14:35 сканер сингулярностей его кстати переделать нужно --- .../dbotthepony/mc/otm/datagen/lang/English.kt | 1 + .../dbotthepony/mc/otm/datagen/lang/Russian.kt | 1 + .../mc/otm/datagen/recipes/ComponentRecipes.kt | 6 ++++++ .../otm/datagen/recipes/CraftingTableRecipes.kt | 14 +++++++------- .../mc/otm/datagen/recipes/DecorativesRecipes.kt | 4 ++-- .../ru/dbotthepony/mc/otm/registry/MNames.kt | 1 + .../dbotthepony/mc/otm/registry/game/MItems.kt | 3 +++ .../textures/item/component/display_screen.png | Bin 0 -> 2437 bytes 8 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/component/display_screen.png 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 77f5db3cb..d06fb62f0 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 @@ -826,6 +826,7 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.REINFORCED_IRON_PLATE, "desc", "A sturdier and more durable Iron Plate") add(MItems.ARMOR_ASSEMBLY, "Armor assembly") add(MItems.CARBON_MESH, "Carbon Mesh") + add(MItems.DISPLAY_SCREEN, "Display Screen") add(MItems.GRAVITATIONAL_DISRUPTOR, "Spacetime Equalizer") 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 48235c695..77d971421 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 @@ -819,6 +819,7 @@ private fun items(provider: MatteryLanguageProvider) { add(MItems.REINFORCED_IRON_PLATE, "desc", "Более надёжная и прочная железная пластина") add(MItems.ARMOR_ASSEMBLY, "Стройка брони") add(MItems.CARBON_MESH, "Углеродная сетка") + add(MItems.DISPLAY_SCREEN, "Экран дисплея") add(MItems.GRAVITATIONAL_DISRUPTOR, "Маяк уравнения пространства-времени") diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ComponentRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ComponentRecipes.kt index f243ef97d..fc4822754 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ComponentRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/ComponentRecipes.kt @@ -100,4 +100,10 @@ fun addComponentRecipes(consumer: RecipeOutput) { .row(MItemTags.COPPER_WIRES, MItems.MECHANICAL_PARTS, MItemTags.COPPER_WIRES) .unlockedBy(MItems.ELECTROMAGNET) .build(consumer) + + MatteryRecipe(MItems.DISPLAY_SCREEN, 3) + .row(MItemTags.IRON_PLATES, Tags.Items.DUSTS_GLOWSTONE, Tags.Items.GLASS_PANES_COLORLESS) + .row(MItemTags.IRON_PLATES, Tags.Items.DUSTS_REDSTONE, Tags.Items.GLASS_PANES_COLORLESS) + .row(MItemTags.IRON_PLATES, Tags.Items.DUSTS_GLOWSTONE, Tags.Items.GLASS_PANES_COLORLESS) + .build(consumer) } 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 2389b6cb9..c14fb79b1 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 @@ -52,8 +52,8 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) { .save(consumer, modLocation("holo_sign_reset")) MatteryRecipe(MBlocks.DRIVE_VIEWER[null]!!, category = machinesCategory) - .rowAC(MItemTags.IRON_PLATES, MItemTags.IRON_PLATES) - .row(Tags.Items.DUSTS_GLOWSTONE, MItems.MACHINE_FRAME, Tags.Items.GLASS_BLOCKS) + .rowBC(MItems.DISPLAY_SCREEN, Tags.Items.GLASS_PANES) + .row(MItemTags.IRON_PLATES, MItems.MACHINE_FRAME, MItemTags.IRON_PLATES) .row(MItemTags.BASIC_CIRCUIT, MItems.MATTER_IO_PORT, MItemTags.BASIC_CIRCUIT) .unlockedBy(MItems.MATTER_IO_PORT) .build(consumer) @@ -75,9 +75,9 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) { .build(consumer) MatteryRecipe(MBlocks.MATTER_PANEL[null]!!, category = machinesCategory) - .row(MItems.ELECTRIC_PARTS, MItemTags.TRITANIUM_PLATES, Tags.Items.GLASS_BLOCKS) - .row(MItems.MATTER_CABLE, Tags.Items.DUSTS_GLOWSTONE, Tags.Items.GLASS_BLOCKS) - .row(MItemTags.ADVANCED_CIRCUIT, MItemTags.TRITANIUM_PLATES, Tags.Items.GLASS_BLOCKS) + .row(MItems.ELECTRIC_PARTS, MItemTags.TRITANIUM_PLATES, Tags.Items.GLASS_PANES) + .row(MItems.MATTER_CABLE, MItems.DISPLAY_SCREEN, Tags.Items.GLASS_PANES) + .row(MItemTags.ADVANCED_CIRCUIT, MItemTags.TRITANIUM_PLATES, Tags.Items.GLASS_PANES) .unlockedBy(Tags.Items.GLASS_BLOCKS) .build(consumer) @@ -99,7 +99,7 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) { MatteryRecipe(MBlocks.ENERGY_COUNTER[null]!!, category = machinesCategory) .row(MItemTags.TRITANIUM_PLATES, MItems.ENERGY_BUS, MItemTags.TRITANIUM_PLATES) - .row(MItemTags.BASIC_CIRCUIT, Tags.Items.DUSTS_GLOWSTONE, MItemTags.HARDENED_GLASS_PANES_COLORLESS) + .row(MItemTags.BASIC_CIRCUIT, MItems.DISPLAY_SCREEN, MItemTags.HARDENED_GLASS_PANES) .row(MItemTags.TRITANIUM_PLATES, MItems.ENERGY_BUS, MItemTags.TRITANIUM_PLATES) .unlockedBy(MItems.ENERGY_BUS) .build(consumer) @@ -223,7 +223,7 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) { .build(consumer) MatteryRecipe(MItems.BLACK_HOLE_SCANNER, category = RecipeCategory.TOOLS) - .row(MItemTags.IRON_PLATES, Tags.Items.GLASS_PANES_COLORLESS, MItemTags.IRON_PLATES) + .row(MItemTags.IRON_PLATES, MItems.DISPLAY_SCREEN, MItemTags.IRON_PLATES) .row(MItemTags.GOLD_WIRES, MItems.GRAVITATION_FIELD_SENSOR, MItemTags.ADVANCED_CIRCUIT) .rowAC(Tags.Items.DUSTS_GLOWSTONE, MItemTags.TRITANIUM_PLATES) .unlockedBy(MItems.GRAVITATION_FIELD_SENSOR) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt index eb70427c6..f4bf0eb48 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt @@ -433,11 +433,11 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: RecipeOutpu for ((color, item) in MRegistry.COMPUTER_TERMINAL.allItems) { val builder = MatteryRecipe(item, category = RecipeCategory.DECORATIONS) - builder.row(MItemTags.BASIC_CIRCUIT, MItemTags.TRITANIUM_PLATES, MItemTags.HARDENED_GLASS_PANES_COLORLESS) - if (color != null) { builder.rowB(color.tag) } + builder.row(MItemTags.TRITANIUM_PLATES, MItems.DISPLAY_SCREEN, MItemTags.HARDENED_GLASS_PANES_COLORLESS) + builder.rowB(MItemTags.BASIC_CIRCUIT) builder.build(consumer) } 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 6967c5d02..8d701847e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MNames.kt @@ -232,6 +232,7 @@ object MNames { const val MIRROR_COMPOUND = "mirror_compound" const val MIRROR = "mirror" const val BLANK_MACHINE_UPGRADE = "blank_machine_upgrade" + const val DISPLAY_SCREEN = "display_screen" const val ENERGY_BUS = "energy_bus" diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt index d9b809861..cbd83e673 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MItems.kt @@ -560,6 +560,7 @@ object MItems { val ELECTROMOTOR: Item by registry.register(MNames.ELECTROMOTOR) { Item(DEFAULT_PROPERTIES) } val MIRROR_COMPOUND: Item by registry.register(MNames.MIRROR_COMPOUND) { Item(DEFAULT_PROPERTIES) } val MIRROR: Item by registry.register(MNames.MIRROR) { MatteryItem(DEFAULT_PROPERTIES).addSimpleDescription() } + val DISPLAY_SCREEN: Item by registry.register(MNames.DISPLAY_SCREEN) { Item(DEFAULT_PROPERTIES) } /** * List of components for everything else @@ -589,6 +590,7 @@ object MItems { MItems::ELECTROMOTOR, MItems::MIRROR_COMPOUND, MItems::MIRROR, + MItems::DISPLAY_SCREEN, MItems::CARBON_MESH, MItems::ARMOR_ASSEMBLY, @@ -624,6 +626,7 @@ object MItems { MItems::ELECTROMOTOR, MItems::MIRROR_COMPOUND, MItems::MIRROR, + MItems::DISPLAY_SCREEN, MItems::CARBON_MESH, MItems::ARMOR_ASSEMBLY, diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/component/display_screen.png b/src/main/resources/assets/overdrive_that_matters/textures/item/component/display_screen.png new file mode 100644 index 0000000000000000000000000000000000000000..d36635b4d3d72a5dd2644f4bd55341d6da866d5b GIT binary patch literal 2437 zcmV;033~R4P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizyJUazyWI3i3tDz2^vX6K~zXfC00vs zB-ItZ&w5u^_1o=s`!Sv|69|G4pg@8KG$8_{NP$K2WB3W#Wt~+vStU{yStQB^wh=-M z5Qc#Za?}}@2Yz%Upb|=-M)42x#xW6JKs6zYd`g%BkkQV~@VUGD8nrn9+annhN)EiW(2EG_GrV4IL;%VOge-yd}} zwG3gfM_+$F8MoJqSy@Dz&1SMQ$;)DXd3CXlV4X2m*L9xfTI;%0jFO%qkM?#rso;&@ zaP_B99&}1txdV{{Q12<@|Q^k6nph&VO-yL_tHqK;OD!6<$JynX}QA)ve z{Kie3Qs3hDUc9@yoKs5tRtsAyrE5(o8mBM@BST?Twv<+sO=GpoAcxSKM>Bn&lC_erC;cPZ1gx0$84G&PlV@rMa_I{q1Cl}|sCWdKH zgjrXDQ&)De+fcU0*AhM08RNhJ657s%p7GJ_uHSJiD}fmjbxMp?CY}C!X6r zzqo*#|NPe{i**7#di~zz^#aI%MNKvcX$QgS+1czGnG>pJwrK(%%dv|hkD`>(8UWQb z18$3D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>o4}?A{a~^+2t0v`0TodT z1=_T(q@eu4&+joPiPG><8YU`ILD$O?O)*)=j_qK{5CZ=edBQ0lPbL%`w=KtDtIG@c zJ|47pCnKhE%ano>$7+hfuo~lp5oTKgWx@`gS&4lmzL8sk@IRjOOHm6BxT4q@kjB3@iKZXGhfneCd zc#y;y3e8ZN21LL8@Et_g1k-@iyoYtjA=)LX%WQdu1;&Xuf*KO!NofV%TBg%93v6Z* z4U-8e3=?OYMO}l&P%bKMX}C;PSjTWCkm{RkH;svabHMUuDDp5;+F{V^5KB;i2@R`@ zyi6)xz!eN1*wf?>)^8r1!W2Sivk2vHOx&zvFl(l0+;FplF-!)G;tRSardmH7gkFeR ztBL~Y!BKo*9o{tiDTO(-bfgW_YzFDh(03zjVSoWUun>6D)!-O~><4V*mu8 Date: Tue, 4 Mar 2025 15:20:01 +0300 Subject: [PATCH 05/29] =?UTF-8?q?=D1=80=D0=B5=D1=86=D0=B5=D0=BF=D1=82=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/datagen/recipes/CraftingTableRecipes.kt | 8 ++++++++ 1 file changed, 8 insertions(+) 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 c14fb79b1..85a152684 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 @@ -585,4 +585,12 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) { .unlockedBy(MItems.DILITHIUM_CRYSTAL) .unlockedBy(MItems.DILITHIUM_CRYSTAL_BLOCK) .save(consumer, modLocation("dilithium_crystal/from_block")) + + MatteryRecipe(MItems.CONFIGURATOR, category = RecipeCategory.TOOLS) + .rowA(MItemTags.IRON_PLATES) + .row(Tags.Items.GLASS_PANES, Tags.Items.DUSTS_REDSTONE, MItems.DISPLAY_SCREEN) + .row(MItemTags.IRON_PLATES, MItemTags.BASIC_CIRCUIT, MItems.DILITHIUM_CRYSTAL) + .unlockedBy(MItems.DILITHIUM_CRYSTAL) + .unlockedBy(MItems.DISPLAY_SCREEN) + .build(consumer) } From 4eb7971717b869839ce0d9fbc075137d2193637f Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 4 Mar 2025 21:06:22 +0700 Subject: [PATCH 06/29] Further reduce internal state of CMWC (from 1024 octets / 8192 bits to just 128 octets / 1024 bits) because we don't need these insane periods --- src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt index ae291f2d1..7ec103ac8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt @@ -109,7 +109,7 @@ class CMWCRandom(seed: Long = System.nanoTime()) : RandomGenerator, RandomSource } companion object { - const val CMWC_STATE_SIZE = 256 // 4096 + const val CMWC_STATE_SIZE = 32 // 4096 const val CMWC_CARRY_MAX = 809430660 } } From fbef1f6f84d5f5501f071ffdf64619acddf74e75 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 4 Mar 2025 20:09:41 +0300 Subject: [PATCH 07/29] =?UTF-8?q?=D0=BC=D0=B0=D0=BB=D0=B5=D0=BD=D1=8C?= =?UTF-8?q?=D0=BA=D0=B8=D0=B9=20=D1=88=D1=80=D0=B8=D1=84=D1=82=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D1=85=D1=83=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dbotthepony/mc/otm/client/MatteryGUI.kt | 13 +++++--- .../dbotthepony/mc/otm/config/ClientConfig.kt | 4 +++ .../mc/otm/core/util/Formatting.kt | 10 +++--- .../overdrive_that_matters/font/small.json | 30 ++++++++++++++++++ .../textures/font/small.pdn | Bin 0 -> 11139 bytes .../textures/font/small.png | Bin 0 -> 1239 bytes 6 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 src/main/resources/assets/overdrive_that_matters/font/small.json create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/font/small.png diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt index d17add084..f36b45cd6 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt @@ -12,6 +12,7 @@ import net.minecraft.client.gui.screens.DeathScreen import net.minecraft.client.gui.screens.InBedChatScreen import net.minecraft.client.player.LocalPlayer import net.minecraft.network.chat.Component +import net.minecraft.network.chat.Style import net.minecraft.world.effect.MobEffects import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.player.Player @@ -112,6 +113,9 @@ object MatteryGUI { event.registerAbove(VanillaGuiLayers.CAMERA_OVERLAYS, loc("android_low_power"), AndroidLowPowerLayer()) } + private val SMALL_FONT = loc("small") + private val SMALL_FONT_STYLE = Style.EMPTY.withFont(SMALL_FONT) + class AndroidEnergyBarLayer : LayeredDraw.Layer { override fun render( graphics: GuiGraphics, @@ -163,9 +167,8 @@ object MatteryGUI { } val formattedPower = mattery.androidEnergy.batteryLevel.formatPower() - - val scale = ClientConfig.HUD.BAR_TEXT_SCALE.toFloat() - guiGraphics.draw(formattedPower, left + CHARGE_BG.width + 2f + scale, top + CHARGE_BG.height / 2f + scale, font = gui.font, scale = scale, gravity = RenderGravity.CENTER_LEFT, color = RGBAColor.YELLOW, drawOutline = true) + val scale = if (ClientConfig.HUD.USE_SMALL_FONT) 1f else ClientConfig.HUD.BAR_TEXT_SCALE.toFloat() + guiGraphics.draw(formattedPower.withStyle(if (ClientConfig.HUD.USE_SMALL_FONT) SMALL_FONT_STYLE else Style.EMPTY), left + CHARGE_BG.width + 2f + scale, top + CHARGE_BG.height / 2f + scale, font = gui.font, scale = scale, gravity = RenderGravity.CENTER_LEFT, color = RGBAColor.YELLOW, drawOutline = true) RenderSystem.disableBlend() RenderSystem.enableDepthTest() @@ -230,8 +233,8 @@ object MatteryGUI { if (ply.absorptionAmount > 0) formattedHealth = TextComponent("%d+%d/%d".format(ply.health.toInt(), ply.absorptionAmount.toInt(), ply.maxHealth.toInt())) - val scale = ClientConfig.HUD.BAR_TEXT_SCALE.toFloat() - guiGraphics.draw(formattedHealth, left - 2f, top + HEALTH_BG.height / 2f + 1f * scale, scale = scale, gravity = RenderGravity.CENTER_RIGHT, color = getHealthColorForPlayer(ply), drawOutline = true) + val scale = if (ClientConfig.HUD.USE_SMALL_FONT) 1f else ClientConfig.HUD.BAR_TEXT_SCALE.toFloat() + guiGraphics.draw(formattedHealth.withStyle(if (ClientConfig.HUD.USE_SMALL_FONT) SMALL_FONT_STYLE else Style.EMPTY), left - 2f, top + HEALTH_BG.height / 2f + 1f * scale, scale = scale, gravity = RenderGravity.CENTER_RIGHT, color = getHealthColorForPlayer(ply), drawOutline = true) RenderSystem.disableBlend() RenderSystem.enableDepthTest() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/config/ClientConfig.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/config/ClientConfig.kt index 03c74878e..b3048cde8 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/config/ClientConfig.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/config/ClientConfig.kt @@ -69,6 +69,10 @@ object ClientConfig : AbstractConfig("client", ModConfig.Type.CLIENT) { var BAR_TEXT_SCALE: Double by builder .defineInRange("BAR_TEXT_SCALE", 0.5, 0.5, 1.0) + var USE_SMALL_FONT: Boolean by builder + .comment("Use smaller font on HUD bars", "(Scale is ignored)") + .define("USE_SMALL_FONT", false) + init { builder.pop() } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Formatting.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Formatting.kt index 7999f0f88..961540d14 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Formatting.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Formatting.kt @@ -25,7 +25,7 @@ import kotlin.math.absoluteValue import kotlin.math.max import kotlin.math.roundToInt -private fun concat(numbers: String, suffix: Any): Component { +private fun concat(numbers: String, suffix: Any): MutableComponent { if (suffix == "") return TextComponent(numbers) else if (suffix is Component) @@ -177,7 +177,7 @@ private fun resplice(number: String, decimals: Int): String { return String(resplice) } -fun Long.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsReadable: BooleanSupplier = never, bias: Int = 0): Component { +fun Long.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsReadable: BooleanSupplier = never, bias: Int = 0): MutableComponent { require(decimalPlaces >= 0) { "Invalid amount of decimal places required: $decimalPlaces" } if (formatAsReadable.asBoolean) { @@ -193,18 +193,18 @@ fun Long.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsRea return TranslatableComponent(prefix.neighbour(bias).formatLocaleKey, "%.${decimalPlaces}f".format(this.toDouble() / prefix.long!!.toDouble()), suffix) } -fun Int.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsReadable: BooleanSupplier = never, bias: Int = 0): Component { +fun Int.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsReadable: BooleanSupplier = never, bias: Int = 0): MutableComponent { return toLong().formatSiComponent(suffix, decimalPlaces, formatAsReadable, bias) } -fun Double.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsReadable: BooleanSupplier = never, bias: Int = 0): Component { +fun Double.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsReadable: BooleanSupplier = never, bias: Int = 0): MutableComponent { require(decimalPlaces >= 0) { "Invalid amount of decimal places required: $decimalPlaces" } if (formatAsReadable.asBoolean && this.absoluteValue >= 1.0) return concat(reformat("%.${decimalPlaces}f".format(this)), suffix) val prefix = SiPrefix.determine(this) return TranslatableComponent(prefix.neighbour(bias).formatLocaleKey, "%.${decimalPlaces}f".format(this / prefix.double), suffix) } -fun Decimal.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsReadable: BooleanSupplier = never, bias: Int = 0): Component { +fun Decimal.formatSiComponent(suffix: Any = "", decimalPlaces: Int = 3, formatAsReadable: BooleanSupplier = never, bias: Int = 0): MutableComponent { require(decimalPlaces >= 0) { "Invalid amount of decimal places required: $decimalPlaces" } if (this == Decimal.POSITIVE_INFINITY) return concat("∞", suffix) if (this == Decimal.NEGATIVE_INFINITY) return concat("-∞", suffix) diff --git a/src/main/resources/assets/overdrive_that_matters/font/small.json b/src/main/resources/assets/overdrive_that_matters/font/small.json new file mode 100644 index 000000000..612ba26a3 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/font/small.json @@ -0,0 +1,30 @@ +{ + "providers": [ + { + "type": "space", + "advances": { + " ": 4 + } + }, + { + "type": "bitmap", + "file": "overdrive_that_matters:font/small.png", + "chars": [ + "\u0020\u0021\u0022\u0023\u0024\u0025\u0026\u0027\u0028\u0029\u002a\u002b\u002c\u002d\u002e\u002f", + "\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039\u003a\u003b\u003c\u003d\u003e\u003f", + "\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048\u0049\u004a\u004b\u004c\u004d\u004e\u004f", + "\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059\u005a\u005b\u005c\u005d\u005e\u005f", + "\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b\u006c\u006d\u006e\u006f", + "\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007a\u007b\u007c\u007d\u007e\u0000", + "\u0410\u0411\u0412\u0413\u0414\u0415\u0401\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E", + "\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E", + "\u042F\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", + "\u0430\u0431\u0432\u0433\u0434\u0435\u0451\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E", + "\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E", + "\u044F\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000" + ], + "height": 6, + "ascent": 6 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn b/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn new file mode 100644 index 0000000000000000000000000000000000000000..8a8ddabb70b6edcdff805848d36c627ed34d190e GIT binary patch literal 11139 zcmeHr3z!tuo$ri1CmO}5As7+FM6(v5y1S~ot6&~mJ^h+~cTZ1u^$_HCbyxMfs_W6! zT{Qx3viWc|kz@l&kjG?~cum3#Cjc6re;BHAI_;f)VAxK|)NY_RP zBAPJOXhLkTLvJC7)=IW4W3ga|M&(M_(w&JiL0CmEcr;syL{jD*+5(wq?+95U&NOXK zBB3PhX|r==y39It(K6G{rh|o?KNl48e$<9#a$c9!$x@6f1&c&TK^Zk;bouO=7);^< zopjRf9G|hPy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#6@u$$c%$ zc*7f8-dyRE5u z;nyQemcMz_*ZWZ4vm@_r?K?Q~=6vPgs;;k%K6P`tIMfZ+vjU1s}@IU$nB3`{-Wli!+9Qb0GStxcc7BTZ=nEENXna m=YsgcuF=yK0Q0f+MDSzp*>#}%-}3s(*-4GmcW>3s#=ijps!OT> literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/font/small.png b/src/main/resources/assets/overdrive_that_matters/textures/font/small.png new file mode 100644 index 0000000000000000000000000000000000000000..46a23eb360a334c828df53f8899cd6ac01115b81 GIT binary patch literal 1239 zcmeAS@N?(olHy`uVBq!ia0vp^2|(<@!3-qrb}|G4DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoB=)|uK)l4KXBjxkoV!?MiU^#ToU9L{Qp10^;5h+wG5mE9+AZi419+` zm{C;2s{tq|QQ{g=5}cn_Ql40p$`Fv4nOCCc=Nh75s%NNY^m`BUHlUhqsS%!Oo}O9^ z96$~$gA^kx10#^-1;o-&Hps;qjLcwhCLr68k%>V7NJjy2W;+X5JPXJMflpx>8!#?_m$Nv;eZ8x(p2rK(c+- z2g5Im@9_f$M3SeAV@QPi)fu-ZJu={NIsE6pd%mmr{An@^8f@0g*fe+B62CiA)&+lN z%3h4hzgsxxvC}E{WBR&}rarKEd;ZgLpGms@cTO5_`|OtOvSXftkxI1kjWf5-UJX6} z=9|UaH|Gi!X1IPok(b}b-uNS8&O{e3`Rh5~<2Ur|y=!wY-Awat(b)~N*2qtszB%Hh zN$l^ZlAS48f*u+l4YOlAcr-Y&etFJjbeZy@>%9j7PO0%PtK@!5uQN)^-W#8@_)qYT{OqFZDm!+S z3vF59Heu4th9GH~^7%Psf&V=JtWjF6-MnO)j>9&aC5zPsg(QUftL7h#E4kU#lU%#J zNRyQ#itFNg)<)}#^8*>PTUoBecna+J;i45cC3n>duO$yfE-ZhzRzQc-&6cIHPd-X< zjd^+W<3QKuU+!X?j{=g*Nq*YXG|%vb@wJIIaKCXa z6kdF3*_(|w8;x>*9h&FY6+16u-+|ayf3jRBy7JfSKgwZK)>+{lsB-G3s?y8XY8@x? z9_w;OsNXnY(yH_|?YYN#;VaG4d~zARk>=i0QWMK+tOF6lPzJa*YX zI^_P%RMFO+;-j-?tX}u%yphY4{XdP)JfAqFC{|#}f29xmUf2evo@21#)hzz6=$H~= z8n*HHszsNR&R#rgJ}AlKiH_OuiUw2?IX|E^IgjJi>I2kJEYB@BUa;`uz920QaOvL#NE&vsP-+w}M4;19YrX<{a;f*D<_rdvQWY z#e`q0g>{P#HEn8?-Eknnv0(n)`UiV9E7v6-uiIFk{{MgHH~s?(x?-NEeguGWo~Nsy J%Q~loCIBM1@MQo1 literal 0 HcmV?d00001 From 44a1ae32634dc4b752475b5db0e21c609d784baa Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 4 Mar 2025 20:14:30 +0300 Subject: [PATCH 08/29] =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0?= =?UTF-8?q?=D0=B9=20Bsky=20=E2=80=94=20=D0=A1=D0=B5=D0=B3=D0=BE=D0=B4?= =?UTF-8?q?=D0=BD=D1=8F,=20=D0=B2=2020:10=20=D0=B0=20=D0=BC=D0=BE=D0=B6?= =?UTF-8?q?=D0=BD=D0=BE=20=D0=B4=D1=80=D1=83=D0=B3=D0=BE=D0=B9=20=D1=86?= =?UTF-8?q?=D0=B2=D0=B5=D1=82=20=D1=84=D0=BE=D0=BD=D1=82=D0=B0=20=D1=8D?= =?UTF-8?q?=D0=BD=D0=B5=D1=80=D0=B3=D0=B8=D0=B8=20=F0=9F=92=80=20=D0=B8?= =?UTF-8?q?=D0=B1=D0=BE=20=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=BB=D0=BE=D1=81?= =?UTF-8?q?=D0=BA=D0=B5=20=D1=8D=D0=BD=D0=B5=D1=80=D0=B3=D0=B8=D1=8F=20?= =?UTF-8?q?=D1=87=D1=83=D1=82=D1=8C=20=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20?= =?UTF-8?q?=D0=BE=D1=80=D0=B0=D0=BD=D0=B6=D0=B5=D0=B2=D0=BE-=D0=B6=D0=B5?= =?UTF-8?q?=D0=BB=D1=82=D0=B0=D1=8F=20=D0=B0=20=D0=BD=D0=B0=20=D1=84=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D0=B5=20=D0=B7=D0=B5=D0=BB=D0=B5=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D1=82=D0=BE=20=D0=B6=D0=B5=D0=BB=D1=82=D1=8B=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt index f36b45cd6..b7f561691 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt @@ -168,7 +168,7 @@ object MatteryGUI { val formattedPower = mattery.androidEnergy.batteryLevel.formatPower() val scale = if (ClientConfig.HUD.USE_SMALL_FONT) 1f else ClientConfig.HUD.BAR_TEXT_SCALE.toFloat() - guiGraphics.draw(formattedPower.withStyle(if (ClientConfig.HUD.USE_SMALL_FONT) SMALL_FONT_STYLE else Style.EMPTY), left + CHARGE_BG.width + 2f + scale, top + CHARGE_BG.height / 2f + scale, font = gui.font, scale = scale, gravity = RenderGravity.CENTER_LEFT, color = RGBAColor.YELLOW, drawOutline = true) + guiGraphics.draw(formattedPower.withStyle(if (ClientConfig.HUD.USE_SMALL_FONT) SMALL_FONT_STYLE else Style.EMPTY), left + CHARGE_BG.width + 2f + scale, top + CHARGE_BG.height / 2f + scale, font = gui.font, scale = scale, gravity = RenderGravity.CENTER_LEFT, color = RGBAColor.FULL_POWER, drawOutline = true) RenderSystem.disableBlend() RenderSystem.enableDepthTest() From 9417d6ffdc8d5d6ba7307fb57da2254b9a14cdcb Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 01:03:00 +0700 Subject: [PATCH 09/29] Use more robust 64-bit LCG for seeding CMWC internal state --- .../ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt index 7ec103ac8..d37b80c50 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt @@ -24,12 +24,12 @@ class CMWCRandom(seed: Long = System.nanoTime()) : RandomGenerator, RandomSource this.seed = seed carry = Integer.remainderUnsigned(seed.toInt(), CMWC_CARRY_MAX) - // init state with regular LCG produced values - state[0] = seed.toInt() - state[1] = seed.shr(32).toInt() + var lcg = seed - for (i in 2 until state.size) { - state[i] = 69069 * state[i - 2] + 362437 + // init state with regular LCG produced values + for (i in 1 until state.size) { + lcg = lcg * 6364136223846793005 + 1442695040888963407 + state[i] = lcg.ushr(32).toInt() } stateIndex = state.size - 1 From 3a010048eed513f9aadeaa6c54cbdc88813e0e23 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 4 Mar 2025 21:37:17 +0300 Subject: [PATCH 10/29] =?UTF-8?q?=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../textures/font/small.pdn | Bin 11139 -> 11149 bytes .../textures/font/small.png | Bin 1239 -> 1242 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn b/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn index 8a8ddabb70b6edcdff805848d36c627ed34d190e..60ffb2a2efd974b0f45788de50857d04ef1991bf 100644 GIT binary patch delta 6011 zcmcgveV7yVonQ6PR$6UKfxf8QYO7c0uCvKx-UQj3B%93UJ=tVlLcwM-Gf5`NB$H$& z$skOxy*~KP**$8hEO_p5+VWOe1p#-Vwt`Y*Z(Bie1q5VQ7hw^OUDt)p&B9&J-gEcd zKX;uxd7dQC=llD9zn{4ir*%6D_DKagfJQU$OJf5}!la7#F z3tiJXDnv!9`@$Y?jkh}OS;nr_S&=S-RwCJ+BTAWgE|!itNEL*wQW&Vv*&I`d1>B0W z&B2914U*vmRw;oA1aN~^l!KubG@k}Q8BKuZ&s+k`8@h~=5tK}W2u6i;CFJHaAY=vT zG*-?Q0l)|2kf2k{JND2jOf^5$zpJ)NU2)Dr_gC zp=v$OGAUBZz!|=(YauJ5b|}$8*p?Li9@)?H3Jib&qh9dmk|799G7K4@fmEC+5G7}| zgDZ(3kE%FWfhtG~596|iTdg2u0sJM9ji|gLz)TLcaB&C&`Cv`Y$ueT)MF}-?_9bi8 z2tKe5mAS)jH2eF*zG` zKs-!DovKzN`7}<}h`Jg{RGsyDqDX5lMzCiDMlFC|SCqEaE2fQ>PX|Lej&Jcn3~03` zDmZ0V^n!=ty!9HT=Y*Inl4Z2L169kqBLpyhA(=5yQUSAM1`5Lopv4wNsfq@wxK4q1 zrJ#yYAP5o8x{#|U1kmFya?!k2E|L+!6DxIKaj{(Uhih$KvQ+zQSyaK)-=rI6c)Wg!Pz@RyBnF(FZ+UUY$+4@iW>P@v=ig%VcG zmnuRuYwdvQ74s0G=oK-nP$;3CD-)*!wG8O->Mj-4(j|q2vZyWOO~q-954)8%H0rhH z?K#nrw^$Xh?kOO}x&qe}Ea?*Mr0mN&0mwpEN<~mNG$O-NfGgBq200dnv1$s^tI;YP zvVuOkqoyiyUKL%s5>Qe}IuL{%x;>Fgg0Y~JCh2sJ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Yiv%N#Li5{DN_}&wt z?|1j{`gdCv2$lou-dj}X{^_B>h4D!srg^WdXwhbLcTC@UXUpic+~KLcHxB%wzGcbf zgJ;&APchC5)48r^(VbX)=%cy6>}vSBtx^8qTgJg{!REWR`X;V3zP>tg7dF2~t?&HB z-7|lBM|1u1%VYYYLq~#r5AA+s>}YoV?)_tj=BWFZc7A)}v2l60XU+Gou#+q*6PH`G zm%OJg|7PsRg?opp&t7u$73aM;;}7j?9-MnQ2$$w`Ep95Ey2r6&=I9^xQIA!Z-P6Cm syxExXruTX;SGRAOIHwqCPCHJ9PX{in{CC6M^z{ojHZhOfK54dp1>k^Vg#Z8m diff --git a/src/main/resources/assets/overdrive_that_matters/textures/font/small.png b/src/main/resources/assets/overdrive_that_matters/textures/font/small.png index 46a23eb360a334c828df53f8899cd6ac01115b81..9117019550bd4b6a076b846cf2a3901a9e03d64a 100644 GIT binary patch delta 942 zcmV;f15y0f3EByeZ3@8v01m+cxRGn^k#}|p*>(W{=mP)%*^%~Nf2SzEuKN|i>;M1* zWl2OqR9HvVnC)`&ItYZFbN?6pj`)05SZSt>e;m@0@CsO4P~_zL&*X~HW}B{S>4~`B zrlJ2R;jaYO5|0@xfx{Aa@{VoYXlaD&34}RROm33*;ySPP$S$uXYg)P^F}vPV;Jv6~ zco2w<`58%scnyXbf0Ibw){>hi_?=8jm)tY#ChI5lv5K8e(YW(xTT9ZVjx2+(#ytffAgLvDV9S&4gpmjd42eg5PNEkbM@i$@-V~*D*phe*_|T<0>j%OTJRwt#1jmIbo~Kr~MXadKMCG_8@TSr*X0Q_~z|yao zaZR0TT(vnC3`wK*WeAgtl>@aLaDiSFH!&)0rahV+e<)L?E#&Q@$niw;4c=3oU#*yA z$%nreaW$Rc7Sxqd1j_YJBI)ZUh)B2bkp!$0G%^jLNWIxPveyafK})7uK&Mx`Q;u!7 z#v~924{9~D1rrt$Psn(A+ItfENc-0>}$U03mE5yH#geCg)v2+DLF2-3a@ zd@gzqe^imv0Z&89>^~%k2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=D0=BE=D0=BD?= =?UTF-8?q?=D0=B5=D1=87=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B4=D0=B5=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../overdrive_that_matters/font/small.json | 2 +- .../textures/font/small.pdn | Bin 11149 -> 11163 bytes .../textures/font/small.png | Bin 1242 -> 1240 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/overdrive_that_matters/font/small.json b/src/main/resources/assets/overdrive_that_matters/font/small.json index 612ba26a3..30391944b 100644 --- a/src/main/resources/assets/overdrive_that_matters/font/small.json +++ b/src/main/resources/assets/overdrive_that_matters/font/small.json @@ -15,7 +15,7 @@ "\u0040\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048\u0049\u004a\u004b\u004c\u004d\u004e\u004f", "\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059\u005a\u005b\u005c\u005d\u005e\u005f", "\u0060\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b\u006c\u006d\u006e\u006f", - "\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007a\u007b\u007c\u007d\u007e\u0000", + "\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007a\u007b\u007c\u007d\u007e\u221E", "\u0410\u0411\u0412\u0413\u0414\u0415\u0401\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E", "\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E", "\u042F\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", diff --git a/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn b/src/main/resources/assets/overdrive_that_matters/textures/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=BD=D0=B0=D1=8F=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../textures/font/small.pdn | Bin 11163 -> 11157 bytes .../textures/font/small.png | Bin 1240 -> 1242 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn b/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn index ea895c7f7b0558f40432742baa3e83d911f44115..25f26b09c61499577c5dcd08b0e1e6f2189e5210 100644 GIT binary patch delta 3888 zcmY*adsq`^zNWgh+jU#pT6No1+;i;K*6BJVlSyV2%Sp(M5ON{OWP+tMx0#UpZ6=vS z7<+cR+LlT!%ju#b`#khwi$ZM*RutK`$4e{1ax7S|f~{3tjn&2nHDVR?<=zJ`Kah9yhj)I)ioGsAW~R-cHRM*5Wfq*)HR z?ao3#Y@L)f9={I3m!C5L48^ z%_0PW0=0NF*q7Cxug*Zof|d77@p<9aK1%c3gnAQouEh{XCEV)1Z&m3KeR?&3a=Pm@l%} zv=%eP_>@JM-Nt|_%nq4~3h`)EZB&x^>S(|NbMz9C4Dtqrl$Ky96>sQKNB^LMV@pgd%PZV3VosdQC3Cz*f7QBD`M2%fbSA zm^SlqXMWHnbwvre*Th9)r96w?hdT(ZjnM$6pa8b3g<>oMNOYyNK0sr31~Z~617g?l zI5fu>#`vJvDUb$&enx8cMl7((qqE{((5eT$5or^`+_h{gk+>x!>46L zE-TUno#8BV1Q#Jer61w|g>J};lp4f#xm=7wUYQ?}L0Y*h?AGK9{V?d$S;2f217b?j z7UBmj7;Y3%DtRt9iqRgkNU1I|0e;ei16;`GZ2raT^s15OX4BGd(#yg=+l#cl~tMq#0lGsv-UFr6UJP0*!<3Q!#c zy>tjQhbbu-24hh<;ffWwcxcd_ABF)ph0%gA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nNbKS2k6 zEkW=!6Q@FWrvkYb$Ul0um^6*v(kP{c%p=odXj5}P!nMVaWdels6OFqK9XRq~B#>$q zPe#82+5KJ=(HtT&yJA`JErG3KKc?vKR-emfk>FP%A6q1`R7H|fP9{ Date: Tue, 4 Mar 2025 22:31:24 +0300 Subject: [PATCH 13/29] =?UTF-8?q?=D0=9D=D0=95=D0=A2=20=D0=9D=D0=A3=20?= =?UTF-8?q?=D0=95=D0=A1=D0=9B=D0=98=20=D0=A2=D0=95=D0=9F=D0=95=D0=A0=D0=AC?= =?UTF-8?q?=20=D0=A3=20=D0=9D=D0=90=D0=A1=20=D0=95=D0=A1=D0=A2=D0=AC=20?= =?UTF-8?q?=D0=A2=D0=90=D0=9A=D0=9E=D0=99=20=D0=A8=D0=A0=D0=98=D0=A4=D0=A2?= =?UTF-8?q?=20=D0=A2=D0=9E=20=D0=AF=20=D0=91=D0=A3=D0=94=D0=A3=20=D0=95?= =?UTF-8?q?=D0=93=D0=9E=20=D0=90=D0=91=D0=A3=D0=97=D0=98=D0=A2=D0=AC=20?= =?UTF-8?q?=D0=B8=20=D0=B2=D1=8B=20=D0=BC=D0=BD=D0=B5=20=D0=BD=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D0=B3=D0=BE=20=D0=BD=D0=B5=20=D1=81=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D0=B5=D1=82=D0=B5=20=D0=BF=D0=BE=D0=BD=D1=8F=D1=82=D0=BD?= =?UTF-8?q?=D0=BE=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/dbotthepony/mc/otm/datagen/lang/English.kt | 4 ++++ .../ru/dbotthepony/mc/otm/datagen/lang/Russian.kt | 4 ++++ .../block/entity/decorative/HoloSignBlockEntity.kt | 6 ++++++ .../ru/dbotthepony/mc/otm/client/MatteryGUI.kt | 9 +++++---- .../client/render/blockentity/HoloSignRenderer.kt | 6 +++++- .../otm/client/screen/decorative/HoloSignScreen.kt | 12 ++++++++++++ .../mc/otm/menu/decorative/HoloSignMenu.kt | 3 +++ 7 files changed, 39 insertions(+), 5 deletions(-) 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 d06fb62f0..b7797fb52 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 @@ -192,6 +192,10 @@ private fun misc(provider: MatteryLanguageProvider) { gui("holo_screen.resize_text", "Resize text automatically") gui("holo_screen.do_not_resize_text", "Do not resize text") + gui("abc", "ABC") + gui("use_standard_font", "Use standard font") + gui("use_small_font", "Use small font") + gui("ticks", "Ticks") gui("power_cost_per_use", "Power cost per use: %s") 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 77d971421..0efb16145 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 @@ -202,6 +202,10 @@ private fun misc(provider: MatteryLanguageProvider) { gui("holo_screen.resize_text", "Изменять размер текста автоматически") gui("holo_screen.do_not_resize_text", "Не менять размер текста") + gui("abc", "АБВ") + gui("use_standard_font", "Использовать стандартный шрифт") + gui("use_small_font", "Использовать уменьшенный шрифт") + gui("ticks", "Тиков") gui("power_cost_per_use", "Энергии на операцию: %s") 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 index 02062bea9..748ec5811 100644 --- 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 @@ -61,6 +61,11 @@ class HoloSignBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryB access.accept(value) }).delegate + var smallerFont by syncher.boolean(false, setter = { access, value -> + setChanged() + access.accept(value) + }).delegate + var isLocked = false init { @@ -74,6 +79,7 @@ class HoloSignBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryB savetablesConfig.float(::textAlpha) savetablesConfig.bool(::textAutoScale) + savetablesConfig.bool(::smallerFont) } override fun createMenu(p_39954_: Int, p_39955_: Inventory, p_39956_: Player): AbstractContainerMenu { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt index b7f561691..ddc917ee3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/MatteryGUI.kt @@ -113,8 +113,9 @@ object MatteryGUI { event.registerAbove(VanillaGuiLayers.CAMERA_OVERLAYS, loc("android_low_power"), AndroidLowPowerLayer()) } - private val SMALL_FONT = loc("small") - private val SMALL_FONT_STYLE = Style.EMPTY.withFont(SMALL_FONT) + val SMALL_FONT = loc("small") + val SMALL_FONT_STYLE: Style = Style.EMPTY.withFont(SMALL_FONT) + val STANDARD_FONT_STYLE: Style = Style.EMPTY class AndroidEnergyBarLayer : LayeredDraw.Layer { override fun render( @@ -168,7 +169,7 @@ object MatteryGUI { val formattedPower = mattery.androidEnergy.batteryLevel.formatPower() val scale = if (ClientConfig.HUD.USE_SMALL_FONT) 1f else ClientConfig.HUD.BAR_TEXT_SCALE.toFloat() - guiGraphics.draw(formattedPower.withStyle(if (ClientConfig.HUD.USE_SMALL_FONT) SMALL_FONT_STYLE else Style.EMPTY), left + CHARGE_BG.width + 2f + scale, top + CHARGE_BG.height / 2f + scale, font = gui.font, scale = scale, gravity = RenderGravity.CENTER_LEFT, color = RGBAColor.FULL_POWER, drawOutline = true) + guiGraphics.draw(formattedPower.withStyle(if (ClientConfig.HUD.USE_SMALL_FONT) SMALL_FONT_STYLE else STANDARD_FONT_STYLE), left + CHARGE_BG.width + 2f + scale, top + CHARGE_BG.height / 2f + scale, font = gui.font, scale = scale, gravity = RenderGravity.CENTER_LEFT, color = RGBAColor.FULL_POWER, drawOutline = true) RenderSystem.disableBlend() RenderSystem.enableDepthTest() @@ -234,7 +235,7 @@ object MatteryGUI { formattedHealth = TextComponent("%d+%d/%d".format(ply.health.toInt(), ply.absorptionAmount.toInt(), ply.maxHealth.toInt())) val scale = if (ClientConfig.HUD.USE_SMALL_FONT) 1f else ClientConfig.HUD.BAR_TEXT_SCALE.toFloat() - guiGraphics.draw(formattedHealth.withStyle(if (ClientConfig.HUD.USE_SMALL_FONT) SMALL_FONT_STYLE else Style.EMPTY), left - 2f, top + HEALTH_BG.height / 2f + 1f * scale, scale = scale, gravity = RenderGravity.CENTER_RIGHT, color = getHealthColorForPlayer(ply), drawOutline = true) + guiGraphics.draw(formattedHealth.withStyle(if (ClientConfig.HUD.USE_SMALL_FONT) SMALL_FONT_STYLE else STANDARD_FONT_STYLE), left - 2f, top + HEALTH_BG.height / 2f + 1f * scale, scale = scale, gravity = RenderGravity.CENTER_RIGHT, color = getHealthColorForPlayer(ply), drawOutline = true) RenderSystem.disableBlend() RenderSystem.enableDepthTest() 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 index 7f343934b..9a242dac8 100644 --- 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 @@ -12,6 +12,9 @@ import ru.dbotthepony.mc.otm.client.render.draw import ru.dbotthepony.mc.otm.core.get import ru.dbotthepony.mc.otm.core.math.BlockRotationFreedom import ru.dbotthepony.kommons.math.RGBAColor +import ru.dbotthepony.mc.otm.client.MatteryGUI.SMALL_FONT_STYLE +import ru.dbotthepony.mc.otm.client.MatteryGUI.STANDARD_FONT_STYLE +import ru.dbotthepony.mc.otm.core.TextComponent import ru.dbotthepony.mc.otm.core.math.rotateWithBlockFacing class HoloSignRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer { @@ -42,8 +45,9 @@ class HoloSignRenderer(private val context: BlockEntityRendererProvider.Context) poseStack.scale(mul, mul, mul) } + val style = if (tile.smallerFont) SMALL_FONT_STYLE else STANDARD_FONT_STYLE for (line in lines) { - font.draw(poseStack = poseStack, buffer = bufferSource, text = line, gravity = RenderGravity.TOP_CENTER, y = y, color = RGBAColor(tile.textRed, tile.textGreen, tile.textBlue, tile.textAlpha)) + font.draw(poseStack = poseStack, buffer = bufferSource, text = TextComponent(line).withStyle(style), gravity = RenderGravity.TOP_CENTER, y = y, color = RGBAColor(tile.textRed, tile.textGreen, tile.textBlue, tile.textAlpha)) y += font.lineHeight + 2f } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/decorative/HoloSignScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/decorative/HoloSignScreen.kt index 95d1b597c..f82987077 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/decorative/HoloSignScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/decorative/HoloSignScreen.kt @@ -11,6 +11,8 @@ import ru.dbotthepony.mc.otm.client.screen.panels.input.NetworkedStringInputPane import ru.dbotthepony.mc.otm.core.TranslatableComponent import ru.dbotthepony.kommons.math.RGBAColor import ru.dbotthepony.mc.otm.block.entity.decorative.HoloSignBlockEntity +import ru.dbotthepony.mc.otm.client.MatteryGUI.SMALL_FONT_STYLE +import ru.dbotthepony.mc.otm.client.render.TextIcon import ru.dbotthepony.mc.otm.client.render.Widgets18 import ru.dbotthepony.mc.otm.client.screen.panels.button.BooleanButtonPanel import ru.dbotthepony.mc.otm.client.screen.panels.button.ButtonPanel @@ -84,6 +86,16 @@ class HoloSignScreen(menu: HoloSignMenu, inventory: Inventory, title: Component) tooltipInactive = TranslatableComponent("otm.gui.lock_holo_screen.unlocked") )) + controls.addButton(BooleanButtonPanel.square18( + this@HoloSignScreen, + frame, + prop = menu.smallerFont, + iconActive = TextIcon(font = font, text = TranslatableComponent("otm.gui.abc").withStyle(SMALL_FONT_STYLE)), + iconInactive = TextIcon(font = font, text = TranslatableComponent("otm.gui.abc")), + tooltipActive = TranslatableComponent("otm.gui.use_small_font"), + tooltipInactive = TranslatableComponent("otm.gui.use_standard_font") + )) + return frame } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/decorative/HoloSignMenu.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/decorative/HoloSignMenu.kt index d2c598c48..d31698c3b 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/menu/decorative/HoloSignMenu.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/menu/decorative/HoloSignMenu.kt @@ -24,6 +24,7 @@ class HoloSignMenu( val textBlue = FloatInputWithFeedback(this) val textAlpha = FloatInputWithFeedback(this) val textAutoScale = BooleanInputWithFeedback(this) + val smallerFont = BooleanInputWithFeedback(this) init { text.filter { it.isCreative || !locked.value } @@ -36,6 +37,7 @@ class HoloSignMenu( textAlpha.filter { it.isCreative || !locked.value } textAutoScale.filter { it.isCreative || !locked.value } + smallerFont.filter { it.isCreative || !locked.value } if (tile != null) { text.withConsumer { tile.signText = HoloSignBlockEntity.truncate(it, tile.isLocked) }.withSupplier(tile::signText) @@ -46,6 +48,7 @@ class HoloSignMenu( locked.with(tile::isLocked) redstone.with(tile.redstoneControl::redstoneSetting) textAutoScale.with(tile::textAutoScale) + smallerFont.with(tile::smallerFont) } } } From e8222216e0ae4dd0a8988dd42f5121b492d639e8 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 4 Mar 2025 22:41:58 +0300 Subject: [PATCH 14/29] =?UTF-8?q?=D0=B8=20=D0=BC=D0=B0=D1=81=D1=88=D1=82?= =?UTF-8?q?=D0=B0=D0=B1=20=D1=82=D0=BE=D0=B6=D0=B5=20=D0=BD=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=20=D1=81=D1=87=D0=B8=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=BD=D0=B0=D0=B4=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/client/render/blockentity/HoloSignRenderer.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 index 9a242dac8..999062414 100644 --- 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 @@ -4,6 +4,7 @@ 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.network.chat.MutableComponent import ru.dbotthepony.mc.otm.block.entity.decorative.HoloSignBlockEntity import ru.dbotthepony.mc.otm.client.font import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource @@ -34,7 +35,8 @@ class HoloSignRenderer(private val context: BlockEntityRendererProvider.Context) poseStack.translate(0.5f, 0.5f, 0.75f) poseStack.scale(0.01f, 0.01f, 0.01f) - val lines = tile.signText.split('\n') + val style = if (tile.smallerFont) SMALL_FONT_STYLE else STANDARD_FONT_STYLE + val lines: List = tile.signText.split('\n').map { TextComponent(it).withStyle(style) } val totalHeight = lines.size * font.lineHeight + (lines.size - 1) * 2f var y = -totalHeight / 2f @@ -45,9 +47,8 @@ class HoloSignRenderer(private val context: BlockEntityRendererProvider.Context) poseStack.scale(mul, mul, mul) } - val style = if (tile.smallerFont) SMALL_FONT_STYLE else STANDARD_FONT_STYLE for (line in lines) { - font.draw(poseStack = poseStack, buffer = bufferSource, text = TextComponent(line).withStyle(style), gravity = RenderGravity.TOP_CENTER, y = y, color = RGBAColor(tile.textRed, tile.textGreen, tile.textBlue, tile.textAlpha)) + font.draw(poseStack = poseStack, buffer = bufferSource, text = line, gravity = RenderGravity.TOP_CENTER, y = y, color = RGBAColor(tile.textRed, tile.textGreen, tile.textBlue, tile.textAlpha)) y += font.lineHeight + 2f } From 94289b9d2c7b10bf184dc363af9a421c5e77ab66 Mon Sep 17 00:00:00 2001 From: GearShocky Date: Wed, 5 Mar 2025 01:35:59 +0500 Subject: [PATCH 15/29] Adjustments --- .../mc/otm/datagen/loot/LootTablesChests.kt | 12 ++++++++++++ .../dbotthepony/mc/otm/item/weapon/FallingSunItem.kt | 4 ++-- .../models/item/withered_steel_sword_handheld.json | 11 +++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt index f0c645148..6be0eaff0 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt @@ -48,4 +48,16 @@ fun addChestLootTables(loot: LootTables) { setRolls(3) } } + + loot.builder(LootContextParamSets.CHEST, modLootTable("laboratory/supply")) { + lootPool { + item(Items.BREAD) { setCount(minimal = 2, maximal = 3) } + item(Items.HONEY_BOTTLE) { setCount(minimal = 1, maximal = 2) } + item(MItems.NUTRIENT_PASTE) { setCount(minimal = 2, maximal = 3) } + item(Items.SNOWBALL) { setCount(minimal = 1, maximal = 5) } + item(Items.PACKED_ICE) { setCount(minimal = 2, maximal = 3) } + + setRolls(3) + } + } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/FallingSunItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/FallingSunItem.kt index b9275fdff..6ba1ef311 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/FallingSunItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/weapon/FallingSunItem.kt @@ -49,14 +49,14 @@ class FallingSunItem : MatteryItem(Properties().stacksTo(1).rarity(Rarity.EPIC)) var builder = ItemAttributeModifiers.builder() builder.add(Attributes.ATTACK_DAMAGE, AttributeModifier(BASE_ATTACK_DAMAGE_ID, 13.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) - builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.2, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.4, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) builder.add(Attributes.SWEEPING_DAMAGE_RATIO, AttributeModifier(ResourceLocation(OverdriveThatMatters.MOD_ID, "energy_sword_sweeping_edge"), 1.0, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) chargedAttributes = builder.build() builder = ItemAttributeModifiers.builder() builder.add(Attributes.ATTACK_DAMAGE, AttributeModifier(BASE_ATTACK_DAMAGE_ID, 5.5, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) - builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.2, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) + builder.add(Attributes.ATTACK_SPEED, AttributeModifier(BASE_ATTACK_SPEED_ID, -3.4, AttributeModifier.Operation.ADD_VALUE), EquipmentSlotGroup.MAINHAND) dischargedAttributes = builder.build() } diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_handheld.json b/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_handheld.json index 75344b0cb..a0ff5fecf 100644 --- a/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_handheld.json +++ b/src/main/resources/assets/overdrive_that_matters/models/item/withered_steel_sword_handheld.json @@ -1,5 +1,4 @@ { - "credit": "Made with Blockbench", "parent": "minecraft:item/handheld", "textures": { "layer0": "overdrive_that_matters:item/withered_steel_sword_handheld" @@ -7,18 +6,18 @@ "display": { "thirdperson_righthand": { "rotation": [0, -90, 55], - "translation": [0, 4, 0.5], - "scale": [0.85, 0.85, 0.85] + "translation": [0, 5.75, 0.5], + "scale": [1, 1, 0.85] }, "thirdperson_lefthand": { "rotation": [0, 90, -55], - "translation": [0, 4, 0.5], - "scale": [0.85, 0.85, 0.85] + "translation": [0, 5.75, 0.5], + "scale": [1, 1, 0.85] }, "firstperson_righthand": { "rotation": [0, -90, 25], "translation": [1.13, 3.2, 1.13], - "scale": [0.68, 0.68, 0.68] + "scale": [0.74, 0.74, 0.68] }, "firstperson_lefthand": { "rotation": [0, 90, -25], From 43d2abe7e3ba58fbe430e08dd8eb5db9d0a684a8 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 4 Mar 2025 23:52:57 +0300 Subject: [PATCH 16/29] =?UTF-8?q?=D0=B0=20=D0=B4=D0=B0=D0=B2=D0=B0=D0=B9?= =?UTF-8?q?=D1=82=D0=B5=20=D0=BB=D1=83=D1=82=20=D1=82=D0=B0=D0=B1=D0=BB?= =?UTF-8?q?=D0=B8=D1=86=D1=8B=20=D0=B1=D1=83=D0=B4=D1=83=D1=82=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D1=82=D1=8C=20=D0=B2=20=D1=8F?= =?UTF-8?q?=D1=89=D0=B8=D0=BA=D0=B0=D1=85.=20=D1=81=D0=BE=D0=B3=D0=BB?= =?UTF-8?q?=D0=B0=D1=81=D0=BD=D1=8B=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/decorative/CargoCrateBlockEntity.kt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt index ec7e9a5ac..7c1cfcbda 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt @@ -5,8 +5,6 @@ import net.minecraft.core.BlockPos import net.minecraft.core.HolderLookup import net.minecraft.core.registries.Registries import net.minecraft.nbt.CompoundTag -import net.minecraft.nbt.LongTag -import net.minecraft.nbt.StringTag import net.minecraft.network.chat.Component import net.minecraft.resources.ResourceKey import net.minecraft.resources.ResourceLocation @@ -33,8 +31,6 @@ import ru.dbotthepony.mc.otm.block.entity.MatteryDeviceBlockEntity import ru.dbotthepony.mc.otm.container.MatteryContainer import ru.dbotthepony.mc.otm.container.HandlerFilter import ru.dbotthepony.mc.otm.core.TranslatableComponent -import ru.dbotthepony.mc.otm.core.nbt.map -import ru.dbotthepony.mc.otm.core.nbt.set import ru.dbotthepony.mc.otm.core.otmRandom import ru.dbotthepony.mc.otm.menu.decorative.CargoCrateMenu import ru.dbotthepony.mc.otm.registry.game.MBlockEntities @@ -95,14 +91,20 @@ class CargoCrateBlockEntity( override fun saveLevel(nbt: CompoundTag, registry: HolderLookup.Provider) { super.saveLevel(nbt, registry) - lootTable?.let { nbt[LOOT_TABLE_KEY] = it.toString() } - lootTableSeed?.let { nbt[LOOT_TABLE_SEED_KEY] = it } + + if (lootTable != null) { + nbt.putString(LOOT_TABLE_KEY, lootTable!!.location().toString()) + nbt.putLong(LOOT_TABLE_SEED_KEY, lootTableSeed ?: 0L) + } } override fun loadAdditional(nbt: CompoundTag, registry: HolderLookup.Provider) { super.loadAdditional(nbt, registry) - lootTable = nbt.map(LOOT_TABLE_KEY) { it: StringTag -> ResourceLocation.tryParse(it.asString)?.let { ResourceKey.create(Registries.LOOT_TABLE, it) } } - lootTableSeed = (nbt[LOOT_TABLE_SEED_KEY] as LongTag?)?.asLong + + if (nbt.contains(LOOT_TABLE_KEY, 8)) { + lootTable = ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(nbt.getString(LOOT_TABLE_KEY))) + lootTableSeed = if (nbt.contains(LOOT_TABLE_SEED_KEY, 4)) nbt.getLong(LOOT_TABLE_SEED_KEY) else 0L + } } fun unpackLootTable(ply: Player? = null) { From 4187e7818e6bd21d1bcf9cc8e87afbaabfc277e7 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Tue, 4 Mar 2025 23:57:19 +0300 Subject: [PATCH 17/29] =?UTF-8?q?=D1=82=D0=BE=D0=B3=D0=B4=D0=B0=20=D1=83?= =?UTF-8?q?=D0=B6=20=D0=B8=20=D1=82=D0=B8=D0=BF=D1=8B=20=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=B4=D0=B0=D0=B2?= =?UTF-8?q?=D0=B0=D0=B9=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt index 7c1cfcbda..56919c367 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt @@ -5,6 +5,7 @@ import net.minecraft.core.BlockPos import net.minecraft.core.HolderLookup import net.minecraft.core.registries.Registries import net.minecraft.nbt.CompoundTag +import net.minecraft.nbt.Tag import net.minecraft.network.chat.Component import net.minecraft.resources.ResourceKey import net.minecraft.resources.ResourceLocation @@ -101,9 +102,9 @@ class CargoCrateBlockEntity( override fun loadAdditional(nbt: CompoundTag, registry: HolderLookup.Provider) { super.loadAdditional(nbt, registry) - if (nbt.contains(LOOT_TABLE_KEY, 8)) { + if (nbt.contains(LOOT_TABLE_KEY, Tag.TAG_STRING.toInt())) { lootTable = ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(nbt.getString(LOOT_TABLE_KEY))) - lootTableSeed = if (nbt.contains(LOOT_TABLE_SEED_KEY, 4)) nbt.getLong(LOOT_TABLE_SEED_KEY) else 0L + lootTableSeed = if (nbt.contains(LOOT_TABLE_SEED_KEY, Tag.TAG_LONG.toInt())) nbt.getLong(LOOT_TABLE_SEED_KEY) else 0L } } From d31922e3318b6991d0cb699addcd7993e6eefe5e Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Wed, 5 Mar 2025 00:33:51 +0300 Subject: [PATCH 18/29] =?UTF-8?q?=D0=B2=D1=8B=20=D0=BC=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=BD=D0=B5=20=D0=B4=D0=BE=D0=B2=D0=B5=D1=80=D1=8F=D0=B5=D1=82?= =?UTF-8?q?=D0=B5,=20=D0=90=20=D0=AF=20=D0=92=D0=90=D0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt index 56919c367..af0ef7c1c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt @@ -103,7 +103,7 @@ class CargoCrateBlockEntity( super.loadAdditional(nbt, registry) if (nbt.contains(LOOT_TABLE_KEY, Tag.TAG_STRING.toInt())) { - lootTable = ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.parse(nbt.getString(LOOT_TABLE_KEY))) + lootTable = ResourceKey.create(Registries.LOOT_TABLE, ResourceLocation.tryParse(nbt.getString(LOOT_TABLE_KEY))) lootTableSeed = if (nbt.contains(LOOT_TABLE_SEED_KEY, Tag.TAG_LONG.toInt())) nbt.getLong(LOOT_TABLE_SEED_KEY) else 0L } } From f5036e62209c077771df765dff035ec241d2407e Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Wed, 5 Mar 2025 00:36:54 +0300 Subject: [PATCH 19/29] unempty --- .../structure/field_research_pod.nbt | Bin 3625 -> 3679 bytes .../structure/field_research_pod_ruin.nbt | Bin 1578 -> 1551 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/data/overdrive_that_matters/structure/field_research_pod.nbt b/src/main/resources/data/overdrive_that_matters/structure/field_research_pod.nbt index 6de764a874ab9b7265b57242b3b4a69fac327ece..46b6c9cc33c7e6baa4a5bc84f3e3b9c8a150414c 100644 GIT binary patch literal 3679 zcmah~2~<;88WvJnH0hx`t9?9K4f1oz-K?NN^f0)AKs2_s>HP1IBs}P!6LFc7r3=b7qd$9rG9%*2y}W zA3H7^kquqSN`Go+#Jk-2o$i?jC#?&~QT;`aF02n|XuUalj?GQYaLhW<$FmkaGV$AS zt_{z=>T^g?Du$k*4u%*cztGS+CrM2!t-oBgcr>ZBsI;YKn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)yx={p}|Lx(=)y!Nb5wUy@=<7>9=cY2UBGtDhZoP9{6|HBQ* z3GIvA(uM20Ig+_~=J}^q!)GT>)Bs5`Lk(i%-Z%QTxj#sB)-Am3)%WqYMjIw@vPt?X zXN%gO`_$}jDInJQ)K$`sM%S1(E|;BP_wBgZ+U?fGS~erpZa~+FbBp$ioB7D%WzoKh znNQ6bgh*=61_|@nn`GaMp8{#+ZbkKJWdm)WG6qA?D6yBC6#rOX`;PG1wQqxQ29vgD z-74EhY)fustgYb6U%QH4JxAk2^@r=Ww$GJ@PG)LVY8`E^mz&=}pxp$@Ir#RA1n>2- z!3$5_o(H|r)p#6Gs2?BVHhp!#{ch8&!$9gpxy6~J#*5-u>XVM1p`HcFnWUUW`OYb6 zKe3-Y61$=@CAGGbh{X~OOL>A@-_8xX#cv~R$3OCIotHagLFMOnwaHFQTb~??=uC}T Gv*zDW2TVf% diff --git a/src/main/resources/data/overdrive_that_matters/structure/field_research_pod_ruin.nbt b/src/main/resources/data/overdrive_that_matters/structure/field_research_pod_ruin.nbt index 57947deee3e16e24a090bb5137fb84cce8824620..7833a71bad705b042ffa58dc303919963ddae501 100644 GIT binary patch literal 1551 zcmZvbeKga19LJOHRcO`4F*jM=YQvPDEtjylM+upSAw+lldP1J+%wvqhZ4-%b(~n4L zw#3DdXDxpBqGPxrkJnSnc1&5t=5gHB?c8%Z^*!%DzUTG%exA=4bz|$MPiG^4q$`wv z9QpmbfVExmtj+}N54M*l6K_pc+Dz7M-m*000xH0Y)#cp6~@Qn z62VXSNVMG`d7dN;_uY&`A+z;VJJlH%lwlkl%xSG4fu1bDz*UY(#lY@NkHU^`8o%^$ zwf^k$CH_CuC!8CNlZ<)Wm9zf~|IMe;tI9CNiE91r!aw)pF*P%v`E~an$)ZmY+tQvf z#)T`^pMBP9Br;;->3i)vV%qK*S@um~UAAfr_X7Xu;fYmCEZ7b72(=9$H;}m)?_MRr zm#akyn$F9|oxBa>x>L;o?F?l?Q8+M;wG<9Bra6fxUz#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I0e YEi_dXqKSl2`l^;w)tHgjel4xP0Y3jF(EtDd From 5956b5d76f092872d693737d5808ff582dc87fc4 Mon Sep 17 00:00:00 2001 From: GearShocky Date: Wed, 5 Mar 2025 05:59:10 +0500 Subject: [PATCH 20/29] a --- .../ru/dbotthepony/mc/otm/datagen/DataGen.kt | 1 + .../mc/otm/datagen/loot/EntityLoot.kt | 21 +++++ .../mc/otm/datagen/loot/LootTablesChests.kt | 73 ++++++++++++++++-- .../datagen/models/MatteryModelProvider.kt | 2 +- .../ru/dbotthepony/mc/otm/entity/Loader.kt | 10 +++ .../mc/otm/registry/game/MBlocks.kt | 3 +- .../textures/item/component/rogue_ai_core.png | Bin 0 -> 571 bytes 7 files changed, 103 insertions(+), 7 deletions(-) create mode 100644 src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/EntityLoot.kt create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/component/rogue_ai_core.png diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt index da93af5c8..206133507 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -585,6 +585,7 @@ object DataGen { addDecorativeLoot(lootTableProvider) addAdvancementLoot(lootTableProvider) addVaultLoot(lootTableProvider) + addEntityLoot(lootTableProvider) addChestLootTables(lootTableProvider) recipeProvider.exec { _, consumer -> diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/EntityLoot.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/EntityLoot.kt new file mode 100644 index 000000000..16ce1b445 --- /dev/null +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/EntityLoot.kt @@ -0,0 +1,21 @@ +package ru.dbotthepony.mc.otm.datagen.loot + +import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets +import ru.dbotthepony.mc.otm.datagen.modLootTable +import ru.dbotthepony.mc.otm.registry.game.MItems + +fun addEntityLoot(loot: LootTables) { + loot.builder(LootContextParamSets.ENTITY, modLootTable("entities/loader")) { + lootPool { + item(MItems.MECHANICAL_PARTS) { + setCount(1, 3) + setWeight(7) + } + item(MItems.ELECTRIC_PARTS) { + setCount(1, 1) + setWeight(1) + } + setRolls(1) + } + } +} diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt index 6be0eaff0..29b378bf5 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesChests.kt @@ -1,8 +1,14 @@ package ru.dbotthepony.mc.otm.datagen.loot +import net.minecraft.util.valueproviders.UniformInt import net.minecraft.world.item.Items import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets +import ru.dbotthepony.mc.otm.core.math.Decimal +import ru.dbotthepony.mc.otm.data.world.UniformDecimal import ru.dbotthepony.mc.otm.datagen.modLootTable +import ru.dbotthepony.mc.otm.item.ProceduralBatteryItem +import ru.dbotthepony.mc.otm.item.exopack.ProceduralExopackSlotUpgradeItem +import ru.dbotthepony.mc.otm.item.matter.MatterDustItem import ru.dbotthepony.mc.otm.registry.game.MItems fun addChestLootTables(loot: LootTables) { @@ -28,24 +34,72 @@ fun addChestLootTables(loot: LootTables) { item(Items.COPPER_INGOT) { setCount(minimal = 1, maximal = 3) } item(Items.EXPOSED_COPPER) { setCount(minimal = 1, maximal = 2) } - setRolls(3) + item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) { + chanceCondition(0.1) + setWeight(1) + apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(1, 9), UniformInt.of(0, 3))) + } + + setRolls(7) } } loot.builder(LootContextParamSets.CHEST, modLootTable("frigate_cargo")) { lootPool { - item(Items.IRON_INGOT) { setCount(minimal = 1, maximal = 3) } + item(Items.IRON_INGOT) { + setCount(minimal = 1, maximal = 3) + setWeight(3) + } item(Items.GOLD_INGOT) { setCount(minimal = 1, maximal = 3) } item(Items.EMERALD) { setCount(minimal = 1, maximal = 3) } item(MItems.TRITANIUM_INGOT) { setCount(minimal = 1, maximal = 3) } - item(MItems.MECHANICAL_PARTS) { setCount(minimal = 2, maximal = 3) } + item(MItems.MECHANICAL_PARTS) { + setCount(minimal = 2, maximal = 3) + setWeight(2) + } item(MItems.CIRCUIT_PLATING) { setCount(minimal = 2, maximal = 3) } + item(MItems.ENERGY_BUS) { setCount(minimal = 0, maximal = 2) } + item(MItems.ROFLITE_ALLOY_INGOT) { setCount(minimal = 0, maximal = 3) } + item(MItems.WITHERED_STEEL) { setCount(minimal = 0, maximal = 3) } item(Items.SADDLE) { setCount(minimal = 0, maximal = 1) } item(Items.DIAMOND) { setCount(minimal = 0, maximal = 3) } - setRolls(3) + item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) { + chanceCondition(0.2) + setWeight(3) + apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(1, 9), UniformInt.of(0, 3))) + } + item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) { + chanceCondition(0.1) + setWeight(2) + apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(9, 18), UniformInt.of(0, 3))) + } + + item(MItems.PROCEDURAL_BATTERY) { + chanceCondition(0.05) + setWeight(1) + apply( + ProceduralBatteryItem.Randomizer( + maxBatteryLevel = UniformDecimal(Decimal(10_000_000), Decimal(50_000_000)), + batteryLevel = UniformDecimal(Decimal(0), Decimal(25_000_000)), + maxInput = UniformDecimal(Decimal(1_000), Decimal(5_000)), + )) + } + + item(MItems.ZPM_BATTERY) { + chanceCondition(0.001) + setWeight(1) + } + + item(MItems.MATTER_DUST) { + chanceCondition(0.1) + setWeight(4) + apply(MatterDustItem.Randomizer(UniformDecimal(Decimal(100), Decimal(2_500)))) + } + + setRolls(12) } } @@ -57,7 +111,16 @@ fun addChestLootTables(loot: LootTables) { item(Items.SNOWBALL) { setCount(minimal = 1, maximal = 5) } item(Items.PACKED_ICE) { setCount(minimal = 2, maximal = 3) } - setRolls(3) + setRolls(7) + } + } + + loot.builder(LootContextParamSets.CHEST, modLootTable("laboratory/reward")) { + lootPool { + item(MItems.NUTRIENT_PASTE) { setCount(minimal = 2, maximal = 3) } + + + setRolls(5) } } } diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt index 29d81d18d..c86b884e0 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt @@ -2,6 +2,7 @@ package ru.dbotthepony.mc.otm.datagen.models import net.minecraft.world.item.DyeColor import net.minecraft.world.level.block.Block +import net.minecraft.world.level.block.WaterloggedTransparentBlock import net.neoforged.neoforge.client.model.generators.BlockModelProvider import net.neoforged.neoforge.data.event.GatherDataEvent import ru.dbotthepony.mc.otm.datagen.DataGen @@ -81,7 +82,6 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve } } } - fun decorativeCubeAll(subdir: String, vararg blocks: Block) { for (block in blocks) { exec { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Loader.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Loader.kt index 0a6418b46..38ecf9013 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Loader.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/Loader.kt @@ -3,6 +3,10 @@ package ru.dbotthepony.mc.otm.entity import net.minecraft.network.syncher.EntityDataAccessor import net.minecraft.network.syncher.EntityDataSerializers import net.minecraft.network.syncher.SynchedEntityData +import net.minecraft.resources.ResourceKey +import net.minecraft.core.registries.Registries +import ru.dbotthepony.mc.otm.core.ResourceLocation +import net.minecraft.world.level.storage.loot.LootTable import net.minecraft.sounds.SoundEvent import net.minecraft.sounds.SoundEvents import net.minecraft.world.entity.AnimationState @@ -21,6 +25,7 @@ import net.minecraft.world.entity.ai.navigation.PathNavigation import net.minecraft.world.entity.monster.Monster import net.minecraft.world.entity.player.Player import net.minecraft.world.level.Level +import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.registry.game.MSoundEvents @@ -100,6 +105,11 @@ class Loader(type: EntityType, level: Level) : Monster(type, level) { return success } + override fun getDefaultLootTable(): ResourceKey { + return ResourceKey.create(Registries.LOOT_TABLE, + ResourceLocation(OverdriveThatMatters.MOD_ID, "entities/loader")) + } + override fun aiStep() { super.aiStep() diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MBlocks.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MBlocks.kt index a3f6b5689..9e4399b47 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MBlocks.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MBlocks.kt @@ -18,6 +18,7 @@ import net.minecraft.world.level.block.SoundType import net.minecraft.world.level.block.StairBlock import net.minecraft.world.level.block.TransparentBlock import net.minecraft.world.level.block.WallBlock +import net.minecraft.world.level.block.WaterloggedTransparentBlock import net.minecraft.world.level.block.state.BlockBehaviour import net.minecraft.world.level.block.state.properties.BlockStateProperties import net.minecraft.world.level.block.state.properties.NoteBlockInstrument @@ -266,7 +267,7 @@ object MBlocks { } val METAL_MESH: Block by registry.register(MNames.METAL_MESH) { - TransparentBlock(BlockBehaviour.Properties.of() + WaterloggedTransparentBlock(BlockBehaviour.Properties.of() .mapColor(MapColor.COLOR_GRAY) .noOcclusion() .sound(SoundType.COPPER_GRATE) diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/component/rogue_ai_core.png b/src/main/resources/assets/overdrive_that_matters/textures/item/component/rogue_ai_core.png new file mode 100644 index 0000000000000000000000000000000000000000..71eb0d3f6eb3ab3869298b51ec7d5e330929c433 GIT binary patch literal 571 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}}0G|+7F)^{YxVW1)Z?0IeqN%A#TU)zbS9iOeU0v1f)bug8YL2V*w1>H)~%36>t`KL>4nJ z@a+d-Mhn(p6`-I*iEBhjaDG}zd16s2LqK9?UWuNcYlwoWo}r%6?>)@hfNHj-MtG)q zdTKFn06DA-QjDw&j6jwb5KBYZAfIb6GK0mLfNVoXCU8hZ0oj@DEMW00AR7dF%NQA6 z00Rg{qgl!Tl$yZKzyefhU}S8-xBy}*$VS!$5R;|=*&x6KG?xjiGRV>b$b#xJG%x_k zcJkkKu4CIH3}n`Mx;Tbt1jn9x%Xe6TgEc_#!n(C9*1rG0=5g}bX&(<4_%ltq7GJBV z`re))OpkGbvC#BICmD^BLT|<~HcTr|vMXag@jO$q;qpR;D=tz(6C6V`F14GS=L_Pc&sV< Date: Wed, 5 Mar 2025 07:58:48 +0700 Subject: [PATCH 21/29] Initialize carry using lcg instead of modulo divide seed --- .../kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt index d37b80c50..bad5a002d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt @@ -22,8 +22,6 @@ class CMWCRandom(seed: Long = System.nanoTime()) : RandomGenerator, RandomSource override fun setSeed(seed: Long) { this.seed = seed - carry = Integer.remainderUnsigned(seed.toInt(), CMWC_CARRY_MAX) - var lcg = seed // init state with regular LCG produced values @@ -32,6 +30,11 @@ class CMWCRandom(seed: Long = System.nanoTime()) : RandomGenerator, RandomSource state[i] = lcg.ushr(32).toInt() } + do { + lcg = lcg * 6364136223846793005 + 1442695040888963407 + carry = lcg.ushr(32).toInt() + } while(carry !in 0 until CMWC_CARRY_MAX) + stateIndex = state.size - 1 gaussian.reset() } From e03d9b1a742a0ff36526fc21ce2241a131321bf7 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 08:36:24 +0700 Subject: [PATCH 22/29] Provide LCG64 implementation as separate class --- .../mc/otm/core/util/CMWCRandom.kt | 8 +- .../mc/otm/core/util/LCG64Random.kt | 86 +++++++++++++++++++ 2 files changed, 89 insertions(+), 5 deletions(-) create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt index bad5a002d..e21285761 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt @@ -22,17 +22,15 @@ class CMWCRandom(seed: Long = System.nanoTime()) : RandomGenerator, RandomSource override fun setSeed(seed: Long) { this.seed = seed - var lcg = seed + val rng = LCG64Random(seed) // init state with regular LCG produced values for (i in 1 until state.size) { - lcg = lcg * 6364136223846793005 + 1442695040888963407 - state[i] = lcg.ushr(32).toInt() + state[i] = rng.nextInt() } do { - lcg = lcg * 6364136223846793005 + 1442695040888963407 - carry = lcg.ushr(32).toInt() + carry = rng.nextInt() } while(carry !in 0 until CMWC_CARRY_MAX) stateIndex = state.size - 1 diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt new file mode 100644 index 000000000..271b8a6a9 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt @@ -0,0 +1,86 @@ +package ru.dbotthepony.mc.otm.core.util + +import net.minecraft.util.Mth +import net.minecraft.util.RandomSource +import net.minecraft.world.level.levelgen.MarsagliaPolarGaussian +import net.minecraft.world.level.levelgen.PositionalRandomFactory +import java.lang.StringBuilder +import java.util.random.RandomGenerator + +// different from LegacyRandomSource minecraft uses in meaning that this class use different constants +// and always use upper 32 bits instead of implementing BitRandomSource +// AND it uses all bits from provided seed +class LCG64Random(private var seed: Long = System.nanoTime()) : RandomGenerator, RandomSource { + private val gaussian = MarsagliaPolarGaussian(this) + + override fun setSeed(seed: Long) { + this.seed = seed + gaussian.reset() + } + + override fun nextInt(): Int { + this.seed = MULTIPLIER * this.seed + INCREMENT + return this.seed.ushr(32).toInt() + } + + override fun nextLong(): Long { + val a = nextInt().toLong() and 0xFFFFFFFFL + val b = nextInt().toLong() and 0xFFFFFFFFL + return a.shl(32) or b + } + + override fun nextInt(bound: Int): Int { + return super.nextInt(bound) + } + + override fun nextInt(origin: Int, bound: Int): Int { + return super.nextInt(origin, bound) + } + + override fun nextBoolean(): Boolean { + return super.nextBoolean() + } + + override fun nextFloat(): Float { + return super.nextFloat() + } + + override fun nextDouble(): Double { + return super.nextDouble() + } + + override fun nextGaussian(): Double { + return gaussian.nextGaussian() + } + + override fun fork(): RandomSource { + return LCG64Random(nextLong()) + } + + override fun forkPositional(): PositionalRandomFactory { + return Positional(nextLong()) + } + + class Positional(val seed: Long) : PositionalRandomFactory { + override fun at(x: Int, y: Int, z: Int): RandomSource { + return LCG64Random(Mth.getSeed(x, y, z).xor(seed)) + } + + override fun fromHashOf(name: String): RandomSource { + return LCG64Random(name.hashCode().toLong().xor(seed)) + } + + override fun fromSeed(seed: Long): RandomSource { + return LCG64Random(seed) + } + + override fun parityConfigString(builder: StringBuilder) { + throw UnsupportedOperationException() + } + } + + companion object { + const val MULTIPLIER = 6364136223846793005 + const val INCREMENT = 1442695040888963407 + } +} From 6c087a278d7aa0b391bea0c0c938e984b7fae8dc Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 08:38:07 +0700 Subject: [PATCH 23/29] Don't store seed since it is of no use --- src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt index e21285761..a41a68b54 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt @@ -13,15 +13,11 @@ class CMWCRandom(seed: Long = System.nanoTime()) : RandomGenerator, RandomSource private var stateIndex = 0 private val gaussian = MarsagliaPolarGaussian(this) - var seed: Long = seed - private set - init { setSeed(seed) } override fun setSeed(seed: Long) { - this.seed = seed val rng = LCG64Random(seed) // init state with regular LCG produced values From 49f76c7bddad53dda407c3dfd577eafacdaa7061 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 09:06:44 +0700 Subject: [PATCH 24/29] Provide Xoshiro256StarStar random --- .../mc/otm/core/util/Xoshiro256SSRandom.kt | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt new file mode 100644 index 000000000..e14e7ed02 --- /dev/null +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt @@ -0,0 +1,110 @@ +package ru.dbotthepony.mc.otm.core.util + +import it.unimi.dsi.fastutil.HashCommon +import net.minecraft.util.Mth +import net.minecraft.util.RandomSource +import net.minecraft.world.level.levelgen.MarsagliaPolarGaussian +import net.minecraft.world.level.levelgen.PositionalRandomFactory +import java.lang.StringBuilder +import java.util.random.RandomGenerator + +class Xoshiro256SSRandom( + private var s0: Long, + private var s1: Long, + private var s2: Long, + private var s3: Long, +) : RandomGenerator, RandomSource { + private val gaussian = MarsagliaPolarGaussian(this) + + constructor(seed: Long = System.nanoTime()) : this(1L, 2L, 3L, 4L) { + setSeed(seed) + } + + override fun setSeed(seed: Long) { + val rng = LCG64Random(seed) + s0 = rng.nextLong() + s1 = rng.nextLong() + s2 = rng.nextLong() + s3 = rng.nextLong() + gaussian.reset() + } + + override fun nextInt(): Int { + // sample upper bits + return nextLong().ushr(32).toInt() + } + + override fun nextLong(): Long { + val result = (s1 * 5).rotateLeft(7) * 9 + val t = s1.shl(17) + s2 = s2.xor(s0) + s3 = s3.xor(s1) + s1 = s1.xor(s2) + s0 = s0.xor(s3) + s2 = s2.xor(t) + s3 = s3.rotateLeft(45) + return result + } + + override fun nextInt(bound: Int): Int { + return super.nextInt(bound) + } + + override fun nextInt(origin: Int, bound: Int): Int { + return super.nextInt(origin, bound) + } + + override fun nextBoolean(): Boolean { + return super.nextBoolean() + } + + override fun nextFloat(): Float { + return super.nextFloat() + } + + override fun nextDouble(): Double { + return super.nextDouble() + } + + override fun nextGaussian(): Double { + return gaussian.nextGaussian() + } + + override fun fork(): RandomSource { + return Xoshiro256SSRandom(nextLong(), nextLong(), nextLong(), nextLong()) + } + + override fun forkPositional(): PositionalRandomFactory { + return Positional(nextLong(), nextLong(), nextLong(), nextLong()) + } + + class Positional( + val s0: Long, + val s1: Long, + val s2: Long, + val s3: Long, + ) : PositionalRandomFactory { + override fun at(x: Int, y: Int, z: Int): RandomSource { + val rng = LCG64Random(Mth.getSeed(x, y, z)) + + return Xoshiro256SSRandom( + s0.rotateLeft(11).xor(rng.nextLong()), + s1.rotateLeft(22).xor(rng.nextLong()), + s2.rotateLeft(33).xor(rng.nextLong()), + s3.rotateLeft(44).xor(rng.nextLong()), + ) + } + + override fun fromHashOf(name: String): RandomSource { + return Xoshiro256SSRandom(s0, HashCommon.murmurHash3(name.hashCode().toLong()).xor(s1), s2, s3) + } + + override fun fromSeed(seed: Long): RandomSource { + return Xoshiro256SSRandom(seed) + } + + override fun parityConfigString(builder: StringBuilder) { + throw UnsupportedOperationException() + } + } +} From f19804dd4a661cf762e179257152beb71e08013d Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 09:08:33 +0700 Subject: [PATCH 25/29] Provide better random seeds for random number generators --- .../kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt | 3 ++- .../kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt | 3 ++- .../ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt index a41a68b54..767637340 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt @@ -4,10 +4,11 @@ import net.minecraft.util.Mth import net.minecraft.util.RandomSource import net.minecraft.world.level.levelgen.MarsagliaPolarGaussian import net.minecraft.world.level.levelgen.PositionalRandomFactory +import net.minecraft.world.level.levelgen.RandomSupport import java.lang.StringBuilder import java.util.random.RandomGenerator -class CMWCRandom(seed: Long = System.nanoTime()) : RandomGenerator, RandomSource { +class CMWCRandom(seed: Long = RandomSupport.generateUniqueSeed()) : RandomGenerator, RandomSource { private val state = IntArray(CMWC_STATE_SIZE) private var carry = 0 private var stateIndex = 0 diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt index 271b8a6a9..7cac69c0d 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt @@ -4,13 +4,14 @@ import net.minecraft.util.Mth import net.minecraft.util.RandomSource import net.minecraft.world.level.levelgen.MarsagliaPolarGaussian import net.minecraft.world.level.levelgen.PositionalRandomFactory +import net.minecraft.world.level.levelgen.RandomSupport import java.lang.StringBuilder import java.util.random.RandomGenerator // different from LegacyRandomSource minecraft uses in meaning that this class use different constants // and always use upper 32 bits instead of implementing BitRandomSource // AND it uses all bits from provided seed -class LCG64Random(private var seed: Long = System.nanoTime()) : RandomGenerator, RandomSource { +class LCG64Random(private var seed: Long = RandomSupport.generateUniqueSeed()) : RandomGenerator, RandomSource { private val gaussian = MarsagliaPolarGaussian(this) override fun setSeed(seed: Long) { diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt index e14e7ed02..472c89b27 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt @@ -5,6 +5,7 @@ import net.minecraft.util.Mth import net.minecraft.util.RandomSource import net.minecraft.world.level.levelgen.MarsagliaPolarGaussian import net.minecraft.world.level.levelgen.PositionalRandomFactory +import net.minecraft.world.level.levelgen.RandomSupport import java.lang.StringBuilder import java.util.random.RandomGenerator @@ -16,10 +17,12 @@ class Xoshiro256SSRandom( ) : RandomGenerator, RandomSource { private val gaussian = MarsagliaPolarGaussian(this) - constructor(seed: Long = System.nanoTime()) : this(1L, 2L, 3L, 4L) { + constructor(seed: Long) : this(1L, 2L, 3L, 4L) { setSeed(seed) } + constructor() : this(RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed()) + override fun setSeed(seed: Long) { val rng = LCG64Random(seed) s0 = rng.nextLong() From 1a52864c4e97493444835cdc605f3f6f9c935d02 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 09:31:28 +0700 Subject: [PATCH 26/29] Throw an exception when xoshiro seed is completely zero --- .../dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt index 472c89b27..8f368e7e6 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt @@ -17,6 +17,15 @@ class Xoshiro256SSRandom( ) : RandomGenerator, RandomSource { private val gaussian = MarsagliaPolarGaussian(this) + init { + require( + s0 != 0L || + s1 != 0L || + s2 != 0L || + s3 != 0L + ) { "Xoshiro can't operate with seed being entirely zero" } + } + constructor(seed: Long) : this(1L, 2L, 3L, 4L) { setSeed(seed) } From b8291c7e1c060f4995e005ec769e5905e3703c31 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 09:34:14 +0700 Subject: [PATCH 27/29] Proper Xoshiro256 initialization with 256 bit seed --- .../mc/otm/core/util/Xoshiro256SSRandom.kt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt index 8f368e7e6..492db9761 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt @@ -9,11 +9,12 @@ import net.minecraft.world.level.levelgen.RandomSupport import java.lang.StringBuilder import java.util.random.RandomGenerator -class Xoshiro256SSRandom( +class Xoshiro256SSRandom private constructor( private var s0: Long, private var s1: Long, private var s2: Long, private var s3: Long, + marker: Nothing? ) : RandomGenerator, RandomSource { private val gaussian = MarsagliaPolarGaussian(this) @@ -26,11 +27,17 @@ class Xoshiro256SSRandom( ) { "Xoshiro can't operate with seed being entirely zero" } } - constructor(seed: Long) : this(1L, 2L, 3L, 4L) { + constructor(s0: Long, s1: Long, s2: Long, s3: Long) : this(s0, s1, s2, s3, null) { + // discard some values so generator can get going if provided seed was "weak" + for (i in 0 until 32) + nextLong() + } + + constructor(seed: Long) : this(1L, 2L, 3L, 4L, null) { setSeed(seed) } - constructor() : this(RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed()) + constructor() : this(RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed(), RandomSupport.generateUniqueSeed(), null) override fun setSeed(seed: Long) { val rng = LCG64Random(seed) From 95f1a304c981aa642b88a76077a245db1d6e9927 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 09:41:53 +0700 Subject: [PATCH 28/29] Provide docs for random number generators --- .../ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt | 3 +++ .../ru/dbotthepony/mc/otm/core/util/LCG64Random.kt | 14 +++++++++++--- .../mc/otm/core/util/Xoshiro256SSRandom.kt | 3 +++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt index 767637340..16d885b7e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/CMWCRandom.kt @@ -8,6 +8,9 @@ import net.minecraft.world.level.levelgen.RandomSupport import java.lang.StringBuilder import java.util.random.RandomGenerator +/** + * Random number generator with insane period of at least 2^511 + */ class CMWCRandom(seed: Long = RandomSupport.generateUniqueSeed()) : RandomGenerator, RandomSource { private val state = IntArray(CMWC_STATE_SIZE) private var carry = 0 diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt index 7cac69c0d..d6edf5afc 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/LCG64Random.kt @@ -2,15 +2,23 @@ package ru.dbotthepony.mc.otm.core.util import net.minecraft.util.Mth import net.minecraft.util.RandomSource +import net.minecraft.world.level.levelgen.LegacyRandomSource import net.minecraft.world.level.levelgen.MarsagliaPolarGaussian import net.minecraft.world.level.levelgen.PositionalRandomFactory import net.minecraft.world.level.levelgen.RandomSupport import java.lang.StringBuilder import java.util.random.RandomGenerator -// different from LegacyRandomSource minecraft uses in meaning that this class use different constants -// and always use upper 32 bits instead of implementing BitRandomSource -// AND it uses all bits from provided seed +/** + * Simple and insanely fast random number generator, which can be used for seeding (initializing internal state) of other number generators. + * + * While can be used on its own, it probably shouldn't. + * + * Differs from [LegacyRandomSource] (also LCG, created by [RandomSource.create]) Minecraft uses in: + * * Different constants (with supposedly/expected better statistical properties) + * * Always use upper 32 bits instead of implementing BitRandomSource and sampling some upper bits + * * Uses all bits from provided seed + */ class LCG64Random(private var seed: Long = RandomSupport.generateUniqueSeed()) : RandomGenerator, RandomSource { private val gaussian = MarsagliaPolarGaussian(this) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt index 492db9761..99438ed72 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/util/Xoshiro256SSRandom.kt @@ -9,6 +9,9 @@ import net.minecraft.world.level.levelgen.RandomSupport import java.lang.StringBuilder import java.util.random.RandomGenerator +/** + * Excellent number generator with guaranteed period of 2^255 + */ class Xoshiro256SSRandom private constructor( private var s0: Long, private var s1: Long, From 991314c07b7d1f4fcb016c8ef971775f971a5434 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Wed, 5 Mar 2025 09:44:02 +0700 Subject: [PATCH 29/29] Use Xoshiro256SSRandom instead of CMWC for OTM provided level random --- src/main/java/ru/dbotthepony/mc/otm/mixin/LevelMixin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/dbotthepony/mc/otm/mixin/LevelMixin.java b/src/main/java/ru/dbotthepony/mc/otm/mixin/LevelMixin.java index 6ad554f3f..8f60b5a71 100644 --- a/src/main/java/ru/dbotthepony/mc/otm/mixin/LevelMixin.java +++ b/src/main/java/ru/dbotthepony/mc/otm/mixin/LevelMixin.java @@ -5,11 +5,11 @@ import net.minecraft.world.level.Level; import org.jetbrains.annotations.NotNull; import org.spongepowered.asm.mixin.Mixin; import ru.dbotthepony.mc.otm.core.IMatteryLevel; -import ru.dbotthepony.mc.otm.core.util.CMWCRandom; +import ru.dbotthepony.mc.otm.core.util.Xoshiro256SSRandom; @Mixin(Level.class) public abstract class LevelMixin implements IMatteryLevel { - public final RandomSource otm_random = new CMWCRandom(); + public final RandomSource otm_random = new Xoshiro256SSRandom(); @Override public @NotNull RandomSource getOtmRandom() {