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/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/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 f0c645148..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,93 @@ 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) + } + } + + 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(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/block/entity/decorative/CargoCrateBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/decorative/CargoCrateBlockEntity.kt index ec7e9a5ac..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 @@ -5,8 +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.LongTag -import net.minecraft.nbt.StringTag +import net.minecraft.nbt.Tag import net.minecraft.network.chat.Component import net.minecraft.resources.ResourceKey import net.minecraft.resources.ResourceLocation @@ -33,8 +32,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 +92,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, Tag.TAG_STRING.toInt())) { + 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 + } } fun unpackLootTable(ply: Player? = null) { 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..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 @@ -12,6 +13,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 { @@ -31,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 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/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/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/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) } } } 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/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/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], 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 8a8ddabb7..25f26b09c 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn and b/src/main/resources/assets/overdrive_that_matters/textures/font/small.pdn differ 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 46a23eb36..09171906e 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/font/small.png and b/src/main/resources/assets/overdrive_that_matters/textures/font/small.png differ 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 000000000..71eb0d3f6 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/item/component/rogue_ai_core.png differ 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 6de764a87..46b6c9cc3 100644 Binary files a/src/main/resources/data/overdrive_that_matters/structure/field_research_pod.nbt and b/src/main/resources/data/overdrive_that_matters/structure/field_research_pod.nbt differ 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 57947deee..7833a71ba 100644 Binary files a/src/main/resources/data/overdrive_that_matters/structure/field_research_pod_ruin.nbt and b/src/main/resources/data/overdrive_that_matters/structure/field_research_pod_ruin.nbt differ