From 09b8410fe35f07f40be128d456db838829f3d92e Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:36 +0100 Subject: [PATCH 01/30] chore: update translation Russian from crowdin --- .../assets/refinedstorage/lang/ru_ru.json | 57 ++++++++++++++----- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ru_ru.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ru_ru.json index 121a58f0c..98f34594c 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ru_ru.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ru_ru.json @@ -6,7 +6,7 @@ "block.refinedstorage.disk_drive": "Дисковый привод", "block.refinedstorage.machine_casing": "Корпус механизма", "block.refinedstorage.grid": "Терминал", - "block.refinedstorage.pattern_grid": "Pattern Grid", + "block.refinedstorage.pattern_grid": "Сетка шаблона", "block.refinedstorage.crafting_grid": "Терминал создания", "block.refinedstorage.controller": "Контроллер", "block.refinedstorage.creative_controller": "Творческий контроллер", @@ -37,14 +37,15 @@ "block.refinedstorage.security_manager.help": "Когда это устройство активно, оно по умолчанию защищает сеть и блокирует все операции. Начните добавлять карты безопасности, чтобы разрешить или запретить определённые операции для игрока.", "block.refinedstorage.relay": "Реле", "block.refinedstorage.disk_interface": "Интерфейс диска", - "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter": "Автокрафтер", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Когда это устройство неактивно, сеть хранения не сможет использовать это устройство в качестве источника энергии.", "gui.refinedstorage.disk_drive.disks": "Диски", "gui.refinedstorage.storage.redstone_mode_help": "Когда это устройство неактивно, автономное хранилище больше не будет доступно из сети хранения данных.", "gui.refinedstorage.storage.filter_help": "Ресурсы, которые могут быть разрешены или не разрешены в этом хранилище, зависят от того, находится ли устройство в режиме списка разрешений или списка блокировок.", "gui.refinedstorage.storage.filter_mode.empty_warning": "Без каких-либо настроенных фильтров ресурсы не будут приниматься в этом хранилище.", - "gui.refinedstorage.storage.filter_mode.allow.help": "Only allow resources into this storage that are configured in the filters.", - "gui.refinedstorage.storage.filter_mode.block.help": "Disallow resources into this storage that are configured in the filters.", + "gui.refinedstorage.storage.filter_mode.allow.help": "Разрешить в этом хранилище только те ресурсы, которые настроены в фильтрах.", + "gui.refinedstorage.storage.filter_mode.block.help": "Запретить доступ в это хранилище ресурсам, настроенным в фильтрах.", "gui.refinedstorage.grid.view_type": "View type", "gui.refinedstorage.grid.view_type.all": "All", "gui.refinedstorage.grid.view_type.autocraftable": "Autocraftable", @@ -115,7 +116,7 @@ "gui.refinedstorage.redstone_mode.ignore.help": "Это устройство всегда будет активным, независимо от редстоун-сигнала.", "gui.refinedstorage.redstone_mode.high": "High", "gui.refinedstorage.redstone_mode.high.help": "This device will only be active with a redstone signal.", - "gui.refinedstorage.redstone_mode.low": "Low", + "gui.refinedstorage.redstone_mode.low": "Низкий", "gui.refinedstorage.redstone_mode.low.help": "This device will only be active without a redstone signal.", "gui.refinedstorage.scheduling_mode": "Scheduling mode", "gui.refinedstorage.scheduling_mode.default": "По умолчанию", @@ -124,11 +125,11 @@ "gui.refinedstorage.scheduling_mode.round_robin.help": "Use each filter in turn.", "gui.refinedstorage.scheduling_mode.random": "Random", "gui.refinedstorage.scheduling_mode.random.help": "Use a random filter.", - "gui.refinedstorage.priority": "Priority", + "gui.refinedstorage.priority": "Приоритет", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", - "gui.refinedstorage.configure_amount.reset": "Reset", + "gui.refinedstorage.configure_amount.reset": "Сброс", "gui.refinedstorage.configure_amount.set": "Set", "gui.refinedstorage.filter_mode": "Режим фильтрации", "gui.refinedstorage.filter_mode.allow": "Allowlist", @@ -166,7 +167,7 @@ "gui.refinedstorage.network_transmitter.status.missing_network_card": "Missing Network Card", "gui.refinedstorage.network_transmitter.status.transmitting": "%d block(s)", "gui.refinedstorage.network_transmitter.status.receiver_unreachable": "Unreachable", - "gui.refinedstorage.security_card.permission.reset": "Reset", + "gui.refinedstorage.security_card.permission.reset": "Сброс", "gui.refinedstorage.security_card.permission.modified": "Modified", "gui.refinedstorage.security_manager.redstone_mode_help": "When this device is inactive, the network will not be protected.", "gui.refinedstorage.security_manager.fallback_security_card_slot_hint": "Slot for a Fallback Security Card.", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -631,15 +660,17 @@ "advancements.refinedstorage.wireless": "Wireless", "advancements.refinedstorage.wireless.description": "Access your resources wirelessly with a Wireless Grid", "advancements.refinedstorage.better_than_a_barrel": "Better than a barrel", - "advancements.refinedstorage.better_than_a_barrel.description": "Craft a Storage Monitor to view, insert or extract resources in a storage network", + "advancements.refinedstorage.better_than_a_barrel.description": "", "advancements.refinedstorage.no_cables_required": "No cables required", "advancements.refinedstorage.no_cables_required.description": "Add extra components to your storage network without using cables by using a Network Transmitter, Network Receiver and Network Card", - "advancements.refinedstorage.portable_storage": "Portable storage", + "advancements.refinedstorage.portable_storage": "Портативное хранилище", "advancements.refinedstorage.portable_storage.description": "Craft a Portable Grid to access the content of disks without requiring a storage network", "advancements.refinedstorage.security": "Security", "advancements.refinedstorage.security.description": "Secure your storage network with a Security Manager and a Security Card", "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Автоматизируйте работу со сборщиком, используя шаблоны, созданные в менеджере шаблонов", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From a3efcafd8c077d970cbec9beacf6b1ed4fb0e326 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:37 +0100 Subject: [PATCH 02/30] chore: update translation German from crowdin --- .../assets/refinedstorage/lang/de_de.json | 81 +++++++++++++------ 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/de_de.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/de_de.json index b995fc01a..e56f74130 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/de_de.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/de_de.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relais", "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Falls dieses Gerät inaktiv ist, kann das Speichernetzwerk dieses Gerät nicht als Energiequelle nutzen.", "gui.refinedstorage.disk_drive.disks": "Speicherplatten", "gui.refinedstorage.storage.redstone_mode_help": "Falls dieses Gerät inaktiv ist, ist der enthaltene Speicher nicht mehr über das Speichernetzwerk zugänglich.", @@ -45,7 +46,7 @@ "gui.refinedstorage.storage.filter_mode.empty_warning": "Ohne konfigurierte Filter werden keine Ressourcen in diesem Speicher akzeptiert.", "gui.refinedstorage.storage.filter_mode.allow.help": "Erlaube nur Ressourcen in diesen Speicher, die in den Filtern konfiguriert sind.", "gui.refinedstorage.storage.filter_mode.block.help": "Erlaube nur Ressourcen in diesen Speicher, die in den Filtern konfiguriert sind.", - "gui.refinedstorage.grid.view_type": "View type", + "gui.refinedstorage.grid.view_type": "Anzeigetyp", "gui.refinedstorage.grid.view_type.all": "Alles", "gui.refinedstorage.grid.view_type.autocraftable": "Automatisch Herstellbar", "gui.refinedstorage.grid.view_type.non_autocraftable": "Nicht automatisch Herstellbar", @@ -84,7 +85,7 @@ "gui.refinedstorage.pattern_grid.processing.click_to_configure_amount_and_alternatives": "Zum Konfigurieren der Menge und der Alternativen klicken", "gui.refinedstorage.pattern_grid.processing.allowed_alternatives": "Erlaube Alternativen", "gui.refinedstorage.pattern_grid.alternatives": "Alternativen", - "gui.refinedstorage.pattern_grid.alternatives.expand": "Expand", + "gui.refinedstorage.pattern_grid.alternatives.expand": "", "gui.refinedstorage.screen_size": "Bildschirmgröße", "gui.refinedstorage.screen_size.stretch": "Strecken", "gui.refinedstorage.screen_size.small": "Klein", @@ -126,10 +127,10 @@ "gui.refinedstorage.scheduling_mode.random.help": "Verwende einen zufälligen Filter.", "gui.refinedstorage.priority": "Priorität", "gui.refinedstorage.priority.storage_help": "Die Reihenfolge, in der das Speichernetzwerk Ressourcen einfügen oder extrahieren soll, das höchste zuerst.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Menge konfigurieren", "gui.refinedstorage.configure_amount.reset": "Zurücksetzen", - "gui.refinedstorage.configure_amount.set": "Set", + "gui.refinedstorage.configure_amount.set": "Festlegen", "gui.refinedstorage.filter_mode": "Filtermodus", "gui.refinedstorage.filter_mode.allow": "Erlaubnisliste", "gui.refinedstorage.filter_mode.block": "Sperrliste", @@ -154,7 +155,7 @@ "gui.refinedstorage.void_excess": "Überschüssige Ressourcen löschen", "gui.refinedstorage.void_excess.help": "Wenn der überschüssige Modus eingeschaltet ist und die Speicherung voll ist, akzeptiert er weiterhin Ressourcen, löscht sie jedoch.", "gui.refinedstorage.void_excess.allowlist_warning": "Der überschüssige Modus funktioniert nur, wenn der Speicher im Erlaubnisliste Modus ist.", - "gui.refinedstorage.empty_upgrade_slot": "Empty upgrade slot", + "gui.refinedstorage.empty_upgrade_slot": "Leerer Upgrade-Slot", "gui.refinedstorage.filter_slot.empty_filter": "Leerer Filter", "gui.refinedstorage.filter_slot.left_click_for": "Linksklick für", "gui.refinedstorage.filter_slot.right_click_for": "Rechtsklick für", @@ -189,32 +190,50 @@ "gui.refinedstorage.disk_interface.in": "Eingabe", "gui.refinedstorage.disk_interface.out": "Ausgabe", "gui.refinedstorage.disk_interface.filter_help": "The resources that may or may not be allowed transferred from or into the provided storage disks, depending if the device is in allowlist or blocklist mode.", - "gui.refinedstorage.disk_interface.transfer_mode": "Transfer mode", - "gui.refinedstorage.disk_interface.transfer_mode.insert_into_network": "Insert into network", + "gui.refinedstorage.disk_interface.transfer_mode": "Übertragungsart", + "gui.refinedstorage.disk_interface.transfer_mode.insert_into_network": "Ins Netzwerk einfügen", "gui.refinedstorage.disk_interface.transfer_mode.insert_into_network.help": "Insert the resources from the storage disks into the storage network.", "gui.refinedstorage.disk_interface.transfer_mode.extract_from_network": "Extract from network", "gui.refinedstorage.disk_interface.transfer_mode.extract_from_network.help": "Insert the resources from the storage network into the storage disks.", "gui.refinedstorage.autocrafter.empty_pattern_slot": "Empty pattern slot", - "gui.refinedstorage.autocrafter.lock_mode": "Lock mode", - "gui.refinedstorage.autocrafter.lock_mode.never": "Never", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_redstone_pulse_received": "Lock until redstone pulse is received", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_connected_machine_is_empty": "Lock until connected machine is empty", + "gui.refinedstorage.autocrafter.lock_mode": "Sperr-Modus", + "gui.refinedstorage.autocrafter.lock_mode.never": "Niemals", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_redstone_pulse_received": "Sperren, bis Redstone-Puls empfangen wird", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_connected_machine_is_empty": "Sperren, bis die verbundene Maschine leer ist", "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", - "gui.refinedstorage.autocrafter.edit_name": "Edit", - "gui.refinedstorage.autocrafter.chained": "Chained", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", + "gui.refinedstorage.autocrafter.edit_name": "Bearbeiten", + "gui.refinedstorage.autocrafter.chained": "Verkettet", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", "gui.refinedstorage.autocrafter.chained.head_help": "This autocrafter is the head of the chain.", - "gui.refinedstorage.autocrafter.not_chained": "Not chained", + "gui.refinedstorage.autocrafter.not_chained": "Nicht verkettet", "gui.refinedstorage.autocrafter.not_chained.help": "If another autocrafter is facing this one, they'll form a chain, allowing you to have more patterns going into a single machine.", - "gui.refinedstorage.autocrafting_preview.title": "Autocrafting", + "gui.refinedstorage.autocrafting_preview.title": "Automatisches Herstellen", "gui.refinedstorage.autocrafting_preview.start": "Start", - "gui.refinedstorage.autocrafting_preview.pending": "Pending", - "gui.refinedstorage.autocrafting_preview.start.missing_resources": "There are missing resources.", - "gui.refinedstorage.autocrafting_preview.available": "Available: %s", - "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", - "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafting_preview.pending": "Ausstehend", + "gui.refinedstorage.autocrafting_preview.start.missing_resources": "Es gibt fehlende Ressourcen", + "gui.refinedstorage.autocrafting_preview.available": "Verfügbar: %s", + "gui.refinedstorage.autocrafting_preview.to_craft": "Zu Erstellen: %s", + "gui.refinedstorage.autocrafting_preview.missing": "Fehlend: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Stellt das Speichernetzwerk mit Energie zur Verfügung. Mehrere sind in einem einzigen Speichernetzwerk erlaubt.", "item.refinedstorage.creative_controller.help": "Stellt dem Speichernetzwerk eine unendliche Energiequelle zur Verfügung.", "item.refinedstorage.disk_drive.help": "Akzeptiert Speicherplatten, um dem Speichernetz Speicherplatz zur Verfügung zu stellen.", @@ -262,8 +281,8 @@ "item.refinedstorage.256b_fluid_storage_disk": "256B Flüssigspeicherzelle", "item.refinedstorage.1024b_fluid_storage_disk": "1024B Flüssigspeicherzelle", "item.refinedstorage.4096b_fluid_storage_disk": "4096B Flüssigspeicherzelle", - "item.refinedstorage.fluid_storage_disk.help": "Stores %s buckets.", - "item.refinedstorage.fluid_storage_block.help": "Stores %s buckets.", + "item.refinedstorage.fluid_storage_disk.help": "Lagert %s Eimer.", + "item.refinedstorage.fluid_storage_block.help": "Lagert %s Eimer.", "item.refinedstorage.creative_fluid_storage_disk": "Kreative Flüssigspeicherzelle", "item.refinedstorage.creative_fluid_storage_disk.help": "Speichert eine unendliche Menge an Eimern", "item.refinedstorage.creative_fluid_storage_block.help": "Speichert eine unendliche Menge an Eimern", @@ -274,7 +293,7 @@ "item.refinedstorage.wrench.help": "Use to rotate blocks or press SHIFT and use to dismantle Refined Storage blocks.", "item.refinedstorage.upgrade": "Upgrade", "item.refinedstorage.speed_upgrade": "Geschwindigkeitsupgrade", - "item.refinedstorage.speed_upgrade.help": "Increases the operation speed of a storage network device.", + "item.refinedstorage.speed_upgrade.help": "Erhöht die Betriebsgeschwindigkeit eines Speicher-Netzwerkgeräts.", "item.refinedstorage.stack_upgrade": "Stapelupgrade", "item.refinedstorage.stack_upgrade.help": "Increases the amount of resources that the storage network device handles per operation.", "item.refinedstorage.silk_touch_upgrade": "Behutsamkeitsupgrade", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Vorlage", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Gespeichert: %s", "misc.refinedstorage.stored_with_capacity": "Gespeichert: %s / %s (%d%%)", "misc.refinedstorage.total": "%d Gesamt", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Drahtlose Sender", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Fertiger", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Konfiguration", "refinedstorage.configuration.title": "Refined Storage Konfiguration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Konfiguration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Nutzen Sie einen oder mehrere Kontrollblöcke in einem Speichernetzwerk, um das Netzwerk mit Energie zu versorgen", "advancements.refinedstorage.connecting": "Verbinden", "advancements.refinedstorage.connecting.description": "Benutze Kabel, um Geräte miteinander zu verbinden, oder platziere Geräte nebeneinander", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Bedingte Verbindung", "advancements.refinedstorage.conditional_connecting.description": "Schalten Sie ganze Abschnitte eines Speichernetzwerks ein oder aus und erstellen Sie neue Zweige Ihres Netzwerks mit einem Relais", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From 127f5a9732a17393fcf71d6428799f0072cfcba8 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:39 +0100 Subject: [PATCH 03/30] chore: update translation Turkish from crowdin --- .../assets/refinedstorage/lang/tr_tr.json | 47 +++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/tr_tr.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/tr_tr.json index a41547857..41e177085 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/tr_tr.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/tr_tr.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Röle", "block.refinedstorage.disk_interface": "Disk Arayüzü", "block.refinedstorage.autocrafter": "Otomatik Üretici", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Bu cihaz etkin olmadığında, depolama ağı bu cihazı enerji kaynağı olarak kullanamayacaktır.", "gui.refinedstorage.disk_drive.disks": "Diskler", "gui.refinedstorage.storage.redstone_mode_help": "Bu cihaz etkin olmadığında, içerdiği depolama alanına depolama ağı içinden erişilemeyecektir.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Rastgele bir filtreyi kullan.", "gui.refinedstorage.priority": "Öncelik", "gui.refinedstorage.priority.storage_help": "Depolama ağının kaynakları ekleyeceği veya çıkaracağı sıra, en yüksek-ilk.", - "gui.refinedstorage.priority.crafter_help": "Bir kaynak için birden fazla şablon varsa, üretim görevleri Otomatik Üretici'de en yüksek önceliğe sahip şablona öncelik verecektir.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Miktarı yapılandır", "gui.refinedstorage.configure_amount.reset": "Sıfırla", "gui.refinedstorage.configure_amount.set": "Ayarla", @@ -171,7 +172,7 @@ "gui.refinedstorage.security_manager.redstone_mode_help": "Bu cihaz etkin olmadığında, ağ korunmayacaktır.", "gui.refinedstorage.security_manager.fallback_security_card_slot_hint": "Yedek Güvenlik Kartı için Yuva.", "gui.refinedstorage.security_manager.no_fallback_security_card_consequence": "Güvenlik Kartı olmadan her oyuncunun izinlerini ayarlamak için bu yuvaya bir Yedek Güvenlik Kartı ekleyin. Varsayılan olarak, tüm eylemler reddedilir.", - "gui.refinedstorage.relay.filter_help": "Resources and patterns which should be exposed from the input network to the output network if the Relay isn't in pass-through mode.", + "gui.refinedstorage.relay.filter_help": "Röle, doğrudan geçiş modunda değilse giriş ağından çıkış ağına maruz bırakılması gereken kaynaklar ve şablonlar.", "gui.refinedstorage.relay.pass_through": "Doğrudan geçiş", "gui.refinedstorage.relay.pass_through.help": "Bu cihazın tüm giriş ağı sinyalini olduğu gibi geçirmesi gerekip gerekmediği. Bileşenleri çıkış ağına seçici olarak maruz bırakmak için bunu kapatın.", "gui.refinedstorage.relay.pass_energy": "Enerjiyi geçir", @@ -180,8 +181,8 @@ "gui.refinedstorage.relay.pass_storage.help": "Bu cihazın depolamayı giriş ağından çıkış ağına geçirmesi gerekip gerekmediği.", "gui.refinedstorage.relay.pass_security": "Güvenliği geçir", "gui.refinedstorage.relay.pass_security.help": "Bu cihazın güvenlik ayarlarını giriş ağından çıkış ağına geçirmesi gerekip gerekmediği.", - "gui.refinedstorage.relay.pass_autocrafting": "Pass autocrafting", - "gui.refinedstorage.relay.pass_autocrafting.help": "Whether this device should pass the autocrafting patterns from the input network to the output network.", + "gui.refinedstorage.relay.pass_autocrafting": "Otomatik üretimi geç", + "gui.refinedstorage.relay.pass_autocrafting.help": "Bu cihazın otomatik üretici şablonlarını giriş ağından çıkış ağına geçirmesi gerekip gerekmediği.", "gui.refinedstorage.relay.filter_mode.allow.help": "Yalnızca filtrelerde yapılandırılmış olan kaynakları giriş ağından çıkış ağına maruz bırakın.", "gui.refinedstorage.relay.filter_mode.block.help": "Filtrelerde yapılandırılmış olan kaynakları giriş ağından çıkış ağına maruz bırakmayın.", "gui.refinedstorage.disk_interface.filter_mode.allow.help": "Yalnızca filtrelerde yapılandırılan kaynakların depolama disklerine veya ağa girmesine izin ver.", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Tüm çıkışlar alınana kadar kilitle", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Yüksek redstone sinyaline kadar kilitle", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Düşük redstone sinyaline kadar kilitle", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Düzenle", "gui.refinedstorage.autocrafter.chained": "Zincirlenmiş", "gui.refinedstorage.autocrafter.chained.help": "Bu otomatik üretici bir zincirin parçası.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Kullanılabilir: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "Üretmek için: %s", "gui.refinedstorage.autocrafting_preview.missing": "Eksik: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Depolama ağına enerji sağlar. Tek bir depolama ağında birden fazlasına izin verilir.", "item.refinedstorage.creative_controller.help": "Depolama ağına sonsuz enerji sağlar.", "item.refinedstorage.disk_drive.help": "Depolama ağına, depolama alanı sağlamak için depolama disklerini kabul eder.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Şablon", "item.refinedstorage.pattern.fuzzy_mode": "Belirsiz Mod", "item.refinedstorage.pattern.help": "Otomatik üretimde üretilecek tarifi saklamak için kullanılır. Temizlemek için çömelirken kullanın.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Depolanmış: %s", "misc.refinedstorage.stored_with_capacity": "Depolanmış: %s / %s (%d%%)", "misc.refinedstorage.total": "Toplam %d", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Depolama Diskileri", "tag.item.refinedstorage.wireless_transmitters": "Kablosuz Vericiler", "tag.item.refinedstorage.disk_interfaces": "Disk Arayüzleri", - "tag.item.refinedstorage.crafters": "Üreticiler", + "tag.item.refinedstorage.autocrafters": "Otomatik Üreticiler", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Yapılandırması", "refinedstorage.configuration.title": "Refined Storage Yapılandırması", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Yapılandırması", @@ -595,8 +616,16 @@ "text.autoconfig.refinedstorage.option.autocrafter.tooltip": "Otomatik Üretici için yapılandırma.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsage": "Enerji kullanımı", "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "Otomatik Üretici tarafından kullanılan enerji.", - "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", - "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Şablon başına enerji kullanımı", + "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "Şablon başına kullanılan ek enerji.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Ağınıza enerji sağlamak için bir depolama ağında bir veya birden fazla Denetleyici kullanın", "advancements.refinedstorage.connecting": "Bağlanıyor", "advancements.refinedstorage.connecting.description": "Cihazları birbirlerine bağlamak veya cihazları birbirlerine doğru yerleştirmek için Kablo kullanın", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Koşullu bağlantı", "advancements.refinedstorage.conditional_connecting.description": "Bir depolama ağının tüm bölümlerini açın veya kapatın ve bir Röle ile ağınızın yeni dallarını oluşturun", "advancements.refinedstorage.autocrafting": "Otomatik Üretim", - "advancements.refinedstorage.autocrafting.description": "Bir Şablon Terminalinde oluşturulan şablonları kullanarak bir Otomatik Üretici ile üretimi otomatikleştirin" + "advancements.refinedstorage.autocrafting.description": "Bir Şablon Terminalinde oluşturulan şablonları kullanarak bir Otomatik Üretici ile üretimi otomatikleştirin", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From e320778507cf16333938285f9141a71684ab1c56 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:40 +0100 Subject: [PATCH 04/30] chore: update translation Portuguese, Brazilian from crowdin --- .../assets/refinedstorage/lang/pt_br.json | 1141 +++++++++-------- 1 file changed, 586 insertions(+), 555 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/pt_br.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/pt_br.json index a3cfc61ad..31e3c084a 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/pt_br.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/pt_br.json @@ -1,12 +1,12 @@ { "mod.refinedstorage": "Refined Storage", "block.refinedstorage.cable": "Cabo", - "block.refinedstorage.quartz_enriched_iron_block": "Bloco de ferro com quartzo infundido", - "block.refinedstorage.quartz_enriched_copper_block": "Block of Quartz Enriched Copper", + "block.refinedstorage.quartz_enriched_iron_block": "Bloco de ferro enriquecido em quartzo", + "block.refinedstorage.quartz_enriched_copper_block": "Bloco de cobre enriquecido em quartzo", "block.refinedstorage.disk_drive": "Disco rígido", "block.refinedstorage.machine_casing": "Revestimento de máquina", "block.refinedstorage.grid": "Grade", - "block.refinedstorage.pattern_grid": "Pattern Grid", + "block.refinedstorage.pattern_grid": "Grade de Modelos", "block.refinedstorage.crafting_grid": "Grade de Criação", "block.refinedstorage.controller": "Controlador", "block.refinedstorage.creative_controller": "Controlador Criativo", @@ -22,9 +22,9 @@ "block.refinedstorage.creative_fluid_storage_block": "Bloco de armazenamento de fluido Criativo", "block.refinedstorage.importer": "Importador", "block.refinedstorage.exporter": "Exportador", - "block.refinedstorage.interface": "Interface", + "block.refinedstorage.interface": "Painel", "block.refinedstorage.external_storage": "Armazenamento Externo", - "block.refinedstorage.detector": "Detector", + "block.refinedstorage.detector": "Sensor", "block.refinedstorage.constructor": "Construtor", "block.refinedstorage.destructor": "Destrutor", "block.refinedstorage.wireless_transmitter": "Transmissor sem fio", @@ -33,542 +33,563 @@ "block.refinedstorage.network_transmitter": "Transmissor de Rede", "block.refinedstorage.portable_grid": "Grade Portátil", "block.refinedstorage.creative_portable_grid": "Grade Portátil Criativa", - "block.refinedstorage.security_manager": "Security Manager", - "block.refinedstorage.security_manager.help": "When this device is active, will protect the network by default and block all operations. Start adding Security Cards to permit or deny specific operations for a player.", - "block.refinedstorage.relay": "Relay", - "block.refinedstorage.disk_interface": "Disk Interface", - "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.security_manager": "Gerenciador de Segurança", + "block.refinedstorage.security_manager.help": "Quando esse dispositivo está ativado, irá proteger a rede por padrão e as operações de todos os blocos. Comece inserindo cartões de segurança para permitir ou rejeitar operações especificar para um jogador.", + "block.refinedstorage.relay": "Relé", + "block.refinedstorage.disk_interface": "Painel de disco", + "block.refinedstorage.autocrafter": "Auto-Fabricador", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Quando este dispositivo estiver inativo, a rede de armazenamento não poderá usar este dispositivo como fonte de energia.", "gui.refinedstorage.disk_drive.disks": "Discos", "gui.refinedstorage.storage.redstone_mode_help": "Quando este dispositivo estiver inativo, o armazenamento contido não estará mais acessível a partir da rede de armazenamento.", "gui.refinedstorage.storage.filter_help": "Os recursos que podem ou não ser permitidos neste armazenamento, dependendo se o dispositivo está no modo de lista de permissões ou lista de bloqueio.", "gui.refinedstorage.storage.filter_mode.empty_warning": "Sem filtros configurados, nenhum recurso será aceito neste armazenamento.", "gui.refinedstorage.storage.filter_mode.allow.help": "Só permite recursos neste armazenamento que está configurado nos filtros.", - "gui.refinedstorage.storage.filter_mode.block.help": "Disallow resources into this storage that are configured in the filters.", - "gui.refinedstorage.grid.view_type": "View type", - "gui.refinedstorage.grid.view_type.all": "All", - "gui.refinedstorage.grid.view_type.autocraftable": "Autocraftable", - "gui.refinedstorage.grid.view_type.non_autocraftable": "Non-autocraftable", - "gui.refinedstorage.grid.sorting.direction": "Sorting direction", - "gui.refinedstorage.grid.sorting.direction.ascending": "Ascending", - "gui.refinedstorage.grid.sorting.direction.descending": "Descending", - "gui.refinedstorage.grid.sorting.type": "Sorting type", - "gui.refinedstorage.grid.sorting.type.quantity": "Quantity", - "gui.refinedstorage.grid.sorting.type.name": "Name", + "gui.refinedstorage.storage.filter_mode.block.help": "Proíbe recursos no armazenamento configurados nos filtros.", + "gui.refinedstorage.grid.view_type": "Tipo de Exibição", + "gui.refinedstorage.grid.view_type.all": "Todos", + "gui.refinedstorage.grid.view_type.autocraftable": "Auto-fabricável", + "gui.refinedstorage.grid.view_type.non_autocraftable": "Não Auto-fabricável", + "gui.refinedstorage.grid.sorting.direction": "Organizar Direção", + "gui.refinedstorage.grid.sorting.direction.ascending": "Ascendente", + "gui.refinedstorage.grid.sorting.direction.descending": "Descendente", + "gui.refinedstorage.grid.sorting.type": "Tipo de Organização", + "gui.refinedstorage.grid.sorting.type.quantity": "Quantidade", + "gui.refinedstorage.grid.sorting.type.name": "Nome", "gui.refinedstorage.grid.sorting.type.id": "ID", - "gui.refinedstorage.grid.sorting.type.last_modified": "Last modified", - "gui.refinedstorage.grid.auto_selected": "Auto-selected", - "gui.refinedstorage.grid.auto_selected.help": "Whether to auto-select the search box when opening the Grid.", - "gui.refinedstorage.grid.synchronization_mode": "Synchronization mode", - "gui.refinedstorage.grid.synchronization_mode.off": "Off", - "gui.refinedstorage.grid.synchronization_mode.off.help": "Don't sync the search box text.", - "gui.refinedstorage.grid.resource_type": "Resource type", - "gui.refinedstorage.grid.resource_type.all": "All", - "gui.refinedstorage.grid.craft": "Craft", - "gui.refinedstorage.grid.autocraftable": "This resource is autocraftable", - "gui.refinedstorage.grid.pattern_in_inventory": "This resource has a pattern in your inventory.", - "gui.refinedstorage.grid.click_to_autocraft": "Click to autocraft", - "gui.refinedstorage.grid.ctrl_click_to_autocraft": "CTRL + click to autocraft", - "gui.refinedstorage.crafting_grid.move.network": "Move items to network", - "gui.refinedstorage.crafting_grid.move.inventory": "Move items to inventory", - "gui.refinedstorage.crafting_grid.press_shift_ctrl_to_only_show_items_used_in_crafting": "Press SHIFT + CTRL to only show items used in the recipe.", - "gui.refinedstorage.pattern_grid.create_pattern": "Create pattern", - "gui.refinedstorage.pattern_grid.clear": "Clear", - "gui.refinedstorage.pattern_grid.fuzzy_mode": "Fuzzy mode", - "gui.refinedstorage.pattern_grid.fuzzy_mode.on.help": "Match the pattern inputs, ignoring components.", - "gui.refinedstorage.pattern_grid.fuzzy_mode.off.help": "Match the pattern inputs exactly.", - "gui.refinedstorage.pattern_grid.processing.inputs": "Inputs", - "gui.refinedstorage.pattern_grid.processing.outputs": "Outputs", - "gui.refinedstorage.pattern_grid.processing.input_slots_help": "The resources that will be extracted from the storage network and will be inserted into the target inventory.", - "gui.refinedstorage.pattern_grid.processing.output_slots_help": "The resources that are expected to be returned to the storage network to deem the crafting task successful.", - "gui.refinedstorage.pattern_grid.processing.click_to_configure_amount_and_alternatives": "Click to configure amount and alternatives", - "gui.refinedstorage.pattern_grid.processing.allowed_alternatives": "Allowed alternatives:", - "gui.refinedstorage.pattern_grid.alternatives": "Alternatives", - "gui.refinedstorage.pattern_grid.alternatives.expand": "Expand", - "gui.refinedstorage.screen_size": "Screen size", - "gui.refinedstorage.screen_size.stretch": "Stretch", - "gui.refinedstorage.screen_size.small": "Small", - "gui.refinedstorage.screen_size.medium": "Medium", - "gui.refinedstorage.screen_size.large": "Large", - "gui.refinedstorage.screen_size.extra_large": "Extra large", - "gui.refinedstorage.detector.mode": "Mode", - "gui.refinedstorage.detector.mode.under": "Emit redstone signal when under the amount", + "gui.refinedstorage.grid.sorting.type.last_modified": "Ultima Modificação", + "gui.refinedstorage.grid.auto_selected": "Auto-Selecionado", + "gui.refinedstorage.grid.auto_selected.help": "Selecionar automaticamente a caixa de pesquisa ao abrir a Grade.", + "gui.refinedstorage.grid.synchronization_mode": "Modo de sincronização", + "gui.refinedstorage.grid.synchronization_mode.off": "Desativado", + "gui.refinedstorage.grid.synchronization_mode.off.help": "Dessincronizar a caixa de pesquisa de texto.", + "gui.refinedstorage.grid.resource_type": "Tipo de recurso", + "gui.refinedstorage.grid.resource_type.all": "Todos", + "gui.refinedstorage.grid.craft": "Fabricação", + "gui.refinedstorage.grid.autocraftable": "O Recurso é auto-fabricável", + "gui.refinedstorage.grid.pattern_in_inventory": "Esse recurso tem um Modelo em seu inventário.", + "gui.refinedstorage.grid.click_to_autocraft": "Clique para auto-fabricar", + "gui.refinedstorage.grid.ctrl_click_to_autocraft": "CTRL + clique para auto-fabricar", + "gui.refinedstorage.crafting_grid.move.network": "Mover itens para a rede", + "gui.refinedstorage.crafting_grid.move.inventory": "Mover itens para o inventário", + "gui.refinedstorage.crafting_grid.press_shift_ctrl_to_only_show_items_used_in_crafting": "Pressione SHIFT + CTRL para mostrar apenas itens usados na receita.", + "gui.refinedstorage.pattern_grid.create_pattern": "Criar modelo", + "gui.refinedstorage.pattern_grid.clear": "Limpar", + "gui.refinedstorage.pattern_grid.fuzzy_mode": "Modo difuso", + "gui.refinedstorage.pattern_grid.fuzzy_mode.on.help": "Corresponder as entradas do modelo, ignorando componentes.", + "gui.refinedstorage.pattern_grid.fuzzy_mode.off.help": "Corresponder exatamente as entradas do modelo.", + "gui.refinedstorage.pattern_grid.processing.inputs": "Entradas", + "gui.refinedstorage.pattern_grid.processing.outputs": "Saídas", + "gui.refinedstorage.pattern_grid.processing.input_slots_help": "Os recursos vão ser extraídos do armazenamento da rede e serão inseridos no inventário do alvo.", + "gui.refinedstorage.pattern_grid.processing.output_slots_help": "Os recursos esperados vão ser retornados para o armazenamento da rede para completar a tarefa de criação com sucesso.", + "gui.refinedstorage.pattern_grid.processing.click_to_configure_amount_and_alternatives": "Clique para configurar a quantia e alternativas", + "gui.refinedstorage.pattern_grid.processing.allowed_alternatives": "Alternativas permitidas:", + "gui.refinedstorage.pattern_grid.alternatives": "Alternativas", + "gui.refinedstorage.pattern_grid.alternatives.expand": "Expandir", + "gui.refinedstorage.screen_size": "Tamanho da tela", + "gui.refinedstorage.screen_size.stretch": "Estender", + "gui.refinedstorage.screen_size.small": "Pequena", + "gui.refinedstorage.screen_size.medium": "Média", + "gui.refinedstorage.screen_size.large": "Grande", + "gui.refinedstorage.screen_size.extra_large": "Muito Grande", + "gui.refinedstorage.detector.mode": "Modo", + "gui.refinedstorage.detector.mode.under": "Emitir sinal de redstone quando estiver abaixo da quantidade.", "gui.refinedstorage.detector.mode.equal": "Emitir sinal de \"redstone\" quando quantidade for exata", "gui.refinedstorage.detector.mode.above": "Emitir sinal de \"redstone\" quando a quantidade for exata", - "gui.refinedstorage.detector.filter_help": "The resource that should be detected in the storage network.", - "gui.refinedstorage.destructor.pickup_items": "Pickup items instead of breaking", - "gui.refinedstorage.destructor.filter_help": "The blocks that may or may not be destroyed, depending if the device is in allowlist or blocklist mode.", - "gui.refinedstorage.destructor.filter_mode.allow.help": "Only allow blocks into the storage network that are configured in the filters.", - "gui.refinedstorage.destructor.filter_mode.block.help": "Disallow blocks into the storage network that are configured in the filters.", - "gui.refinedstorage.constructor.drop_items": "Drop items instead of placing blocks", - "gui.refinedstorage.constructor.filter_help": "The resources that should be placed from the storage network.", - "gui.refinedstorage.interface.filter_help": "The resources that should be exported from the storage network.", - "gui.refinedstorage.exporter.filter_help": "The resources that should be exported from the storage network.", - "gui.refinedstorage.importer.filter_help": "The resources that may be imported from the target inventory.", - "gui.refinedstorage.importer.filter_mode.allow.help": "Only allow resources into the storage network that are configured in the filters.", - "gui.refinedstorage.importer.filter_mode.block.help": "Disallow resources into the storage network that are configured in the filters.", - "gui.refinedstorage.wireless_transmitter.distance": "%d block(s)", - "gui.refinedstorage.wireless_transmitter.inactive": "Inactive", - "gui.refinedstorage.storage_monitor.filter_help": "The resource to display.", - "gui.refinedstorage.redstone_mode": "Redstone mode", - "gui.refinedstorage.redstone_mode.ignore": "Ignore", - "gui.refinedstorage.redstone_mode.ignore.help": "This device will always be active, regardless of redstone signal.", - "gui.refinedstorage.redstone_mode.high": "High", - "gui.refinedstorage.redstone_mode.high.help": "This device will only be active with a redstone signal.", - "gui.refinedstorage.redstone_mode.low": "Low", - "gui.refinedstorage.redstone_mode.low.help": "This device will only be active without a redstone signal.", - "gui.refinedstorage.scheduling_mode": "Scheduling mode", - "gui.refinedstorage.scheduling_mode.default": "Default", - "gui.refinedstorage.scheduling_mode.default.help": "Use the first available filter.", - "gui.refinedstorage.scheduling_mode.round_robin": "Round robin", - "gui.refinedstorage.scheduling_mode.round_robin.help": "Use each filter in turn.", - "gui.refinedstorage.scheduling_mode.random": "Random", - "gui.refinedstorage.scheduling_mode.random.help": "Use a random filter.", - "gui.refinedstorage.priority": "Priority", - "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", - "gui.refinedstorage.configure_amount": "Configure amount", - "gui.refinedstorage.configure_amount.reset": "Reset", - "gui.refinedstorage.configure_amount.set": "Set", - "gui.refinedstorage.filter_mode": "Filter mode", - "gui.refinedstorage.filter_mode.allow": "Allowlist", - "gui.refinedstorage.filter_mode.block": "Blocklist", - "gui.refinedstorage.fuzzy_mode": "Fuzzy mode", - "gui.refinedstorage.fuzzy_mode.on": "On", - "gui.refinedstorage.fuzzy_mode.on.storage_help": "Match the filters for the allowlist or blocklist, ignoring components.", - "gui.refinedstorage.fuzzy_mode.on.generic_help": "Match the filter, ignoring components.", - "gui.refinedstorage.fuzzy_mode.on.extracting_storage_network_help": "Match the filters when extracting from the storage network, ignoring components.", - "gui.refinedstorage.fuzzy_mode.on.extracting_source_help": "Match the filters when extracting from the source, ignoring components.", + "gui.refinedstorage.detector.filter_help": "O recurso que deve ser detectado na rede de armazenamento.", + "gui.refinedstorage.destructor.pickup_items": "Pegar itens ao invés de quebrar", + "gui.refinedstorage.destructor.filter_help": "Os blocos que podem ou não ser destruídos, dependendo se o dispositivo está no modo de lista de permissões ou lista de bloqueios.", + "gui.refinedstorage.destructor.filter_mode.allow.help": "Apenas permitir blocos na rede de armazenamento configurados nos filtros.", + "gui.refinedstorage.destructor.filter_mode.block.help": "Restringir blocos na rede de armazenamento configurados nos filtros.", + "gui.refinedstorage.constructor.drop_items": "Soltar itens ao invés de colocar blocos", + "gui.refinedstorage.constructor.filter_help": "Os recursos que devem ser colocados da rede de armazenamento.", + "gui.refinedstorage.interface.filter_help": "Os recursos que devem ser exportados da rede de armazenamento.", + "gui.refinedstorage.exporter.filter_help": "Os recursos que devem ser exportados da rede de armazenamento.", + "gui.refinedstorage.importer.filter_help": "Os recursos que podem ser importados do inventário do alvo.", + "gui.refinedstorage.importer.filter_mode.allow.help": "Apenas permitir recursos na rede de armazenamento configurados nos filtros.", + "gui.refinedstorage.importer.filter_mode.block.help": "Restringir recursos na rede de armazenamento configurados nos filtros.", + "gui.refinedstorage.wireless_transmitter.distance": "%d Bloco(s)", + "gui.refinedstorage.wireless_transmitter.inactive": "Inativo", + "gui.refinedstorage.storage_monitor.filter_help": "O recurso a ser exibido.", + "gui.refinedstorage.redstone_mode": "Modo redstone", + "gui.refinedstorage.redstone_mode.ignore": "Ignorar", + "gui.refinedstorage.redstone_mode.ignore.help": "Esse dispositivo estará sempre ativo, independentemente do sinal redstone.", + "gui.refinedstorage.redstone_mode.high": "Alto", + "gui.refinedstorage.redstone_mode.high.help": "Esse dispositivo estará ativo apenas com sinal de redstone.", + "gui.refinedstorage.redstone_mode.low": "Baixo", + "gui.refinedstorage.redstone_mode.low.help": "Esse dispositivo apenas estará ativo sem sinal de redstone.", + "gui.refinedstorage.scheduling_mode": "Modo de agendamento", + "gui.refinedstorage.scheduling_mode.default": "Padrão", + "gui.refinedstorage.scheduling_mode.default.help": "Usar o primeiro disponível no filtro.", + "gui.refinedstorage.scheduling_mode.round_robin": "Rodízio", + "gui.refinedstorage.scheduling_mode.round_robin.help": "Utilize cada filtro sequencialmente.", + "gui.refinedstorage.scheduling_mode.random": "Aleatório", + "gui.refinedstorage.scheduling_mode.random.help": "Usar um filtro aleatório.", + "gui.refinedstorage.priority": "Prioridade", + "gui.refinedstorage.priority.storage_help": "A ordem em que a rede de armazenamento irá inserir ou extrair recursos, priorizando os de maior valor.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", + "gui.refinedstorage.configure_amount": "Configurar quantia", + "gui.refinedstorage.configure_amount.reset": "Redefinir", + "gui.refinedstorage.configure_amount.set": "Definir", + "gui.refinedstorage.filter_mode": "Modo de filtro", + "gui.refinedstorage.filter_mode.allow": "Lista de permissão", + "gui.refinedstorage.filter_mode.block": "Lista de bloqueio", + "gui.refinedstorage.fuzzy_mode": "Modo difuso", + "gui.refinedstorage.fuzzy_mode.on": "Ativado", + "gui.refinedstorage.fuzzy_mode.on.storage_help": "Corresponder os filtros da lista de permissões ou lista de bloqueios, ignorando os componentes.", + "gui.refinedstorage.fuzzy_mode.on.generic_help": "Corresponder o filtro, ignorando componentes.", + "gui.refinedstorage.fuzzy_mode.on.extracting_storage_network_help": "Corresponder os filtros ao serem extraídos da rede de armazenamento, ignorando componentes.", + "gui.refinedstorage.fuzzy_mode.on.extracting_source_help": "Corresponder os filtros ao serem extraídos da fonte, ignorando componentes.", "gui.refinedstorage.fuzzy_mode.off": "Desligado", - "gui.refinedstorage.fuzzy_mode.off.storage_help": "Match the filters for the allowlist or blocklist exactly.", - "gui.refinedstorage.fuzzy_mode.off.generic_help": "Match the filter exactly.", - "gui.refinedstorage.fuzzy_mode.off.extracting_storage_network_help": "Match the filters when extracting from the storage network exactly.", - "gui.refinedstorage.fuzzy_mode.off.extracting_source_help": "Match the filters when extracting from the source exactly.", - "gui.refinedstorage.access_mode": "Access mode", - "gui.refinedstorage.access_mode.insert_extract": "Insert and extract", - "gui.refinedstorage.access_mode.insert_extract.help": "The storage network will be able to insert or extract from this storage.", - "gui.refinedstorage.access_mode.insert": "Insert only", - "gui.refinedstorage.access_mode.insert.help": "The storage network will only be able to insert into this storage. Contained resources will still be visible in a Grid.", - "gui.refinedstorage.access_mode.extract": "Extract only", - "gui.refinedstorage.access_mode.extract.help": "The storage network will only be able to extract from this storage.", - "gui.refinedstorage.void_excess": "Void excess resources", - "gui.refinedstorage.void_excess.help": "When void excess mode is turned on and the storage is full, it will keep accepting resources but void them.", - "gui.refinedstorage.void_excess.allowlist_warning": "Void excess will only work when the storage is in allowlist mode.", - "gui.refinedstorage.empty_upgrade_slot": "Empty upgrade slot", - "gui.refinedstorage.filter_slot.empty_filter": "Empty filter", - "gui.refinedstorage.filter_slot.left_click_for": "Left click for", - "gui.refinedstorage.filter_slot.right_click_for": "Right click for", - "gui.refinedstorage.filter_slot.click_to_clear": "Click to clear", - "gui.refinedstorage.filter_slot.click_to_configure_amount": "Click to configure amount", - "gui.refinedstorage.filter_slot.shift_click_to_clear": "Shift click to clear", - "gui.refinedstorage.regulator_upgrade.filter_help": "The resource that should be regulated in the target.", - "gui.refinedstorage.network_transmitter.status.inactive": "Inactive", - "gui.refinedstorage.network_transmitter.status.missing_network_card": "Missing Network Card", - "gui.refinedstorage.network_transmitter.status.transmitting": "%d block(s)", - "gui.refinedstorage.network_transmitter.status.receiver_unreachable": "Unreachable", - "gui.refinedstorage.security_card.permission.reset": "Reset", - "gui.refinedstorage.security_card.permission.modified": "Modified", - "gui.refinedstorage.security_manager.redstone_mode_help": "When this device is inactive, the network will not be protected.", - "gui.refinedstorage.security_manager.fallback_security_card_slot_hint": "Slot for a Fallback Security Card.", - "gui.refinedstorage.security_manager.no_fallback_security_card_consequence": "Add a Fallback Security Card to this slot to set permissions for every player without a Security Card. By default, all actions are denied.", - "gui.refinedstorage.relay.filter_help": "Resources and patterns which should be exposed from the input network to the output network if the Relay isn't in pass-through mode.", - "gui.refinedstorage.relay.pass_through": "Pass-through", - "gui.refinedstorage.relay.pass_through.help": "Whether this device should pass-through the entire input network signal as-is. Turn this off to selectively expose components to the output network.", - "gui.refinedstorage.relay.pass_energy": "Pass energy", - "gui.refinedstorage.relay.pass_energy.help": "Whether this device should pass the energy buffer from the input network to the output network.", - "gui.refinedstorage.relay.pass_storage": "Pass storage", - "gui.refinedstorage.relay.pass_storage.help": "Whether this device should pass the storage from the input network to the output network.", - "gui.refinedstorage.relay.pass_security": "Pass security", - "gui.refinedstorage.relay.pass_security.help": "Whether this device should pass the security settings from the input network to the output network.", - "gui.refinedstorage.relay.pass_autocrafting": "Pass autocrafting", - "gui.refinedstorage.relay.pass_autocrafting.help": "Whether this device should pass the autocrafting patterns from the input network to the output network.", - "gui.refinedstorage.relay.filter_mode.allow.help": "Only expose resources from the input network to the output network that are configured in the filters.", - "gui.refinedstorage.relay.filter_mode.block.help": "Don't expose resources from the input network to the output network that are configured in the filters.", - "gui.refinedstorage.disk_interface.filter_mode.allow.help": "Only allow resources into the storage disks or into the network that are configured in the filters.", - "gui.refinedstorage.disk_interface.filter_mode.block.help": "Disallow resources into the storage disks or into the network that are configured in the filters.", - "gui.refinedstorage.disk_interface.in": "In", - "gui.refinedstorage.disk_interface.out": "Out", - "gui.refinedstorage.disk_interface.filter_help": "The resources that may or may not be allowed transferred from or into the provided storage disks, depending if the device is in allowlist or blocklist mode.", - "gui.refinedstorage.disk_interface.transfer_mode": "Transfer mode", - "gui.refinedstorage.disk_interface.transfer_mode.insert_into_network": "Insert into network", - "gui.refinedstorage.disk_interface.transfer_mode.insert_into_network.help": "Insert the resources from the storage disks into the storage network.", - "gui.refinedstorage.disk_interface.transfer_mode.extract_from_network": "Extract from network", - "gui.refinedstorage.disk_interface.transfer_mode.extract_from_network.help": "Insert the resources from the storage network into the storage disks.", - "gui.refinedstorage.autocrafter.empty_pattern_slot": "Empty pattern slot", - "gui.refinedstorage.autocrafter.lock_mode": "Lock mode", - "gui.refinedstorage.autocrafter.lock_mode.never": "Never", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_redstone_pulse_received": "Lock until redstone pulse is received", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_connected_machine_is_empty": "Lock until connected machine is empty", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", - "gui.refinedstorage.autocrafter.edit_name": "Edit", - "gui.refinedstorage.autocrafter.chained": "Chained", - "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", - "gui.refinedstorage.autocrafter.chained.head_help": "This autocrafter is the head of the chain.", - "gui.refinedstorage.autocrafter.not_chained": "Not chained", - "gui.refinedstorage.autocrafter.not_chained.help": "If another autocrafter is facing this one, they'll form a chain, allowing you to have more patterns going into a single machine.", - "gui.refinedstorage.autocrafting_preview.title": "Autocrafting", - "gui.refinedstorage.autocrafting_preview.start": "Start", - "gui.refinedstorage.autocrafting_preview.pending": "Pending", - "gui.refinedstorage.autocrafting_preview.start.missing_resources": "There are missing resources.", - "gui.refinedstorage.autocrafting_preview.available": "Available: %s", - "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", - "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", - "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", - "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", - "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", - "item.refinedstorage.disk_interface.help": "Transfers resources between the storage network and provided storage disks.", - "item.refinedstorage.grid.help": "Allows for interacting with the storage network.", - "item.refinedstorage.crafting_grid.help": "Allows for interacting with the storage network, with crafting abilities.", - "item.refinedstorage.pattern_grid.help": "Allows for the creation of Patterns for use in autocrafting.", - "item.refinedstorage.importer.help": "Imports resources from an external source to the storage network.", - "item.refinedstorage.exporter.help": "Exports resources from the storage network to an external destination.", - "item.refinedstorage.interface.help": "Acts as the combination of an Importer and Exporter.", - "item.refinedstorage.external_storage.help": "Provides the storage network with storage from an external source.", - "item.refinedstorage.detector.help": "Emits a redstone signal if the storage network contains a resource equal, above or under a given amount.", - "item.refinedstorage.constructor.help": "Places blocks from the storage network in the world.", - "item.refinedstorage.destructor.help": "Destroys blocks from the world and puts them in the storage network.", - "item.refinedstorage.relay.help": "Turn entire sections of a storage network on or off and create new branches of your network.", - "item.refinedstorage.autocrafter.help": "Accepts patterns to store autocraftable resources.", - "item.refinedstorage.quartz_enriched_iron": "Quartz Enriched Iron", - "item.refinedstorage.quartz_enriched_copper": "Quartz Enriched Copper", - "item.refinedstorage.processor_binding": "Processor Binding", - "item.refinedstorage.silicon": "Silicon", - "item.refinedstorage.raw_basic_processor": "Raw Basic Processor", - "item.refinedstorage.raw_improved_processor": "Raw Improved Processor", - "item.refinedstorage.raw_advanced_processor": "Raw Advanced Processor", - "item.refinedstorage.basic_processor": "Basic Processor", - "item.refinedstorage.improved_processor": "Improved Processor", - "item.refinedstorage.advanced_processor": "Advanced Processor", - "item.refinedstorage.1k_storage_part": "1K Storage Part", - "item.refinedstorage.4k_storage_part": "4K Storage Part", - "item.refinedstorage.16k_storage_part": "16K Storage Part", - "item.refinedstorage.64k_storage_part": "64K Storage Part", - "item.refinedstorage.1k_storage_disk": "1K Storage Disk", - "item.refinedstorage.4k_storage_disk": "4K Storage Disk", - "item.refinedstorage.16k_storage_disk": "16K Storage Disk", - "item.refinedstorage.64k_storage_disk": "64K Storage Disk", - "item.refinedstorage.storage_disk.help": "Stores %s items. When empty, use while holding to return the Storage Part. Upgradeable to a higher tier by combining with a Storage Part.", - "item.refinedstorage.storage_block.help": "Stores %s items. When empty, use while holding to return the Storage Part and Machine Casing. Upgradeable to a higher tier by combining with a Storage Part.", - "item.refinedstorage.creative_storage_disk": "Creative Storage Disk", - "item.refinedstorage.creative_storage_disk.help": "Stores an infinite amount of items.", - "item.refinedstorage.creative_storage_block.help": "Stores an infinite amount of items.", - "item.refinedstorage.64b_fluid_storage_part": "64B Fluid Storage Part", - "item.refinedstorage.256b_fluid_storage_part": "256B Fluid Storage Part", - "item.refinedstorage.1024b_fluid_storage_part": "1024B Fluid Storage Part", - "item.refinedstorage.4096b_fluid_storage_part": "4096B Fluid Storage Part", - "item.refinedstorage.64b_fluid_storage_disk": "64B Fluid Storage Disk", - "item.refinedstorage.256b_fluid_storage_disk": "256B Fluid Storage Disk", - "item.refinedstorage.1024b_fluid_storage_disk": "1024B Fluid Storage Disk", - "item.refinedstorage.4096b_fluid_storage_disk": "4096B Fluid Storage Disk", - "item.refinedstorage.fluid_storage_disk.help": "Stores %s buckets.", - "item.refinedstorage.fluid_storage_block.help": "Stores %s buckets.", - "item.refinedstorage.creative_fluid_storage_disk": "Creative Fluid Storage Disk", - "item.refinedstorage.creative_fluid_storage_disk.help": "Stores an infinite amount of buckets.", - "item.refinedstorage.creative_fluid_storage_block.help": "Stores an infinite amount of buckets.", - "item.refinedstorage.storage_housing": "Storage Housing", - "item.refinedstorage.construction_core": "Construction Core", - "item.refinedstorage.destruction_core": "Destruction Core", - "item.refinedstorage.wrench": "Wrench", - "item.refinedstorage.wrench.help": "Use to rotate blocks or press SHIFT and use to dismantle Refined Storage blocks.", - "item.refinedstorage.upgrade": "Upgrade", - "item.refinedstorage.speed_upgrade": "Speed Upgrade", - "item.refinedstorage.speed_upgrade.help": "Increases the operation speed of a storage network device.", - "item.refinedstorage.stack_upgrade": "Stack Upgrade", - "item.refinedstorage.stack_upgrade.help": "Increases the amount of resources that the storage network device handles per operation.", - "item.refinedstorage.silk_touch_upgrade": "Silk Touch Upgrade", - "item.refinedstorage.silk_touch_upgrade.help": "Acts like the Silk Touch enchantment on a pickaxe.", - "item.refinedstorage.fortune_upgrade.1": "Fortune I Upgrade", - "item.refinedstorage.fortune_upgrade.2": "Fortune II Upgrade", - "item.refinedstorage.fortune_upgrade.3": "Fortune III Upgrade", - "item.refinedstorage.fortune_upgrade.help": "Yields more resources when breaking a block. Acts like the Fortune enchantment on a pickaxe.", - "item.refinedstorage.regulator_upgrade": "Regulator Upgrade", - "item.refinedstorage.regulator_upgrade.help": "In an Exporter, will only export if the amount in the target is less than configured in the upgrade. In an Importer, will only import if the amount in the target is more than configured in the upgrade. Use item to configure.", - "item.refinedstorage.range_upgrade": "Range Upgrade", - "item.refinedstorage.range_upgrade.help": "Increases the range of the Wireless Transmitter.", - "item.refinedstorage.creative_range_upgrade": "Creative Range Upgrade", - "item.refinedstorage.creative_range_upgrade.help": "Provides infinite range for the Wireless Transmitter. Does not work cross-dimensionally.", - "item.refinedstorage.wireless_grid": "Wireless Grid", - "item.refinedstorage.creative_wireless_grid": "Creative Wireless Grid", - "item.refinedstorage.wireless_transmitter.help": "Provides wireless network access for items like the Wireless Grid. Multiple are allowed in an area for wider coverage.", - "item.refinedstorage.network_item.unbound": "Unbound.", - "item.refinedstorage.network_item.unbound.help": "Use on any storage network device to bind.", - "item.refinedstorage.network_item.bound_to": "Bound to %d, %d, %d.", - "item.refinedstorage.network_item.cannot_open_with_shortcut_due_to_duplicate": "There is more than one %s in your inventory.", - "item.refinedstorage.network_item.cannot_open_because_not_found": "There isn't any %s in your inventory.", - "item.refinedstorage.configuration_card": "Configuration Card", - "item.refinedstorage.configuration_card.empty": "Empty.", - "item.refinedstorage.configuration_card.configured": "Contains configuration for %s.", - "item.refinedstorage.configuration_card.copied_configuration": "Copied configuration for %s.", - "item.refinedstorage.configuration_card.cleared_configuration": "Cleared configuration.", - "item.refinedstorage.configuration_card.cannot_apply_configuration": "Cannot apply configuration card to different type of device. It is configured for %s.", - "item.refinedstorage.configuration_card.applied_configuration": "Applied configuration.", - "item.refinedstorage.configuration_card.empty_help": "Use on a storage network device while crouching to copy its configuration and upgrades to the card.", - "item.refinedstorage.configuration_card.configured_help": "Use on the destination storage network device while crouching to transfer the configuration and upgrades. Use while crouching to clear.", - "item.refinedstorage.network_card": "Network Card", - "item.refinedstorage.network_card.unbound_help": "Use while crouching on a Network Receiver.", - "item.refinedstorage.network_card.unbound": "Unbound.", - "item.refinedstorage.network_card.bound_help": "Insert into a Network Transmitter. Use while crouching to clear binding.", - "item.refinedstorage.network_card.bound": "Bound to %d, %d, %d in %s.", - "item.refinedstorage.network_transmitter.help": "Transmits a network signal wirelessly. Needs a Network Card that is paired with a Network Receiver.", - "item.refinedstorage.network_receiver.help": "Receives a network signal wirelessly. Bind a Network Card to this block.", - "item.refinedstorage.cable.help": "Connects storage network devices with each other. For full blocks, will connect to any color. For cable blocks, will only connect to the same color or to the default color (gray).", - "item.refinedstorage.security_card": "Security Card", - "item.refinedstorage.security_card.cleared_configuration": "Cleared configuration.", - "item.refinedstorage.security_card.unbound": "Unbound.", - "item.refinedstorage.security_card.unbound.help": "Right click to configure and bind to the current player.", - "item.refinedstorage.security_card.bound": "Bound to %s.", - "item.refinedstorage.security_card.bound.help": "Right click to configure. Use while crouching to clear configuration and binding.", - "item.refinedstorage.fallback_security_card": "Fallback Security Card", - "item.refinedstorage.fallback_security_card.help": "Acts as a fallback if no matching Security Card for a player is found. Right click to configure. Use while crouching to clear configuration.", - "item.refinedstorage.portable_grid.help": "Allows to interact with a storage disk while not being connected to a storage network. Can be used as a block in world, or from your inventory.", - "item.refinedstorage.storage_monitor.help": "A block that displays the current amount of a certain resource in your storage network. SHIFT + right click to configure. Left click to extract a stack, SHIFT + left click to extract a single resource, right click to insert a resource, right click multiple times to insert resources in bulk.", - "item.refinedstorage.pattern": "Pattern", - "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", - "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", - "misc.refinedstorage.stored": "Stored: %s", - "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", + "gui.refinedstorage.fuzzy_mode.off.storage_help": "Corresponder exatamente os filtros da lista de permissão ou lista de bloqueios.", + "gui.refinedstorage.fuzzy_mode.off.generic_help": "Corresponder exatamente aos filtros.", + "gui.refinedstorage.fuzzy_mode.off.extracting_storage_network_help": "Corresponder exatamente os filtros quando extraídos da rede de armazenamento.", + "gui.refinedstorage.fuzzy_mode.off.extracting_source_help": "Corresponder exatamente os filtros quando extraídos da fonte.", + "gui.refinedstorage.access_mode": "Modo de acesso", + "gui.refinedstorage.access_mode.insert_extract": "Inserir e extrair", + "gui.refinedstorage.access_mode.insert_extract.help": "A rede de armazenamento tera permissão de inserir ou extrair desse armazenamento.", + "gui.refinedstorage.access_mode.insert": "Apenas inserir", + "gui.refinedstorage.access_mode.insert.help": "A rede de armazenamento tera permissão de inserir nesse armazenamento. Os recursos contidos ainda serão visíveis em uma grade.", + "gui.refinedstorage.access_mode.extract": "Apenas extrair", + "gui.refinedstorage.access_mode.extract.help": "A rede de armazenamento apenas tera permissão de extrair desse armazenamento.", + "gui.refinedstorage.void_excess": "Descartar recursos excedentes", + "gui.refinedstorage.void_excess.help": "Quando o modo de descarte está ativo e o armazenamento está cheio, continuara aceitando recursos, mas os descartando.", + "gui.refinedstorage.void_excess.allowlist_warning": "Descarte de excesso apenas irá ocorrer quando o armazenamento estiver com a lista de permissão ativa.", + "gui.refinedstorage.empty_upgrade_slot": "Espaço para Upgrade vazio", + "gui.refinedstorage.filter_slot.empty_filter": "Filtro vazio", + "gui.refinedstorage.filter_slot.left_click_for": "Botão esquerdo para", + "gui.refinedstorage.filter_slot.right_click_for": "Botão direito para", + "gui.refinedstorage.filter_slot.click_to_clear": "Clique para limpar", + "gui.refinedstorage.filter_slot.click_to_configure_amount": "Clique para configurar quantia", + "gui.refinedstorage.filter_slot.shift_click_to_clear": "Shift clique para limpar", + "gui.refinedstorage.regulator_upgrade.filter_help": "O recurso deve ser regulado no alvo.", + "gui.refinedstorage.network_transmitter.status.inactive": "Inativo", + "gui.refinedstorage.network_transmitter.status.missing_network_card": "Cartão de rede ausente", + "gui.refinedstorage.network_transmitter.status.transmitting": "%d bloco(s)", + "gui.refinedstorage.network_transmitter.status.receiver_unreachable": "Inacessível", + "gui.refinedstorage.security_card.permission.reset": "Redefinir", + "gui.refinedstorage.security_card.permission.modified": "Modificado", + "gui.refinedstorage.security_manager.redstone_mode_help": "Quando esse dispositivo estiver inativo, a rede não será protegida.", + "gui.refinedstorage.security_manager.fallback_security_card_slot_hint": "Espaço para um Cartão de Segurança de Fallback.", + "gui.refinedstorage.security_manager.no_fallback_security_card_consequence": "Adicione um cartão de segurança Fallback no slot definindo as permissões para todos os jogadores sem um cartão de segurança. Por padrão, todas as ações são negadas.", + "gui.refinedstorage.relay.filter_help": "Recursos e padrões que devem ser expostos da rede de entrada para a rede de saída, caso o Relé não esteja no modo de passagem.", + "gui.refinedstorage.relay.pass_through": "Passagem", + "gui.refinedstorage.relay.pass_through.help": "Se este dispositivo deve passar o sinal completo da rede de entrada como está. Desative isso para expor seletivamente componentes à rede de saída.", + "gui.refinedstorage.relay.pass_energy": "Passar energia", + "gui.refinedstorage.relay.pass_energy.help": "Se este dispositivo deve passar energia da rede de entrada para a rede de saída.", + "gui.refinedstorage.relay.pass_storage": "Passar armazenamento", + "gui.refinedstorage.relay.pass_storage.help": "Se este dispositivo deve passar o armazenamento da rede de entrada para a rede de saída.", + "gui.refinedstorage.relay.pass_security": "Passar segurança", + "gui.refinedstorage.relay.pass_security.help": "Se este dispositivo deve passar as configurações de segurança da rede de entrada para a rede de saída.", + "gui.refinedstorage.relay.pass_autocrafting": "Passar auto-fabricação", + "gui.refinedstorage.relay.pass_autocrafting.help": "Se este dispositivo deve passar os modelos de auto-fabricação da rede de entrada para a rede de saída.", + "gui.refinedstorage.relay.filter_mode.allow.help": "Apenas expõe os recursos da rede de entrada para a rede de saída que estão nos filtros.", + "gui.refinedstorage.relay.filter_mode.block.help": "Não expor recursos da rede de entrada para a rede de saída que estão nos filtros.", + "gui.refinedstorage.disk_interface.filter_mode.allow.help": "Apenas permitir recursos nos discos ou na rede configurados nos filtros.", + "gui.refinedstorage.disk_interface.filter_mode.block.help": "Restringir recursos nos discos ou na rede configurados nos filtros.", + "gui.refinedstorage.disk_interface.in": "Entrada", + "gui.refinedstorage.disk_interface.out": "Saída", + "gui.refinedstorage.disk_interface.filter_help": "Os recursos que podem ou não ser permitidos para transferência de ou para os discos de armazenamento fornecidos, dependendo se o dispositivo está no modo de lista de permissões ou lista de bloqueios.", + "gui.refinedstorage.disk_interface.transfer_mode": "Modo de transferência", + "gui.refinedstorage.disk_interface.transfer_mode.insert_into_network": "Inserir na rede", + "gui.refinedstorage.disk_interface.transfer_mode.insert_into_network.help": "Inserir os recursos do disco de armazenamento no armazenamento de rede.", + "gui.refinedstorage.disk_interface.transfer_mode.extract_from_network": "Extrair da rede", + "gui.refinedstorage.disk_interface.transfer_mode.extract_from_network.help": "Inserir os recursos da rede de armazenamento nos discos de armazenamento.", + "gui.refinedstorage.autocrafter.empty_pattern_slot": "Slot de modelo vazio", + "gui.refinedstorage.autocrafter.lock_mode": "Modo de bloqueio", + "gui.refinedstorage.autocrafter.lock_mode.never": "Nunca", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_redstone_pulse_received": "Bloquear até que um pulso de redstone seja recebido", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_connected_machine_is_empty": "Bloquear até que a máquina conectada esteja vazia", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Bloquear até que todas as saídas sejam recebidas", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Bloquear até um alto sinal de redstone", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Bloquear até um baixo sinal de redstone", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", + "gui.refinedstorage.autocrafter.edit_name": "Editar", + "gui.refinedstorage.autocrafter.chained": "Encadeado", + "gui.refinedstorage.autocrafter.chained.help": "Essa auto-fabricadora é parte de uma cadeia.", + "gui.refinedstorage.autocrafter.chained.head_help": "Essa auto-fabricadora é a cabeça da cadeia.", + "gui.refinedstorage.autocrafter.not_chained": "Não encadeado", + "gui.refinedstorage.autocrafter.not_chained.help": "Se outra auto-fabricadora estiver apontado para está, eles vão formar uma cadeia, permitindo ter mais modelos numa única maquina.", + "gui.refinedstorage.autocrafting_preview.title": "Auto-fabricadora", + "gui.refinedstorage.autocrafting_preview.start": "Iniciar", + "gui.refinedstorage.autocrafting_preview.pending": "Pendente", + "gui.refinedstorage.autocrafting_preview.start.missing_resources": "Faltam recursos.", + "gui.refinedstorage.autocrafting_preview.available": "Disponível: %s", + "gui.refinedstorage.autocrafting_preview.to_craft": "Para fabricar: %s", + "gui.refinedstorage.autocrafting_preview.missing": "Faltando: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", + "item.refinedstorage.controller.help": "Fornece energia à rede de armazenamento. Múltiplos são permitidos em uma única rede de armazenamento.", + "item.refinedstorage.creative_controller.help": "Fornece energia infinita à rede de armazenamento.", + "item.refinedstorage.disk_drive.help": "Aceita discos de armazenamento para fornecer espaço de armazenamento à rede.", + "item.refinedstorage.disk_interface.help": "Transfere recursos entre a rede de armazenamento e discos de armazenamento.", + "item.refinedstorage.grid.help": "Permite interagir com a rede de armazenamento.", + "item.refinedstorage.crafting_grid.help": "Permite a interação com a rede de armazenamento, incluindo habilidades de fabricação.", + "item.refinedstorage.pattern_grid.help": "Permite a criação de Modelos para uso na auto-fabricadora.", + "item.refinedstorage.importer.help": "Importa recursos de uma fonte externa à rede de armazenamento.", + "item.refinedstorage.exporter.help": "Exporta recursos da rede de armazenamento a um destinatário externo.", + "item.refinedstorage.interface.help": "Atua como a combinação de um Importador e Exportador.", + "item.refinedstorage.external_storage.help": "Fornece a rede de armazenamento com armazenamento de uma fonte externa.", + "item.refinedstorage.detector.help": "Emite um sinal de redstone se a rede de armazenamento contiver um recurso igual, acima ou abaixo de um valor especificado.", + "item.refinedstorage.constructor.help": "Coloca blocos de uma rede de armazenamento no mundo.", + "item.refinedstorage.destructor.help": "Destrói blocos do mundo e os coloca na rede de armazenamento.", + "item.refinedstorage.relay.help": "Ative ou desative seções inteiras de uma rede de armazenamento e crie ramificações na sua rede.", + "item.refinedstorage.autocrafter.help": "Aceita modelos para armazenar recursos auto-fabricáveis.", + "item.refinedstorage.quartz_enriched_iron": "Ferro enriquecido em quartzo", + "item.refinedstorage.quartz_enriched_copper": "Cobre enriquecido em quartzo", + "item.refinedstorage.processor_binding": "Ligamento de Processador", + "item.refinedstorage.silicon": "Silício", + "item.refinedstorage.raw_basic_processor": "Processador básico bruto", + "item.refinedstorage.raw_improved_processor": "Processador aprimorado bruto", + "item.refinedstorage.raw_advanced_processor": "Processador avançado bruto", + "item.refinedstorage.basic_processor": "Processador básico", + "item.refinedstorage.improved_processor": "Processador aprimorado", + "item.refinedstorage.advanced_processor": "Processador avançado", + "item.refinedstorage.1k_storage_part": "Parte de armazenamento 1k", + "item.refinedstorage.4k_storage_part": "Parte de armazenamento 4k", + "item.refinedstorage.16k_storage_part": "Parte de armazenamento 16k", + "item.refinedstorage.64k_storage_part": "Parte de armazenamento 64k", + "item.refinedstorage.1k_storage_disk": "Disco de armazenamento 1k", + "item.refinedstorage.4k_storage_disk": "Disco de armazenamento 4k", + "item.refinedstorage.16k_storage_disk": "Disco de armazenamento 16k", + "item.refinedstorage.64k_storage_disk": "Disco de armazenamento 64k", + "item.refinedstorage.storage_disk.help": "Armazena %s itens. Quando vazio, use enquanto segura para devolver a Parte de Armazenamento. Pode ser atualizado para um nível mais alto combinando com uma Parte de Armazenamento.", + "item.refinedstorage.storage_block.help": "Armazena %s itens. Quando vazio, use enquanto segura para devolver a Parte de Armazenamento e o Revestimento da Máquina. Pode ser atualizado para um nível mais alto combinando com uma Parte de Armazenamento.", + "item.refinedstorage.creative_storage_disk": "Disco de armazenamento criativo", + "item.refinedstorage.creative_storage_disk.help": "Armazena uma quantia infinita de itens.", + "item.refinedstorage.creative_storage_block.help": "Armazena uma quantia infinita de itens.", + "item.refinedstorage.64b_fluid_storage_part": "Parte de armazenamento de fluido 64B", + "item.refinedstorage.256b_fluid_storage_part": "Parte de armazenamento de fluido 256B", + "item.refinedstorage.1024b_fluid_storage_part": "Parte de armazenamento de fluido 1024B", + "item.refinedstorage.4096b_fluid_storage_part": "Parte de armazenamento de fluido 4096B", + "item.refinedstorage.64b_fluid_storage_disk": "Disco de armazenamento de fluido 64B", + "item.refinedstorage.256b_fluid_storage_disk": "Disco de armazenamento de fluido 256B", + "item.refinedstorage.1024b_fluid_storage_disk": "Disco de armazenamento de fluido 1024B", + "item.refinedstorage.4096b_fluid_storage_disk": "Disco de armazenamento de fluido 4096B", + "item.refinedstorage.fluid_storage_disk.help": "Armazena %s baldes.", + "item.refinedstorage.fluid_storage_block.help": "Armazena %s baldes.", + "item.refinedstorage.creative_fluid_storage_disk": "Disco de armazenamento de fluido criativo", + "item.refinedstorage.creative_fluid_storage_disk.help": "Armazena uma quantia infinita de baldes.", + "item.refinedstorage.creative_fluid_storage_block.help": "Armazena uma quantia infinita de baldes.", + "item.refinedstorage.storage_housing": "Estrutura de Armazenamento", + "item.refinedstorage.construction_core": "Núcleo de construção", + "item.refinedstorage.destruction_core": "Núcleo de destruição", + "item.refinedstorage.wrench": "Chave inglesa", + "item.refinedstorage.wrench.help": "Use para rotacionar blocos ou pressione SHIFT e use para desmontar blocos do Refined Storage.", + "item.refinedstorage.upgrade": "Aprimoramento", + "item.refinedstorage.speed_upgrade": "Aprimoramento de velocidade", + "item.refinedstorage.speed_upgrade.help": "Aumenta a velocidade de operação de um aparelho da rede de armazenamento.", + "item.refinedstorage.stack_upgrade": "Aprimoramento de pilha", + "item.refinedstorage.stack_upgrade.help": "Aumenta a quantia de recursos que um dispositivo da rede de armazenamento lida por operação.", + "item.refinedstorage.silk_touch_upgrade": "Aprimoramento de toque suave", + "item.refinedstorage.silk_touch_upgrade.help": "Atua como o encantamento de toque suave em uma picareta.", + "item.refinedstorage.fortune_upgrade.1": "Aprimoramento de fortuna I", + "item.refinedstorage.fortune_upgrade.2": "Aprimoramento de fortuna II", + "item.refinedstorage.fortune_upgrade.3": "Aprimoramento de fortuna III", + "item.refinedstorage.fortune_upgrade.help": "Produz mais recursos ao quebrar um bloco. Atua como o encantamento de fortuna numa picareta.", + "item.refinedstorage.regulator_upgrade": "Aprimoramento regulador", + "item.refinedstorage.regulator_upgrade.help": "Em um Exportador, só exportará se a quantidade no destino for menor que a configurada no aprimoramento. Em um Importador, só importará se a quantidade no destino for maior que a configurada no aprimoramento. Use um item para configurar.", + "item.refinedstorage.range_upgrade": "Aprimoramento de alcance", + "item.refinedstorage.range_upgrade.help": "Aumenta o alcance de um transmissor sem fio.", + "item.refinedstorage.creative_range_upgrade": "Aprimoramento de alcance criativo", + "item.refinedstorage.creative_range_upgrade.help": "Fornece alcance infinito para um transmissor sem fio. Não funciona entre-dimensões.", + "item.refinedstorage.wireless_grid": "Grade sem fio", + "item.refinedstorage.creative_wireless_grid": "Grade sem fio criativa", + "item.refinedstorage.wireless_transmitter.help": "Fornece acesso à rede sem fio para itens como rede sem fio. Múltiplos são permitidos em uma área para uma cobertura mais ampla.", + "item.refinedstorage.network_item.unbound": "Desvinculado.", + "item.refinedstorage.network_item.unbound.help": "Use num dispositivo de armazenamento para ligar.", + "item.refinedstorage.network_item.bound_to": "Vinculado a %d, %d, %d.", + "item.refinedstorage.network_item.cannot_open_with_shortcut_due_to_duplicate": "Há mais de um %s em seu inventário.", + "item.refinedstorage.network_item.cannot_open_because_not_found": "Não há %s no seu inventário.", + "item.refinedstorage.configuration_card": "Cartão de Configuração", + "item.refinedstorage.configuration_card.empty": "Vazio.", + "item.refinedstorage.configuration_card.configured": "Contém configuração para %s,.", + "item.refinedstorage.configuration_card.copied_configuration": "Configuração copiada para %s.", + "item.refinedstorage.configuration_card.cleared_configuration": "Configuração apagada.", + "item.refinedstorage.configuration_card.cannot_apply_configuration": "Não é possível aplicar o cartão de configuração para um tipo diferente de dispositivo. Configurado para %s.", + "item.refinedstorage.configuration_card.applied_configuration": "Configurações aplicadas.", + "item.refinedstorage.configuration_card.empty_help": "Use em um dispositivo da rede de armazenamento enquanto estiver agachado para copiar sua configuração e atualizar para o cartão.", + "item.refinedstorage.configuration_card.configured_help": "Use em um dispositivo da rede de armazenamento enquanto estiver agachado para transferir as configurações e aprimoramentos. Use enquanto agachado para apagar.", + "item.refinedstorage.network_card": "Cartão de Rede", + "item.refinedstorage.network_card.unbound_help": "Use enquanto agachado em um receptor de rede.", + "item.refinedstorage.network_card.unbound": "Desvinculado.", + "item.refinedstorage.network_card.bound_help": "Insira em um Transmissor de Rede. Use enquanto agachado para limpar a vinculação.", + "item.refinedstorage.network_card.bound": "Vinculado a %d, %d, %d em %s.", + "item.refinedstorage.network_transmitter.help": "Transmite um sinal de rede sem fio. Precisa de um cartão de rede pareado com um receptor de rede.", + "item.refinedstorage.network_receiver.help": "Recebe um sinal de rede sem fio. Vincule a um Cartão de Rede a esse bloco.", + "item.refinedstorage.cable.help": "Conecta os dispositivos da rede de armazenamento entre si. Para blocos sólidos, conecta-se a qualquer cor. Para blocos de cabo, conecta-se apenas à mesma cor ou à cor padrão (cinza).", + "item.refinedstorage.security_card": "Cartão de segurança", + "item.refinedstorage.security_card.cleared_configuration": "Configurações apagadas.", + "item.refinedstorage.security_card.unbound": "Desvinculado.", + "item.refinedstorage.security_card.unbound.help": "Botão direito para configurar e vincular ao jogador atual.", + "item.refinedstorage.security_card.bound": "Vinculado a %s.", + "item.refinedstorage.security_card.bound.help": "Botão direito para configurar. Use enquanto agachado para limpar as configurações e o vínculo.", + "item.refinedstorage.fallback_security_card": "Cartão de Segurança Fallback", + "item.refinedstorage.fallback_security_card.help": "Atua como um Fallback se nenhum cartão de segurança correspondente para um jogador for encontrado. Clique com o botão direito para configurar. Use enquanto agachado para limpar a configuração.", + "item.refinedstorage.portable_grid.help": "Permite interagir com um disco de armazenamento sem estar conectado a uma rede de armazenamento. Pode ser usado como um bloco no mundo ou do seu inventário.", + "item.refinedstorage.storage_monitor.help": "Um bloco que exibe a quantidade atual de um determinado recurso na sua rede de armazenamento. SHIFT + clique direito para configurar. Clique esquerdo para extrair uma pilha, SHIFT + clique esquerdo para extrair um único recurso, clique direito para inserir um recurso, clique direito várias vezes para inserir recursos em massa.", + "item.refinedstorage.pattern": "Modelo", + "item.refinedstorage.pattern.fuzzy_mode": "Modo difuso", + "item.refinedstorage.pattern.help": "Usado na auto-fabricação para armazenar a receita para ser criada. Use enquanto agachado para limpar.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", + "misc.refinedstorage.stored": "Armazenado: %s", + "misc.refinedstorage.stored_with_capacity": "Armazenado: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", - "misc.refinedstorage.last_modified.just_now": "Last modified just now by %s", - "misc.refinedstorage.last_modified.second": "Last modified %d second ago by %s", - "misc.refinedstorage.last_modified.seconds": "Last modified %d seconds ago by %s", - "misc.refinedstorage.last_modified.minute": "Last modified %d minute ago by %s", - "misc.refinedstorage.last_modified.minutes": "Last modified %d minutes ago by %s", - "misc.refinedstorage.last_modified.hour": "Last modified %d hour ago by %s", - "misc.refinedstorage.last_modified.hours": "Last modified %d hours ago by %s", - "misc.refinedstorage.last_modified.day": "Last modified %d day ago by %s", - "misc.refinedstorage.last_modified.days": "Last modified %d days ago by %s", - "misc.refinedstorage.last_modified.week": "Last modified %d week ago by %s", - "misc.refinedstorage.last_modified.weeks": "Last modified %d weeks ago by %s", - "misc.refinedstorage.last_modified.year": "Last modified %d year ago by %s", - "misc.refinedstorage.last_modified.years": "Last modified %d years ago by %s", + "misc.refinedstorage.last_modified.just_now": "Última modificação agora mesmo por %s", + "misc.refinedstorage.last_modified.second": "Última modificação %d segundo atrás por %s", + "misc.refinedstorage.last_modified.seconds": "Última modificação %d segundos atrás por %s", + "misc.refinedstorage.last_modified.minute": "Última modificação %d minuto atrás por %s", + "misc.refinedstorage.last_modified.minutes": "Última modificação %d minutos atrás por %s", + "misc.refinedstorage.last_modified.hour": "Última modificação %d hora atrás por %s", + "misc.refinedstorage.last_modified.hours": "Última modificação %d horas atrás por %s", + "misc.refinedstorage.last_modified.day": "Última modificação %d dia atrás por %s", + "misc.refinedstorage.last_modified.days": "Última modificação %d dias atrás por %s", + "misc.refinedstorage.last_modified.week": "Última modificação %d semana atrás por %s", + "misc.refinedstorage.last_modified.weeks": "Última modificação %d semanas atrás por %s", + "misc.refinedstorage.last_modified.year": "Última modificação %d ano atrás por %s", + "misc.refinedstorage.last_modified.years": "Última modificação %d anos atrás por %s", "misc.refinedstorage.resource_type.item": "Item", - "misc.refinedstorage.resource_type.fluid": "Fluid", - "misc.refinedstorage.press_shift_for_help": "Press SHIFT for help", - "misc.refinedstorage.no_permission": "No permission", - "misc.refinedstorage.no_permission.open": "You are not allowed to open the %s.", - "misc.refinedstorage.no_permission.insert": "You are not allowed to insert.", - "misc.refinedstorage.no_permission.extract": "You are not allowed to extract.", - "misc.refinedstorage.no_permission.build.place": "You are not allowed to place a %s here.", - "misc.refinedstorage.no_permission.build.break": "You are not allowed to break the %s.", - "misc.refinedstorage.no_permission.build.rotate": "You are not allowed to rotate the %s.", - "misc.refinedstorage.no_permission.build.dismantle": "You are not allowed to dismantle the %s.", - "misc.refinedstorage.pattern.crafting": "Crafting Pattern", - "misc.refinedstorage.pattern.processing": "Processing Pattern", - "misc.refinedstorage.pattern.stonecutter": "Stonecutter Pattern", - "misc.refinedstorage.pattern.smithing_table": "Smithing Table Pattern", - "key.refinedstorage.focus_search_bar": "Focus search bar", - "key.refinedstorage.clear_crafting_grid_matrix_to_network": "Clear Crafting Grid matrix to network", - "key.refinedstorage.clear_crafting_grid_matrix_to_inventory": "Clear Crafting Grid matrix to inventory", - "key.refinedstorage.open_wireless_grid": "Open Wireless Grid", - "key.refinedstorage.open_portable_grid": "Open Portable Grid", - "refinedstorage.subtitle.wrench": "Wrench used", - "permission.refinedstorage.insert": "Insert", - "permission.refinedstorage.insert.description": "Whether the player can insert resources in a network.", - "permission.refinedstorage.extract": "Extract", - "permission.refinedstorage.extract.description": "Whether the player can extract resources from a network.", - "permission.refinedstorage.autocrafting": "Autocrafting", - "permission.refinedstorage.autocrafting.description": "Whether the player can start, cancel or view an autocrafting task.", - "permission.refinedstorage.open": "Open", - "permission.refinedstorage.open.description": "Whether the player can open network device GUIs.", - "permission.refinedstorage.build": "Build", - "permission.refinedstorage.build.description": "Whether the player can add or remove network devices.", - "permission.refinedstorage.security": "Security", - "permission.refinedstorage.security.description": "Whether the player can manage the security options for a network.", - "tag.item.refinedstorage.cables": "Cables", - "tag.item.refinedstorage.constructors": "Constructors", - "tag.item.refinedstorage.controllers": "Controllers", - "tag.item.refinedstorage.crafting_grids": "Crafting Grids", - "tag.item.refinedstorage.pattern_grids": "Pattern Grids", - "tag.item.refinedstorage.creative_controllers": "Creative Controllers", - "tag.item.refinedstorage.destructors": "Destructors", - "tag.item.refinedstorage.detectors": "Detectors", - "tag.item.refinedstorage.exporters": "Exporters", - "tag.item.refinedstorage.external_storages": "External Storages", - "tag.item.refinedstorage.fluid_storage_disks": "Fluid Storage Disks", - "tag.item.refinedstorage.grids": "Grids", - "tag.item.refinedstorage.importers": "Importers", - "tag.item.refinedstorage.network_receivers": "Network Receivers", - "tag.item.refinedstorage.network_transmitters": "Network Transmitters", - "tag.item.refinedstorage.relays": "Relays", - "tag.item.refinedstorage.security_managers": "Security Managers", - "tag.item.refinedstorage.storage_disks": "Storage Disks", - "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", - "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", - "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", - "refinedstorage.configuration.title": "Refined Storage Configuration", - "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", - "refinedstorage.configuration.section.refinedstorage.common.toml.title": "Refined Storage Configuration", - "text.autoconfig.refinedstorage.option.smoothScrolling": "Smooth scrolling", - "text.autoconfig.refinedstorage.option.smoothScrolling.tooltip": "Whether scrollbars should use smooth scrolling.", - "text.autoconfig.refinedstorage.option.screenSize": "Screen size", - "text.autoconfig.refinedstorage.option.screenSize.tooltip": "The screen size.", - "text.autoconfig.refinedstorage.option.maxRowsStretch": "Maximum amount of rows when screen size is stretched", - "text.autoconfig.refinedstorage.option.maxRowsStretch.tooltip": "The maximum amount of rows that can be displayed when the screen size is stretched.", - "text.autoconfig.refinedstorage.option.grid": "Grid", - "text.autoconfig.refinedstorage.option.grid.tooltip": "Configuration for the Grid.", - "text.autoconfig.refinedstorage.option.grid.largeFont": "Large font", - "text.autoconfig.refinedstorage.option.grid.largeFont.tooltip": "Whether the Grid should use a large font for quantities.", - "text.autoconfig.refinedstorage.option.grid.preventSortingWhileShiftIsDown": "Prevent sorting while SHIFT is down", - "text.autoconfig.refinedstorage.option.grid.preventSortingWhileShiftIsDown.tooltip": "Whether the Grid should avoid sorting when shift is held down.", - "text.autoconfig.refinedstorage.option.grid.detailedTooltip": "Detailed tooltip", - "text.autoconfig.refinedstorage.option.grid.detailedTooltip.tooltip": "Whether the Grid should show a detailed tooltip.", - "text.autoconfig.refinedstorage.option.grid.rememberSearchQuery": "Remember search query", - "text.autoconfig.refinedstorage.option.grid.rememberSearchQuery.tooltip": "Whether the search query should persist when closing and re-opening the Grid.", - "text.autoconfig.refinedstorage.option.grid.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.grid.energyUsage.tooltip": "The energy used by the Grid.", - "text.autoconfig.refinedstorage.option.grid.autoSelected": "Auto selected search box", - "text.autoconfig.refinedstorage.option.grid.autoSelected.tooltip": "Whether the search box should be auto-selected when opening the Grid.", - "text.autoconfig.refinedstorage.option.grid.synchronizer": "Synchronizer", - "text.autoconfig.refinedstorage.option.grid.synchronizer.tooltip": "The synchronization type of the Grid search box.", - "text.autoconfig.refinedstorage.option.grid.resourceType": "Resource type", - "text.autoconfig.refinedstorage.option.grid.resourceType.tooltip": "The resource type to be shown.", - "text.autoconfig.refinedstorage.option.grid.sortingDirection": "Sorting direction", - "text.autoconfig.refinedstorage.option.grid.sortingDirection.tooltip": "The sorting direction.", - "text.autoconfig.refinedstorage.option.grid.sortingType": "Sorting type", - "text.autoconfig.refinedstorage.option.grid.sortingType.tooltip": "The sorting type.", - "text.autoconfig.refinedstorage.option.grid.viewType": "View type", - "text.autoconfig.refinedstorage.option.grid.viewType.tooltip": "The view type.", - "text.autoconfig.refinedstorage.option.craftingGrid": "Crafting Grid", - "text.autoconfig.refinedstorage.option.craftingGrid.tooltip": "Configuration for the Crafting Grid.", - "text.autoconfig.refinedstorage.option.craftingGrid.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.craftingGrid.energyUsage.tooltip": "The energy used by the Crafting Grid.", - "text.autoconfig.refinedstorage.option.craftingGrid.craftingMatrixCloseBehavior": "Crafting matrix close behavior", - "text.autoconfig.refinedstorage.option.craftingGrid.craftingMatrixCloseBehavior.tooltip": "What should happen to the crafting matrix slots when closing the Crafting Grid.", - "text.autoconfig.refinedstorage.option.patternGrid": "Pattern Grid", - "text.autoconfig.refinedstorage.option.patternGrid.tooltip": "Configuration for the Pattern Grid.", - "text.autoconfig.refinedstorage.option.patternGrid.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.patternGrid.energyUsage.tooltip": "The energy used by the Pattern Grid.", - "text.autoconfig.refinedstorage.option.controller": "Controller", - "text.autoconfig.refinedstorage.option.controller.tooltip": "Configuration for the Controller.", - "text.autoconfig.refinedstorage.option.controller.energyCapacity": "Energy capacity", - "text.autoconfig.refinedstorage.option.controller.energyCapacity.tooltip": "The energy capacity of the Controller.", - "text.autoconfig.refinedstorage.option.cable": "Cable", - "text.autoconfig.refinedstorage.option.cable.tooltip": "Configuration for the Cable.", - "text.autoconfig.refinedstorage.option.cable.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.cable.energyUsage.tooltip": "The energy used by the Cable.", - "text.autoconfig.refinedstorage.option.diskDrive": "Disk Drive", - "text.autoconfig.refinedstorage.option.diskDrive.tooltip": "Configuration for the Disk Drive.", - "text.autoconfig.refinedstorage.option.diskDrive.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.diskDrive.energyUsage.tooltip": "The energy used by the Disk Drive.", - "text.autoconfig.refinedstorage.option.diskDrive.energyUsagePerDisk": "Energy usage per disk", - "text.autoconfig.refinedstorage.option.diskDrive.energyUsagePerDisk.tooltip": "The energy used per disk.", - "text.autoconfig.refinedstorage.option.diskInterface": "Disk Interface", - "text.autoconfig.refinedstorage.option.diskInterface.tooltip": "Configuration for the Disk Interface.", - "text.autoconfig.refinedstorage.option.diskInterface.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.diskInterface.energyUsage.tooltip": "The energy used by the Disk Interface.", - "text.autoconfig.refinedstorage.option.diskInterface.energyUsagePerDisk": "Energy usage per disk", - "text.autoconfig.refinedstorage.option.diskInterface.energyUsagePerDisk.tooltip": "The energy used per disk.", - "text.autoconfig.refinedstorage.option.storageBlock": "Storage Block", - "text.autoconfig.refinedstorage.option.storageBlock.tooltip": "Configuration for the Storage Blocks.", - "text.autoconfig.refinedstorage.option.storageBlock.oneKEnergyUsage": "1K energy usage", - "text.autoconfig.refinedstorage.option.storageBlock.oneKEnergyUsage.tooltip": "The energy used by the 1K Storage Block.", - "text.autoconfig.refinedstorage.option.storageBlock.fourKEnergyUsage": "4K energy usage", - "text.autoconfig.refinedstorage.option.storageBlock.fourKEnergyUsage.tooltip": "The energy used by the 4K Storage Block.", - "text.autoconfig.refinedstorage.option.storageBlock.sixteenKEnergyUsage": "16K energy usage", - "text.autoconfig.refinedstorage.option.storageBlock.sixteenKEnergyUsage.tooltip": "The energy used by the 16K Storage Block.", - "text.autoconfig.refinedstorage.option.storageBlock.sixtyFourKEnergyUsage": "64K energy usage", - "text.autoconfig.refinedstorage.option.storageBlock.sixtyFourKEnergyUsage.tooltip": "The energy used by the 64K Storage Block.", - "text.autoconfig.refinedstorage.option.storageBlock.creativeEnergyUsage": "Creative energy usage", - "text.autoconfig.refinedstorage.option.storageBlock.creativeEnergyUsage.tooltip": "The energy used by the Creative Storage Block.", - "text.autoconfig.refinedstorage.option.fluidStorageBlock": "Fluid Storage Block", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.tooltip": "Configuration for the Fluid Storage Blocks.", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.sixtyFourBEnergyUsage": "64B energy usage", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.sixtyFourBEnergyUsage.tooltip": "The energy used by the 64B Fluid Storage Block.", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.twoHundredFiftySixBEnergyUsage": "256B energy usage", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.twoHundredFiftySixBEnergyUsage.tooltip": "The energy used by the 256B Fluid Storage Block.", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.thousandTwentyFourBEnergyUsage": "1024B energy usage", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.thousandTwentyFourBEnergyUsage.tooltip": "The energy used by the 1024B Fluid Storage Block.", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.fourThousandNinetySixBEnergyUsage": "4096B energy usage", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.fourThousandNinetySixBEnergyUsage.tooltip": "The energy used by the 4096B Fluid Storage Block.", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.creativeEnergyUsage": "Creative energy usage", - "text.autoconfig.refinedstorage.option.fluidStorageBlock.creativeEnergyUsage.tooltip": "The energy used by the Creative Fluid Storage Block.", - "text.autoconfig.refinedstorage.option.importer": "Importer", - "text.autoconfig.refinedstorage.option.importer.tooltip": "Configuration for the Importer.", - "text.autoconfig.refinedstorage.option.importer.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.importer.energyUsage.tooltip": "The energy used by the Importer.", - "text.autoconfig.refinedstorage.option.exporter": "Exporter", - "text.autoconfig.refinedstorage.option.exporter.tooltip": "Configuration for the Exporter.", - "text.autoconfig.refinedstorage.option.exporter.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.exporter.energyUsage.tooltip": "The energy used by the Exporter.", + "misc.refinedstorage.resource_type.fluid": "Fluido", + "misc.refinedstorage.press_shift_for_help": "Pressione SHIFT para obter ajuda", + "misc.refinedstorage.no_permission": "Sem permissão", + "misc.refinedstorage.no_permission.open": "Você não tem permissão para abrir %s.", + "misc.refinedstorage.no_permission.insert": "Você não tem permissão para inserir.", + "misc.refinedstorage.no_permission.extract": "Você não tem permissão para extrair.", + "misc.refinedstorage.no_permission.build.place": "Você não tem permissão para colocar %s aqui.", + "misc.refinedstorage.no_permission.build.break": "Você não tem permissão para quebrar %s.", + "misc.refinedstorage.no_permission.build.rotate": "Você não tem permissão para rotacionar %s.", + "misc.refinedstorage.no_permission.build.dismantle": "Você não tem permissão para desmontar o %s.", + "misc.refinedstorage.pattern.crafting": "Modelo de Fabricação", + "misc.refinedstorage.pattern.processing": "Modelo de processamento", + "misc.refinedstorage.pattern.stonecutter": "Modelo de Cortador de Pedras", + "misc.refinedstorage.pattern.smithing_table": "Modelo de Mesa de Forja", + "key.refinedstorage.focus_search_bar": "Focar na barra de pesquisa", + "key.refinedstorage.clear_crafting_grid_matrix_to_network": "Limpar matriz da grade de criação para a rede", + "key.refinedstorage.clear_crafting_grid_matrix_to_inventory": "Limpar matriz da grade de criação para o inventário", + "key.refinedstorage.open_wireless_grid": "Abrir Grade sem fio", + "key.refinedstorage.open_portable_grid": "Abrir Grade portátil", + "refinedstorage.subtitle.wrench": "Chave inglesa usada", + "permission.refinedstorage.insert": "Inserir", + "permission.refinedstorage.insert.description": "Determina se o jogador pode inserir recursos em uma rede.", + "permission.refinedstorage.extract": "Extrair", + "permission.refinedstorage.extract.description": "Determina se o jogador pode extrair recursos de uma rede.", + "permission.refinedstorage.autocrafting": "Auto-fabricadora", + "permission.refinedstorage.autocrafting.description": "Determina se o jogador pode iniciar, cancelar ou visualizar a tarefa de uma auto-fabricadora.", + "permission.refinedstorage.open": "Abrir", + "permission.refinedstorage.open.description": "Determina se o jogador pode abrir a GUI de um dispositivo de rede.", + "permission.refinedstorage.build": "Construir", + "permission.refinedstorage.build.description": "Determina se o jogador pode adicionar ou remover dispositivos da rede.", + "permission.refinedstorage.security": "Segurança", + "permission.refinedstorage.security.description": "Determina se o jogador pode gerenciar as opções de segurança de uma rede.", + "tag.item.refinedstorage.cables": "Cabos", + "tag.item.refinedstorage.constructors": "Construtores", + "tag.item.refinedstorage.controllers": "Controladores", + "tag.item.refinedstorage.crafting_grids": "Grades de Criação", + "tag.item.refinedstorage.pattern_grids": "Grades de modelo", + "tag.item.refinedstorage.creative_controllers": "Controladores criativos", + "tag.item.refinedstorage.destructors": "Destruidores", + "tag.item.refinedstorage.detectors": "Detectores", + "tag.item.refinedstorage.exporters": "Exportadores", + "tag.item.refinedstorage.external_storages": "Armazenamento Externo", + "tag.item.refinedstorage.fluid_storage_disks": "Discos de Armazenamento de Fluidos", + "tag.item.refinedstorage.grids": "Grades", + "tag.item.refinedstorage.importers": "Importadores", + "tag.item.refinedstorage.network_receivers": "Receptores de Rede", + "tag.item.refinedstorage.network_transmitters": "Transmissores de Rede", + "tag.item.refinedstorage.relays": "Relés", + "tag.item.refinedstorage.security_managers": "Gerenciadores de Segurança", + "tag.item.refinedstorage.storage_disks": "Discos de Armazenamento", + "tag.item.refinedstorage.wireless_transmitters": "Transmissores sem fio", + "tag.item.refinedstorage.disk_interfaces": "Painéis de disco", + "tag.item.refinedstorage.autocrafters": "Auto-fabricadoras", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", + "text.autoconfig.refinedstorage.title": "Configuração Refined Storage", + "refinedstorage.configuration.title": "Configuração Refined Storage", + "refinedstorage.configuration.section.refinedstorage.common.toml": "Configuração Refined Storage", + "refinedstorage.configuration.section.refinedstorage.common.toml.title": "Configuração Refined Storage", + "text.autoconfig.refinedstorage.option.smoothScrolling": "Rolagem suave", + "text.autoconfig.refinedstorage.option.smoothScrolling.tooltip": "Se a barra de rolagem deve usar rolagem suave.", + "text.autoconfig.refinedstorage.option.screenSize": "Tamanho da tela", + "text.autoconfig.refinedstorage.option.screenSize.tooltip": "O Tamanho da tela.", + "text.autoconfig.refinedstorage.option.maxRowsStretch": "Quantidade máxima de linhas quando o tamanho da tela é esticado", + "text.autoconfig.refinedstorage.option.maxRowsStretch.tooltip": "A quantidade máxima de linhas que podem ser exibidas quando o tamanho da tela é esticado.", + "text.autoconfig.refinedstorage.option.grid": "Grade", + "text.autoconfig.refinedstorage.option.grid.tooltip": "Configuração para a grade.", + "text.autoconfig.refinedstorage.option.grid.largeFont": "Fonte grande", + "text.autoconfig.refinedstorage.option.grid.largeFont.tooltip": "Se o Grade deve usar uma fonte grande para quantidades.", + "text.autoconfig.refinedstorage.option.grid.preventSortingWhileShiftIsDown": "Impedir a organização enquanto a tecla SHIFT estiver pressionada", + "text.autoconfig.refinedstorage.option.grid.preventSortingWhileShiftIsDown.tooltip": "Determina se a Grade deve evitar a organização quando a tecla Shift estiver pressionada.", + "text.autoconfig.refinedstorage.option.grid.detailedTooltip": "Dica detalhada", + "text.autoconfig.refinedstorage.option.grid.detailedTooltip.tooltip": "Determina se a Grade deve exibir uma dica detalhada.", + "text.autoconfig.refinedstorage.option.grid.rememberSearchQuery": "Lembrar pesquisa", + "text.autoconfig.refinedstorage.option.grid.rememberSearchQuery.tooltip": "Se a pesquisa deve persistir ao fechar e reabrir a Grade.", + "text.autoconfig.refinedstorage.option.grid.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.grid.energyUsage.tooltip": "A energia usada pela Grade.", + "text.autoconfig.refinedstorage.option.grid.autoSelected": "Caixa de pesquisa selecionada automaticamente", + "text.autoconfig.refinedstorage.option.grid.autoSelected.tooltip": "Se a caixa de pesquisa deve ser auto-selecionada quando abrir a Grade.", + "text.autoconfig.refinedstorage.option.grid.synchronizer": "Sincronizar", + "text.autoconfig.refinedstorage.option.grid.synchronizer.tooltip": "O tipo de sincronização da baixa de pesquisa da Grade.", + "text.autoconfig.refinedstorage.option.grid.resourceType": "Tipo de recurso", + "text.autoconfig.refinedstorage.option.grid.resourceType.tooltip": "O tipo de recurso a ser exibido.", + "text.autoconfig.refinedstorage.option.grid.sortingDirection": "Direção de organização", + "text.autoconfig.refinedstorage.option.grid.sortingDirection.tooltip": "A direção de organização.", + "text.autoconfig.refinedstorage.option.grid.sortingType": "Tipo de organização", + "text.autoconfig.refinedstorage.option.grid.sortingType.tooltip": "O tipo de organização.", + "text.autoconfig.refinedstorage.option.grid.viewType": "Tipo de exibição", + "text.autoconfig.refinedstorage.option.grid.viewType.tooltip": "O tipo de exibição.", + "text.autoconfig.refinedstorage.option.craftingGrid": "Grade de criação", + "text.autoconfig.refinedstorage.option.craftingGrid.tooltip": "Configuração para a Grade de Fabricação.", + "text.autoconfig.refinedstorage.option.craftingGrid.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.craftingGrid.energyUsage.tooltip": "A energia usada pela Grade de Fabricação.", + "text.autoconfig.refinedstorage.option.craftingGrid.craftingMatrixCloseBehavior": "Comportamento ao fechar a matriz de fabricação", + "text.autoconfig.refinedstorage.option.craftingGrid.craftingMatrixCloseBehavior.tooltip": "O que deve acontecer com os espaços da matriz de fabricação ao fechar a Grade de Fabricação.", + "text.autoconfig.refinedstorage.option.patternGrid": "Grade de Modelos", + "text.autoconfig.refinedstorage.option.patternGrid.tooltip": "Configurações da Grade de Modelos.", + "text.autoconfig.refinedstorage.option.patternGrid.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.patternGrid.energyUsage.tooltip": "A energia usada pela Grade de Modelos.", + "text.autoconfig.refinedstorage.option.controller": "Controlador", + "text.autoconfig.refinedstorage.option.controller.tooltip": "Configurações para o Controlador.", + "text.autoconfig.refinedstorage.option.controller.energyCapacity": "Capacidade de energia", + "text.autoconfig.refinedstorage.option.controller.energyCapacity.tooltip": "A capacidade de energia do controlador.", + "text.autoconfig.refinedstorage.option.cable": "Cabo", + "text.autoconfig.refinedstorage.option.cable.tooltip": "Configurações para o cabo.", + "text.autoconfig.refinedstorage.option.cable.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.cable.energyUsage.tooltip": "A energia usada pelo cabo.", + "text.autoconfig.refinedstorage.option.diskDrive": "Leitor de Discos", + "text.autoconfig.refinedstorage.option.diskDrive.tooltip": "Configuração do Leitor de Discos.", + "text.autoconfig.refinedstorage.option.diskDrive.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.diskDrive.energyUsage.tooltip": "O uso de energia do Leitor de Discos.", + "text.autoconfig.refinedstorage.option.diskDrive.energyUsagePerDisk": "Uso de energia por disco", + "text.autoconfig.refinedstorage.option.diskDrive.energyUsagePerDisk.tooltip": "O uso de energia por disco.", + "text.autoconfig.refinedstorage.option.diskInterface": "Painel de disco", + "text.autoconfig.refinedstorage.option.diskInterface.tooltip": "Configurações para a Painel de disco.", + "text.autoconfig.refinedstorage.option.diskInterface.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.diskInterface.energyUsage.tooltip": "A energia usada pelo painel de disco.", + "text.autoconfig.refinedstorage.option.diskInterface.energyUsagePerDisk": "Uso de energia por disco", + "text.autoconfig.refinedstorage.option.diskInterface.energyUsagePerDisk.tooltip": "A energia usada por disco.", + "text.autoconfig.refinedstorage.option.storageBlock": "Bloco de armazenamento", + "text.autoconfig.refinedstorage.option.storageBlock.tooltip": "Configuração para os Blocos de Armazenamento.", + "text.autoconfig.refinedstorage.option.storageBlock.oneKEnergyUsage": "Uso de energia 1K", + "text.autoconfig.refinedstorage.option.storageBlock.oneKEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento de 1K.", + "text.autoconfig.refinedstorage.option.storageBlock.fourKEnergyUsage": "Uso de energia 4K", + "text.autoconfig.refinedstorage.option.storageBlock.fourKEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento de 4K.", + "text.autoconfig.refinedstorage.option.storageBlock.sixteenKEnergyUsage": "Uso de energia 16K", + "text.autoconfig.refinedstorage.option.storageBlock.sixteenKEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento de 16K.", + "text.autoconfig.refinedstorage.option.storageBlock.sixtyFourKEnergyUsage": "Uso de energia 64K", + "text.autoconfig.refinedstorage.option.storageBlock.sixtyFourKEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento de 64K.", + "text.autoconfig.refinedstorage.option.storageBlock.creativeEnergyUsage": "Uso de energia Criativo", + "text.autoconfig.refinedstorage.option.storageBlock.creativeEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento de criativo.", + "text.autoconfig.refinedstorage.option.fluidStorageBlock": "Bloco de armazenamento de Fluido", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.tooltip": "Configuração para os blocos de armazenamento de fluidos.", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.sixtyFourBEnergyUsage": "Uso de energia 64B", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.sixtyFourBEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento fluido 64B.", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.twoHundredFiftySixBEnergyUsage": "Uso de energia 256B", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.twoHundredFiftySixBEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento fluido 256B.", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.thousandTwentyFourBEnergyUsage": "Uso de energia 1024B", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.thousandTwentyFourBEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento fluido 1024B.", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.fourThousandNinetySixBEnergyUsage": "Uso de energia 4096B", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.fourThousandNinetySixBEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento fluido 4096B.", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.creativeEnergyUsage": "Uso de energia Criativo", + "text.autoconfig.refinedstorage.option.fluidStorageBlock.creativeEnergyUsage.tooltip": "A energia usada pelo bloco de armazenamento fluido Criativo.", + "text.autoconfig.refinedstorage.option.importer": "Importador", + "text.autoconfig.refinedstorage.option.importer.tooltip": "Configuração para o importador.", + "text.autoconfig.refinedstorage.option.importer.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.importer.energyUsage.tooltip": "A energia usada pelo importador.", + "text.autoconfig.refinedstorage.option.exporter": "Exportador", + "text.autoconfig.refinedstorage.option.exporter.tooltip": "Configuração para o exportador.", + "text.autoconfig.refinedstorage.option.exporter.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.exporter.energyUsage.tooltip": "A energia usada pelo exportador.", "text.autoconfig.refinedstorage.option.detector": "Detector", - "text.autoconfig.refinedstorage.option.detector.tooltip": "Configuration for the Detector.", - "text.autoconfig.refinedstorage.option.detector.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.detector.energyUsage.tooltip": "The energy used by the Detector.", - "text.autoconfig.refinedstorage.option.constructor": "Constructor", - "text.autoconfig.refinedstorage.option.constructor.tooltip": "Configuration for the Constructor.", - "text.autoconfig.refinedstorage.option.constructor.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.constructor.energyUsage.tooltip": "The energy used by the Constructor.", - "text.autoconfig.refinedstorage.option.destructor": "Destructor", - "text.autoconfig.refinedstorage.option.destructor.tooltip": "Configuration for the Destructor.", - "text.autoconfig.refinedstorage.option.destructor.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.destructor.energyUsage.tooltip": "The energy used by the Destructor.", - "text.autoconfig.refinedstorage.option.upgrade": "Upgrade", - "text.autoconfig.refinedstorage.option.upgrade.tooltip": "Configuration for the Upgrades.", - "text.autoconfig.refinedstorage.option.upgrade.speedUpgradeEnergyUsage": "Speed Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.speedUpgradeEnergyUsage.tooltip": "The additional energy used per Speed Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.stackUpgradeEnergyUsage": "Stack Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.stackUpgradeEnergyUsage.tooltip": "The additional energy used by the Stack Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.fortune1UpgradeEnergyUsage": "Fortune 1 Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.fortune1UpgradeEnergyUsage.tooltip": "The additional energy used by the Fortune 1 Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.fortune2UpgradeEnergyUsage": "Fortune 2 Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.fortune2UpgradeEnergyUsage.tooltip": "The additional energy used by the Fortune 2 Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.fortune3UpgradeEnergyUsage": "Fortune 3 Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.fortune3UpgradeEnergyUsage.tooltip": "The additional energy used by the Fortune 3 Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.silkTouchUpgradeEnergyUsage": "Silk Touch Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.silkTouchUpgradeEnergyUsage.tooltip": "The additional energy used by the Silk Touch Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.regulatorUpgradeEnergyUsage": "Regulator Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.regulatorUpgradeEnergyUsage.tooltip": "The additional energy used by the Regulator Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.rangeUpgradeEnergyUsage": "Range Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.rangeUpgradeEnergyUsage.tooltip": "The additional energy used per Range Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.creativeRangeUpgradeEnergyUsage": "Creative Range Upgrade energy usage", - "text.autoconfig.refinedstorage.option.upgrade.creativeRangeUpgradeEnergyUsage.tooltip": "The additional energy used by the Creative Range Upgrade.", - "text.autoconfig.refinedstorage.option.upgrade.rangeUpgradeRange": "Range Upgrade range", - "text.autoconfig.refinedstorage.option.upgrade.rangeUpgradeRange.tooltip": "The additional range provided by the Range Upgrade.", - "text.autoconfig.refinedstorage.option.iface": "Interface", - "text.autoconfig.refinedstorage.option.iface.tooltip": "Configuration for the Interface.", - "text.autoconfig.refinedstorage.option.iface.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.iface.energyUsage.tooltip": "The energy used by the Interface.", - "text.autoconfig.refinedstorage.option.externalStorage": "External Storage", - "text.autoconfig.refinedstorage.option.externalStorage.tooltip": "Configuration for the External Storage.", - "text.autoconfig.refinedstorage.option.externalStorage.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.externalStorage.energyUsage.tooltip": "The energy used by the External Storage.", - "text.autoconfig.refinedstorage.option.wirelessGrid": "Wireless Grid", - "text.autoconfig.refinedstorage.option.wirelessGrid.tooltip": "Configuration for the Wireless Grid.", - "text.autoconfig.refinedstorage.option.wirelessGrid.energyCapacity": "Energy capacity", - "text.autoconfig.refinedstorage.option.wirelessGrid.energyCapacity.tooltip": "The energy capacity of the Wireless Grid.", - "text.autoconfig.refinedstorage.option.wirelessGrid.openEnergyUsage": "Open energy usage", - "text.autoconfig.refinedstorage.option.wirelessGrid.openEnergyUsage.tooltip": "The energy used by the Wireless Grid to open.", - "text.autoconfig.refinedstorage.option.wirelessGrid.insertEnergyUsage": "Insert energy usage", - "text.autoconfig.refinedstorage.option.wirelessGrid.insertEnergyUsage.tooltip": "The energy used by the Wireless Grid to insert resources.", - "text.autoconfig.refinedstorage.option.wirelessGrid.extractEnergyUsage": "Extract energy usage", - "text.autoconfig.refinedstorage.option.wirelessGrid.extractEnergyUsage.tooltip": "The energy used by the Wireless Grid to extract resources.", - "text.autoconfig.refinedstorage.option.wirelessTransmitter": "Wireless Transmitter", - "text.autoconfig.refinedstorage.option.wirelessTransmitter.tooltip": "Configuration for the Wireless Transmitter.", - "text.autoconfig.refinedstorage.option.wirelessTransmitter.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.wirelessTransmitter.energyUsage.tooltip": "The energy used by the Wireless Transmitter.", - "text.autoconfig.refinedstorage.option.wirelessTransmitter.baseRange": "Base range", - "text.autoconfig.refinedstorage.option.wirelessTransmitter.baseRange.tooltip": "The base range of the Wireless Transmitter.", - "text.autoconfig.refinedstorage.option.storageMonitor": "Storage Monitor", - "text.autoconfig.refinedstorage.option.storageMonitor.tooltip": "Configuration for the Storage Monitor.", - "text.autoconfig.refinedstorage.option.storageMonitor.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.storageMonitor.energyUsage.tooltip": "The energy used by the Storage Monitor.", - "text.autoconfig.refinedstorage.option.networkReceiver": "Network Receiver", - "text.autoconfig.refinedstorage.option.networkReceiver.tooltip": "Configuration for the Network Receiver.", - "text.autoconfig.refinedstorage.option.networkReceiver.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.networkReceiver.energyUsage.tooltip": "The energy used by the Network Receiver.", - "text.autoconfig.refinedstorage.option.networkTransmitter": "Network Transmitter", - "text.autoconfig.refinedstorage.option.networkTransmitter.tooltip": "Configuration for the Network Transmitter.", - "text.autoconfig.refinedstorage.option.networkTransmitter.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.networkTransmitter.energyUsage.tooltip": "The energy used by the Network Transmitter.", - "text.autoconfig.refinedstorage.option.portableGrid": "Portable Grid", - "text.autoconfig.refinedstorage.option.portableGrid.tooltip": "Configuration for the Portable Grid.", - "text.autoconfig.refinedstorage.option.portableGrid.energyCapacity": "Energy capacity", - "text.autoconfig.refinedstorage.option.portableGrid.energyCapacity.tooltip": "The energy capacity of the Portable Grid.", - "text.autoconfig.refinedstorage.option.portableGrid.openEnergyUsage": "Open energy usage", - "text.autoconfig.refinedstorage.option.portableGrid.openEnergyUsage.tooltip": "The energy used by the Portable Grid to open.", + "text.autoconfig.refinedstorage.option.detector.tooltip": "Configuração para o Detector.", + "text.autoconfig.refinedstorage.option.detector.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.detector.energyUsage.tooltip": "A energia usada pelo detector.", + "text.autoconfig.refinedstorage.option.constructor": "Construtor", + "text.autoconfig.refinedstorage.option.constructor.tooltip": "Configuração para o construtor.", + "text.autoconfig.refinedstorage.option.constructor.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.constructor.energyUsage.tooltip": "A energia usada pelo construtor.", + "text.autoconfig.refinedstorage.option.destructor": "Destrutor", + "text.autoconfig.refinedstorage.option.destructor.tooltip": "Configuração para o destrutor.", + "text.autoconfig.refinedstorage.option.destructor.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.destructor.energyUsage.tooltip": "A energia usada pelo destrutor.", + "text.autoconfig.refinedstorage.option.upgrade": "Aprimoramento", + "text.autoconfig.refinedstorage.option.upgrade.tooltip": "Configuração para os aprimoramentos.", + "text.autoconfig.refinedstorage.option.upgrade.speedUpgradeEnergyUsage": "Uso de energia do aprimoramento de velocidade", + "text.autoconfig.refinedstorage.option.upgrade.speedUpgradeEnergyUsage.tooltip": "A energia adicional usada por aprimoramento de velocidade.", + "text.autoconfig.refinedstorage.option.upgrade.stackUpgradeEnergyUsage": "Uso de energia do aprimoramento de pilha", + "text.autoconfig.refinedstorage.option.upgrade.stackUpgradeEnergyUsage.tooltip": "A energia adicional usada pelo aprimoramento de pilha.", + "text.autoconfig.refinedstorage.option.upgrade.fortune1UpgradeEnergyUsage": "Uso de energia do aprimoramento de fortuna 1", + "text.autoconfig.refinedstorage.option.upgrade.fortune1UpgradeEnergyUsage.tooltip": "A energia adicional usada pelo aprimoramento de Fortuna 1.", + "text.autoconfig.refinedstorage.option.upgrade.fortune2UpgradeEnergyUsage": "Uso de energia do aprimoramento de fortuna 2", + "text.autoconfig.refinedstorage.option.upgrade.fortune2UpgradeEnergyUsage.tooltip": "A energia adicional usada pelo aprimoramento de Fortuna 2.", + "text.autoconfig.refinedstorage.option.upgrade.fortune3UpgradeEnergyUsage": "Uso de energia do aprimoramento de fortuna 3", + "text.autoconfig.refinedstorage.option.upgrade.fortune3UpgradeEnergyUsage.tooltip": "A energia adicional usada pelo aprimoramento de Fortuna 3.", + "text.autoconfig.refinedstorage.option.upgrade.silkTouchUpgradeEnergyUsage": "Uso de energia do aprimoramento de Toque Suave", + "text.autoconfig.refinedstorage.option.upgrade.silkTouchUpgradeEnergyUsage.tooltip": "A energia adicional usada pelo aprimoramento de Toque Suave.", + "text.autoconfig.refinedstorage.option.upgrade.regulatorUpgradeEnergyUsage": "Uso de energia do aprimoramento Regulador", + "text.autoconfig.refinedstorage.option.upgrade.regulatorUpgradeEnergyUsage.tooltip": "A energia adicional usada pelo aprimoramento Regulador.", + "text.autoconfig.refinedstorage.option.upgrade.rangeUpgradeEnergyUsage": "Uso de energia do aprimoramento de Alcance", + "text.autoconfig.refinedstorage.option.upgrade.rangeUpgradeEnergyUsage.tooltip": "A energia adicional usada pelo aprimoramento de Alcance.", + "text.autoconfig.refinedstorage.option.upgrade.creativeRangeUpgradeEnergyUsage": "Uso de energia do aprimoramento de alcance criativo", + "text.autoconfig.refinedstorage.option.upgrade.creativeRangeUpgradeEnergyUsage.tooltip": "A energia adicional usada pelo aprimoramento de Alcance Criativo.", + "text.autoconfig.refinedstorage.option.upgrade.rangeUpgradeRange": "Alcance do Aprimoramento de Alcance", + "text.autoconfig.refinedstorage.option.upgrade.rangeUpgradeRange.tooltip": "O alcance adicional fornecido pelo Aprimoramento de Alcance.", + "text.autoconfig.refinedstorage.option.iface": "Painel", + "text.autoconfig.refinedstorage.option.iface.tooltip": "Configuração para o Painel.", + "text.autoconfig.refinedstorage.option.iface.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.iface.energyUsage.tooltip": "A energia usada pela Interface.", + "text.autoconfig.refinedstorage.option.externalStorage": "Armazenamento externo", + "text.autoconfig.refinedstorage.option.externalStorage.tooltip": "Configuração para o armazenamento externo.", + "text.autoconfig.refinedstorage.option.externalStorage.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.externalStorage.energyUsage.tooltip": "A energia usada pelo armazenamento externo.", + "text.autoconfig.refinedstorage.option.wirelessGrid": "Grade sem fio", + "text.autoconfig.refinedstorage.option.wirelessGrid.tooltip": "Configuração para a Grade sem fio.", + "text.autoconfig.refinedstorage.option.wirelessGrid.energyCapacity": "Capacidade de energia", + "text.autoconfig.refinedstorage.option.wirelessGrid.energyCapacity.tooltip": "A capacidade de energia da grade sem fios.", + "text.autoconfig.refinedstorage.option.wirelessGrid.openEnergyUsage": "Abrir uso de energia", + "text.autoconfig.refinedstorage.option.wirelessGrid.openEnergyUsage.tooltip": "A energia usada pela Grade sem Fio para abrir.", + "text.autoconfig.refinedstorage.option.wirelessGrid.insertEnergyUsage": "Uso de energia para Inserir", + "text.autoconfig.refinedstorage.option.wirelessGrid.insertEnergyUsage.tooltip": "A energia usada pela Grade sem fio para inserir recursos.", + "text.autoconfig.refinedstorage.option.wirelessGrid.extractEnergyUsage": "Uso de energia para extrair", + "text.autoconfig.refinedstorage.option.wirelessGrid.extractEnergyUsage.tooltip": "A energia usada pela Grade sem fio para extrair recursos.", + "text.autoconfig.refinedstorage.option.wirelessTransmitter": "Transmissor sem fio", + "text.autoconfig.refinedstorage.option.wirelessTransmitter.tooltip": "Configuração para o transmissor sem fio.", + "text.autoconfig.refinedstorage.option.wirelessTransmitter.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.wirelessTransmitter.energyUsage.tooltip": "A energia usada pelo transmissor sem fio.", + "text.autoconfig.refinedstorage.option.wirelessTransmitter.baseRange": "Alcance base", + "text.autoconfig.refinedstorage.option.wirelessTransmitter.baseRange.tooltip": "O alcance base do transmissor sem fio.", + "text.autoconfig.refinedstorage.option.storageMonitor": "Monitor de Armazenamento", + "text.autoconfig.refinedstorage.option.storageMonitor.tooltip": "Configuração para o monitor de armazenamento.", + "text.autoconfig.refinedstorage.option.storageMonitor.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.storageMonitor.energyUsage.tooltip": "A energia usada pelo monitor de armazenamento.", + "text.autoconfig.refinedstorage.option.networkReceiver": "Receptor de Rede", + "text.autoconfig.refinedstorage.option.networkReceiver.tooltip": "Configuração para o receptor de rede.", + "text.autoconfig.refinedstorage.option.networkReceiver.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.networkReceiver.energyUsage.tooltip": "A energia usada pelo receptor de rede.", + "text.autoconfig.refinedstorage.option.networkTransmitter": "Transmissor de Rede", + "text.autoconfig.refinedstorage.option.networkTransmitter.tooltip": "Configuração para o transmissor de rede.", + "text.autoconfig.refinedstorage.option.networkTransmitter.energyUsage": "Uso de energia", + "text.autoconfig.refinedstorage.option.networkTransmitter.energyUsage.tooltip": "A energia usada pelo transmissor de rede.", + "text.autoconfig.refinedstorage.option.portableGrid": "Grade portátil", + "text.autoconfig.refinedstorage.option.portableGrid.tooltip": "Configuração para a grade portátil.", + "text.autoconfig.refinedstorage.option.portableGrid.energyCapacity": "Capacidade de energia", + "text.autoconfig.refinedstorage.option.portableGrid.energyCapacity.tooltip": "A capacidade de energia da grade portátil.", + "text.autoconfig.refinedstorage.option.portableGrid.openEnergyUsage": "Abrir uso de energia", + "text.autoconfig.refinedstorage.option.portableGrid.openEnergyUsage.tooltip": "A energia usada pela grade sem fio para abrir.", "text.autoconfig.refinedstorage.option.portableGrid.insertEnergyUsage": "Insert energy usage", "text.autoconfig.refinedstorage.option.portableGrid.insertEnergyUsage.tooltip": "The energy used by the Portable Grid to insert resources.", "text.autoconfig.refinedstorage.option.portableGrid.extractEnergyUsage": "Extract energy usage", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -615,31 +644,33 @@ "advancements.refinedstorage.importing": "Importing", "advancements.refinedstorage.importing.description": "Get resources into the storage network with an Importer", "advancements.refinedstorage.exporting": "Exporting", - "advancements.refinedstorage.exporting.description": "Get resources out of the storage network with an Exporter", - "advancements.refinedstorage.upgrading": "Upgrading", - "advancements.refinedstorage.upgrading.description": "Craft an Upgrade to improve various devices", - "advancements.refinedstorage.interface_to_the_world": "Interface to the world", - "advancements.refinedstorage.interface_to_the_world.description": "Export and import items at the same time with an Interface", - "advancements.refinedstorage.storing_externally": "Storing externally", - "advancements.refinedstorage.storing_externally.description": "Use an External Storage to provide the network with storage from an external block like a chest", - "advancements.refinedstorage.detecting": "Detecting", - "advancements.refinedstorage.detecting.description": "Use redstone to check resources stored in the storage network", - "advancements.refinedstorage.construction": "Construction", - "advancements.refinedstorage.construction.description": "Get blocks from the storage network into the world with a Constructor", - "advancements.refinedstorage.destruction": "Destruction", - "advancements.refinedstorage.destruction.description": "Get blocks from in the world into the storage network with a Destructor", - "advancements.refinedstorage.wireless": "Wireless", - "advancements.refinedstorage.wireless.description": "Access your resources wirelessly with a Wireless Grid", - "advancements.refinedstorage.better_than_a_barrel": "Better than a barrel", - "advancements.refinedstorage.better_than_a_barrel.description": "Craft a Storage Monitor to view, insert or extract resources in a storage network", - "advancements.refinedstorage.no_cables_required": "No cables required", - "advancements.refinedstorage.no_cables_required.description": "Add extra components to your storage network without using cables by using a Network Transmitter, Network Receiver and Network Card", - "advancements.refinedstorage.portable_storage": "Portable storage", - "advancements.refinedstorage.portable_storage.description": "Craft a Portable Grid to access the content of disks without requiring a storage network", - "advancements.refinedstorage.security": "Security", - "advancements.refinedstorage.security.description": "Secure your storage network with a Security Manager and a Security Card", - "advancements.refinedstorage.conditional_connecting": "Conditional connecting", - "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", - "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.exporting.description": "Obtenha recursos fora da rede de armazenamento com um Exportador", + "advancements.refinedstorage.upgrading": "Aprimoramento", + "advancements.refinedstorage.upgrading.description": "Crie um Aprimoramento para melhorar vários dispositivos", + "advancements.refinedstorage.interface_to_the_world": "Painel para o mundo", + "advancements.refinedstorage.interface_to_the_world.description": "Exporte ou importe itens ao mesmo tempo com um painel", + "advancements.refinedstorage.storing_externally": "Armazenando externamente", + "advancements.refinedstorage.storing_externally.description": "Use um Armazenamento externo para fornecer a rede de armazenamento a partir de um bloco externo, como um baú", + "advancements.refinedstorage.detecting": "Detectando", + "advancements.refinedstorage.detecting.description": "Use redstone para verificar recursos de armazenados na rede de armazenamento", + "advancements.refinedstorage.construction": "Construção", + "advancements.refinedstorage.construction.description": "Obtenha blocos da rede de armazenamento no mundo com um Construtor", + "advancements.refinedstorage.destruction": "Destruição", + "advancements.refinedstorage.destruction.description": "Obtenha blocos do mundo na rede de armazenamento com um Destrutor", + "advancements.refinedstorage.wireless": "Sem Fio", + "advancements.refinedstorage.wireless.description": "Acesse seus recursos sem fios com uma Grade sem fio", + "advancements.refinedstorage.better_than_a_barrel": "Melhor que um barril", + "advancements.refinedstorage.better_than_a_barrel.description": "Crie um Monitor de Armazenamento para visualizar, inserir ou extrair recursos em uma rede de armazenamento", + "advancements.refinedstorage.no_cables_required": "Nenhum cabo necessário", + "advancements.refinedstorage.no_cables_required.description": "Adicione componentes extras à sua rede de armazenamento sem usar cabos usando um Transmissor de Rede, um Receptor de Rede e um Cartão de Rede", + "advancements.refinedstorage.portable_storage": "Armazenamento portátil", + "advancements.refinedstorage.portable_storage.description": "Crie uma Grade Portátil para acessar o conteúdo dos discos sem precisar de uma rede de armazenamento", + "advancements.refinedstorage.security": "Segurança", + "advancements.refinedstorage.security.description": "Proteja sua rede de armazenamento com um Gerenciador de Segurança e um Cartão de Segurança", + "advancements.refinedstorage.conditional_connecting": "Conexão condicional", + "advancements.refinedstorage.conditional_connecting.description": "Ative ou desative seções inteiras de uma rede de armazenamento e crie ramos da sua rede usando Relé", + "advancements.refinedstorage.autocrafting": "Auto-fabricação", + "advancements.refinedstorage.autocrafting.description": "Automatize a fabricação com um Autocrafter usando modelos criados em uma Grade de Modelos", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From 2e094a87b738361729c4764c9e87588b56e2c01d Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:41 +0100 Subject: [PATCH 05/30] chore: update translation French from crowdin --- .../assets/refinedstorage/lang/fr_fr.json | 103 ++++++++++++------ 1 file changed, 67 insertions(+), 36 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/fr_fr.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/fr_fr.json index fe39c4d01..ffe75a42b 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/fr_fr.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/fr_fr.json @@ -37,7 +37,8 @@ "block.refinedstorage.security_manager.help": "Lorsque ce périphérique est actif, il protège le réseau par défaut et bloque toutes les opérations. Commencez à ajouter des Cartes de Sécurité pour permettre ou refuser des opérations spécifiques pour un joueur.", "block.refinedstorage.relay": "Relais", "block.refinedstorage.disk_interface": "Interface Disque", - "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter": "Autocrafteur", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Lorsque ce périphérique est inactif, le réseau de stockage ne peut pas utiliser ce périphérique comme source d'énergie.", "gui.refinedstorage.disk_drive.disks": "Disques", "gui.refinedstorage.storage.redstone_mode_help": "Lorsque ce périphérique est inactif, le stockage contenu ne sera plus accessible depuis le réseau de stockage.", @@ -45,8 +46,8 @@ "gui.refinedstorage.storage.filter_mode.empty_warning": "Sans filtre configuré, aucune ressource ne sera accepté dans ce stockage.", "gui.refinedstorage.storage.filter_mode.allow.help": "Autorise dans ce stockage uniquement les ressources configurées dans les filtres.", "gui.refinedstorage.storage.filter_mode.block.help": "Interdis dans ce stockage les ressources configurées dans les filtres.", - "gui.refinedstorage.grid.view_type": "View type", - "gui.refinedstorage.grid.view_type.all": "All", + "gui.refinedstorage.grid.view_type": "Type d'affichage", + "gui.refinedstorage.grid.view_type.all": "Tout", "gui.refinedstorage.grid.view_type.autocraftable": "Autocraftable", "gui.refinedstorage.grid.view_type.non_autocraftable": "Non-autocraftable", "gui.refinedstorage.grid.sorting.direction": "Direction du tri", @@ -59,32 +60,32 @@ "gui.refinedstorage.grid.sorting.type.last_modified": "Dernière modification", "gui.refinedstorage.grid.auto_selected": "Sélection automatique", "gui.refinedstorage.grid.auto_selected.help": "Si la barre de recherche doit être sélectionnée automatique à l'ouverture de la grille.", - "gui.refinedstorage.grid.synchronization_mode": "Synchronization mode", - "gui.refinedstorage.grid.synchronization_mode.off": "Off", - "gui.refinedstorage.grid.synchronization_mode.off.help": "Don't sync the search box text.", + "gui.refinedstorage.grid.synchronization_mode": "Mode Synchronisation", + "gui.refinedstorage.grid.synchronization_mode.off": "Désactivé", + "gui.refinedstorage.grid.synchronization_mode.off.help": "Ne pas synchroniser la recherche.", "gui.refinedstorage.grid.resource_type": "Type de ressource", "gui.refinedstorage.grid.resource_type.all": "Toutes", - "gui.refinedstorage.grid.craft": "Craft", - "gui.refinedstorage.grid.autocraftable": "This resource is autocraftable", - "gui.refinedstorage.grid.pattern_in_inventory": "This resource has a pattern in your inventory.", - "gui.refinedstorage.grid.click_to_autocraft": "Click to autocraft", - "gui.refinedstorage.grid.ctrl_click_to_autocraft": "CTRL + click to autocraft", + "gui.refinedstorage.grid.craft": "Crafter", + "gui.refinedstorage.grid.autocraftable": "Cette ressource est auto-craftable", + "gui.refinedstorage.grid.pattern_in_inventory": "Cette ressource a un patron dans votre inventaire.", + "gui.refinedstorage.grid.click_to_autocraft": "Cliquez pour auto-crafter", + "gui.refinedstorage.grid.ctrl_click_to_autocraft": "CTRL + cliquez pour auto-crafter", "gui.refinedstorage.crafting_grid.move.network": "Déplacer les objets dans le réseau", "gui.refinedstorage.crafting_grid.move.inventory": "Déplacer les objets dans l'inventaire", - "gui.refinedstorage.crafting_grid.press_shift_ctrl_to_only_show_items_used_in_crafting": "Press SHIFT + CTRL to only show items used in the recipe.", - "gui.refinedstorage.pattern_grid.create_pattern": "Create pattern", - "gui.refinedstorage.pattern_grid.clear": "Clear", - "gui.refinedstorage.pattern_grid.fuzzy_mode": "Fuzzy mode", - "gui.refinedstorage.pattern_grid.fuzzy_mode.on.help": "Match the pattern inputs, ignoring components.", - "gui.refinedstorage.pattern_grid.fuzzy_mode.off.help": "Match the pattern inputs exactly.", - "gui.refinedstorage.pattern_grid.processing.inputs": "Inputs", - "gui.refinedstorage.pattern_grid.processing.outputs": "Outputs", - "gui.refinedstorage.pattern_grid.processing.input_slots_help": "The resources that will be extracted from the storage network and will be inserted into the target inventory.", - "gui.refinedstorage.pattern_grid.processing.output_slots_help": "The resources that are expected to be returned to the storage network to deem the crafting task successful.", - "gui.refinedstorage.pattern_grid.processing.click_to_configure_amount_and_alternatives": "Click to configure amount and alternatives", - "gui.refinedstorage.pattern_grid.processing.allowed_alternatives": "Allowed alternatives:", + "gui.refinedstorage.crafting_grid.press_shift_ctrl_to_only_show_items_used_in_crafting": "Appuyez sur Maj + CTRL pour n'afficher que les items utilisés dans la recette.", + "gui.refinedstorage.pattern_grid.create_pattern": "Créer un patron", + "gui.refinedstorage.pattern_grid.clear": "Effacer", + "gui.refinedstorage.pattern_grid.fuzzy_mode": "Mode flou", + "gui.refinedstorage.pattern_grid.fuzzy_mode.on.help": "Correspondre aux entrées du patron, ignorer les composants.", + "gui.refinedstorage.pattern_grid.fuzzy_mode.off.help": "Correspondre exactement aux entrées du patron.", + "gui.refinedstorage.pattern_grid.processing.inputs": "Entrées", + "gui.refinedstorage.pattern_grid.processing.outputs": "Sorties", + "gui.refinedstorage.pattern_grid.processing.input_slots_help": "Les ressources qui seront extraites du réseau de stockage et seront insérées dans l'inventaire cible.", + "gui.refinedstorage.pattern_grid.processing.output_slots_help": "Les ressources qui sont censées être retournées au réseau de stockage pour juger la tâche de fabrication réussie.", + "gui.refinedstorage.pattern_grid.processing.click_to_configure_amount_and_alternatives": "Cliquez pour configurer le montant et les alternatives", + "gui.refinedstorage.pattern_grid.processing.allowed_alternatives": "Alternatives autorisées :", "gui.refinedstorage.pattern_grid.alternatives": "Alternatives", - "gui.refinedstorage.pattern_grid.alternatives.expand": "Expand", + "gui.refinedstorage.pattern_grid.alternatives.expand": "Étendre", "gui.refinedstorage.screen_size": "Taille de l'écran", "gui.refinedstorage.screen_size.stretch": "Etiré", "gui.refinedstorage.screen_size.small": "Petit", @@ -108,7 +109,7 @@ "gui.refinedstorage.importer.filter_mode.allow.help": "Autorise dans le réseau de stockage uniquement les ressources configurées dans les filtres.", "gui.refinedstorage.importer.filter_mode.block.help": "Interdit dans le réseau de stockage les ressources configurées dans les filtres.", "gui.refinedstorage.wireless_transmitter.distance": "%d bloc(s)", - "gui.refinedstorage.wireless_transmitter.inactive": "Inactive", + "gui.refinedstorage.wireless_transmitter.inactive": "Inactif", "gui.refinedstorage.storage_monitor.filter_help": "La ressource à afficher.", "gui.refinedstorage.redstone_mode": "Mode redstone", "gui.refinedstorage.redstone_mode.ignore": "Ignoré", @@ -126,21 +127,21 @@ "gui.refinedstorage.scheduling_mode.random.help": "Utiliser un filtre aléatoire.", "gui.refinedstorage.priority": "Priorité", "gui.refinedstorage.priority.storage_help": "L'ordre dans lequel le réseau de stockage va insérer ou extraire les ressources, le plus élevé en premier.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", - "gui.refinedstorage.configure_amount": "Configure amount", - "gui.refinedstorage.configure_amount.reset": "Reset", - "gui.refinedstorage.configure_amount.set": "Set", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", + "gui.refinedstorage.configure_amount": "Configurer le montant", + "gui.refinedstorage.configure_amount.reset": "Réinitialiser", + "gui.refinedstorage.configure_amount.set": "Définir", "gui.refinedstorage.filter_mode": "Mode de filtrage", "gui.refinedstorage.filter_mode.allow": "Liste blanche", "gui.refinedstorage.filter_mode.block": "Liste noire", "gui.refinedstorage.fuzzy_mode": "Mode flou", "gui.refinedstorage.fuzzy_mode.on": "Activé", - "gui.refinedstorage.fuzzy_mode.on.storage_help": "Match the filters for the allowlist or blocklist, ignoring components.", - "gui.refinedstorage.fuzzy_mode.on.generic_help": "Match the filter, ignoring components.", - "gui.refinedstorage.fuzzy_mode.on.extracting_storage_network_help": "Match the filters when extracting from the storage network, ignoring components.", - "gui.refinedstorage.fuzzy_mode.on.extracting_source_help": "Match the filters when extracting from the source, ignoring components.", + "gui.refinedstorage.fuzzy_mode.on.storage_help": "Correspondre aux filtres d'autorisations ou d'exclusion, ignorant les composants.", + "gui.refinedstorage.fuzzy_mode.on.generic_help": "Correspond au filtre, ignorant les composants.", + "gui.refinedstorage.fuzzy_mode.on.extracting_storage_network_help": "Correspondre aux filtres lors de l'extraction depuis le réseau de stockage, ignorant les composants.", + "gui.refinedstorage.fuzzy_mode.on.extracting_source_help": "Correspondre aux filtres lors de l'extraction depuis la source, ignorant les composants.", "gui.refinedstorage.fuzzy_mode.off": "Désactivé", - "gui.refinedstorage.fuzzy_mode.off.storage_help": "Match the filters for the allowlist or blocklist exactly.", + "gui.refinedstorage.fuzzy_mode.off.storage_help": "Correspondre exactement aux filtres d'autorisations ou d'exclusion.", "gui.refinedstorage.fuzzy_mode.off.generic_help": "Match the filter exactly.", "gui.refinedstorage.fuzzy_mode.off.extracting_storage_network_help": "Match the filters when extracting from the storage network exactly.", "gui.refinedstorage.fuzzy_mode.off.extracting_source_help": "Match the filters when extracting from the source exactly.", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Alimente le réseau de stockage en énergie. Plusieurs sont autorisés dans un seul réseau de stockage. ", "item.refinedstorage.creative_controller.help": "Alimente le réseau de stockage avec une source d'énergie infinie. ", "item.refinedstorage.disk_drive.help": "Accepte des disques de stockage pour fournir de l'espace de stockage au réseau.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stocké : %s", "misc.refinedstorage.stored_with_capacity": "Stocké : %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connexion en cours", "advancements.refinedstorage.connecting.description": "Utiliser un câble pour connecter pour connecter des périphériques ensembles, ou placer les périphériques l'un contre l'autre", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From 48a61647fb414e4bd492a7cc7c6ce65e64dd6dad Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:42 +0100 Subject: [PATCH 06/30] chore: update translation Spanish from crowdin --- .../assets/refinedstorage/lang/es_es.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/es_es.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/es_es.json index e2357af06..fc7ea69a4 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/es_es.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/es_es.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relay", "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Cuando este dispositivo está inactivo, la red de almacenamiento no podrá utilizar este dispositivo como fuente de energía.", "gui.refinedstorage.disk_drive.disks": "Discos", "gui.refinedstorage.storage.redstone_mode_help": "Cuando este dispositivo está inactivo, ya no se podrá acceder al almacenamiento contenido desde la red de almacenamiento.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Usar un filtro aleatorio.", "gui.refinedstorage.priority": "Prioridad", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Almacenado: %s", "misc.refinedstorage.stored_with_capacity": "Almacenado: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Utilice uno o varios controladores en una red de almacenamiento para proporcionar energía a su red", "advancements.refinedstorage.connecting": "Conectando", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From 59366cd91876a98d9923c527be1b6cb9d30f2ff4 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:44 +0100 Subject: [PATCH 07/30] chore: update translation Danish from crowdin --- .../assets/refinedstorage/lang/da_dk.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/da_dk.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/da_dk.json index 303150398..35a09457a 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/da_dk.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/da_dk.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relæ", "block.refinedstorage.disk_interface": "Disk Grænseflade", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Når denne enhed er inaktiv, vil lagernetværket ikke være i stand til at bruge denne enhed som energikilde.", "gui.refinedstorage.disk_drive.disks": "Diske", "gui.refinedstorage.storage.redstone_mode_help": "Når denne enhed er inaktiv, vil det indeholdte lager ikke længere være tilgængeligt på lagernetværket.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Brug et tilfældigt filter.", "gui.refinedstorage.priority": "Prioritet", "gui.refinedstorage.priority.storage_help": "Den rækkefølge, som lagernetværket vil indsætte eller udtrække ressourcer i, det højeste først.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Konfigurer beløb", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Sæt", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From c1ed650defbc0e758b151f35f3e853a161bea67f Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:45 +0100 Subject: [PATCH 08/30] chore: update translation Hungarian from crowdin --- .../assets/refinedstorage/lang/hu_hu.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/hu_hu.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/hu_hu.json index b0b4aacc9..f6ef26082 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/hu_hu.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/hu_hu.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relé", "block.refinedstorage.disk_interface": "Lemezinterfész", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Ha ez a készülék inaktív, a tárhely hálózat nem tudja enegiaforrásként használni.", "gui.refinedstorage.disk_drive.disks": "Lemezek", "gui.refinedstorage.storage.redstone_mode_help": "Ha ez a készülék inaktív, a tartalmazott tárhelye nem elérhető a hálózat számára.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Use a random filter.", "gui.refinedstorage.priority": "Priority", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From cef79549360421743b5fa56cdcab3eb8c8ab191b Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:47 +0100 Subject: [PATCH 09/30] chore: update translation Italian from crowdin --- .../assets/refinedstorage/lang/it_it.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/it_it.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/it_it.json index df57807b1..10d370c0a 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/it_it.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/it_it.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relay", "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "When this device is inactive, the storage network will not be able to use this device as an energy source.", "gui.refinedstorage.disk_drive.disks": "Disks", "gui.refinedstorage.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Use a random filter.", "gui.refinedstorage.priority": "Priority", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From b5c6e977cf4039e549b5258e396ed59d58c642a3 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:48 +0100 Subject: [PATCH 10/30] chore: update translation Japanese from crowdin --- .../assets/refinedstorage/lang/ja_jp.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ja_jp.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ja_jp.json index 4136c2188..e1c822c50 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ja_jp.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ja_jp.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "リレー", "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "When this device is inactive, the storage network will not be able to use this device as an energy source.", "gui.refinedstorage.disk_drive.disks": "ディスク", "gui.refinedstorage.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Use a random filter.", "gui.refinedstorage.priority": "優先度", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From dc594a06498c07abc0380ef28a873847ea55951f Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:49 +0100 Subject: [PATCH 11/30] chore: update translation Korean from crowdin --- .../assets/refinedstorage/lang/ko_kr.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ko_kr.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ko_kr.json index df57807b1..10d370c0a 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ko_kr.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/ko_kr.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relay", "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "When this device is inactive, the storage network will not be able to use this device as an energy source.", "gui.refinedstorage.disk_drive.disks": "Disks", "gui.refinedstorage.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Use a random filter.", "gui.refinedstorage.priority": "Priority", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From a838171514ad1ff2810d0acd7731624354c384c5 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:50 +0100 Subject: [PATCH 12/30] chore: update translation Polish from crowdin --- .../assets/refinedstorage/lang/pl_pl.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/pl_pl.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/pl_pl.json index 9a0a231e4..ec0b12007 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/pl_pl.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/pl_pl.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relay", "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Gdy to urządzenie jest nieaktywne, sieć magazynowa nie będzie w stanie używać tego urządzenia jako źródła energii.", "gui.refinedstorage.disk_drive.disks": "Dyski", "gui.refinedstorage.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Użyj filtru losowego.", "gui.refinedstorage.priority": "Priorytet", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Zapewnia sieć magazynowania w energie. Sieć może mieć ich kilka.", "item.refinedstorage.creative_controller.help": "Zapewnia sieć magazynowania w nieskończoną energię.", "item.refinedstorage.disk_drive.help": "Akceptuje dyski do zapewnienia przestrzeni dyskowej dla sieci magazynowania.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From 4acede2328bd65933bbca0b4e6f49b118e1a7ccf Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:52 +0100 Subject: [PATCH 13/30] chore: update translation Swedish from crowdin --- .../assets/refinedstorage/lang/sv_se.json | 299 ++++++++++-------- 1 file changed, 165 insertions(+), 134 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/sv_se.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/sv_se.json index fac4f8499..cabcfa028 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/sv_se.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/sv_se.json @@ -7,7 +7,7 @@ "block.refinedstorage.machine_casing": "Maskinhölje", "block.refinedstorage.grid": "Rutnät", "block.refinedstorage.pattern_grid": "Mall-rutnät", - "block.refinedstorage.crafting_grid": "Tillverkningsrutnät", + "block.refinedstorage.crafting_grid": "Crafting-rutnät", "block.refinedstorage.controller": "Huvudenhet", "block.refinedstorage.creative_controller": "Kreativ Huvudenhet", "block.refinedstorage.1k_storage_block": "1K Lagringsblock", @@ -15,29 +15,30 @@ "block.refinedstorage.16k_storage_block": "16K Lagringsblock", "block.refinedstorage.64k_storage_block": "64K Lagringsblock", "block.refinedstorage.creative_storage_block": "Kreativt Lagringsblock", - "block.refinedstorage.64b_fluid_storage_block": "64B Block för vätskelagring", - "block.refinedstorage.256b_fluid_storage_block": "256B Block för vätskelagring", - "block.refinedstorage.1024b_fluid_storage_block": "1024B Block för vätskelagring", - "block.refinedstorage.4096b_fluid_storage_block": "4096B Block för vätskelagring", - "block.refinedstorage.creative_fluid_storage_block": "Kreativt Block för vätskelagring", + "block.refinedstorage.64b_fluid_storage_block": "64B Lagringsblock för vätska", + "block.refinedstorage.256b_fluid_storage_block": "256B Lagringsblock för vätska", + "block.refinedstorage.1024b_fluid_storage_block": "1024B Lagringsblock för vätska", + "block.refinedstorage.4096b_fluid_storage_block": "4096B Lagringsblock för vätska", + "block.refinedstorage.creative_fluid_storage_block": "Kreativt Lagringsblock för vätska", "block.refinedstorage.importer": "Importör", "block.refinedstorage.exporter": "Exportör", "block.refinedstorage.interface": "Gränssnitt", "block.refinedstorage.external_storage": "Externt lagringsutrymme", "block.refinedstorage.detector": "Detektor", "block.refinedstorage.constructor": "Konstruktör", - "block.refinedstorage.destructor": "Nerbrytare", + "block.refinedstorage.destructor": "Destruktör", "block.refinedstorage.wireless_transmitter": "Trådlös sändare", - "block.refinedstorage.storage_monitor": "Lagringöversikt", + "block.refinedstorage.storage_monitor": "Lagringsmonitor", "block.refinedstorage.network_receiver": "Nätverksmottagare", "block.refinedstorage.network_transmitter": "Nätverkssändare", "block.refinedstorage.portable_grid": "Bärbart rutnät", - "block.refinedstorage.creative_portable_grid": "Kreativt bärbartrutnät", - "block.refinedstorage.security_manager": "Säkerhets Manager", + "block.refinedstorage.creative_portable_grid": "Kreativt bärbart-rutnät", + "block.refinedstorage.security_manager": "Säkerhetshanterare", "block.refinedstorage.security_manager.help": "När denna enhet är aktiv, kommer att skydda nätverket som standard och blockera alla uppgifter. Lägg till säkerhetskort för att tillåta eller neka specifika uppgifter för en spelare.", "block.refinedstorage.relay": "Relä", "block.refinedstorage.disk_interface": "Diskgränssnitt", - "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter": "Autorafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "När den här enheten är inaktiv kommer nätverket inte att kunna använda den här enheten som energikälla.", "gui.refinedstorage.disk_drive.disks": "Diskar", "gui.refinedstorage.storage.redstone_mode_help": "När den här enheten är inaktiv kommer lagringsutrymmet inte längre att vara tillgängligt från nätverket.", @@ -68,7 +69,7 @@ "gui.refinedstorage.grid.autocraftable": "Denna resurs är auto-tillverkningsbar", "gui.refinedstorage.grid.pattern_in_inventory": "Denna resurs har ett mönster i ditt inventory.", "gui.refinedstorage.grid.click_to_autocraft": "Klicka för att automatiskt tillverka", - "gui.refinedstorage.grid.ctrl_click_to_autocraft": "CTRL + klicka för att automatiskt tillverka", + "gui.refinedstorage.grid.ctrl_click_to_autocraft": "CTRL + klicka för autocraft", "gui.refinedstorage.crafting_grid.move.network": "Flytta saker till nätverk", "gui.refinedstorage.crafting_grid.move.inventory": "Flytta saker till förråd", "gui.refinedstorage.crafting_grid.press_shift_ctrl_to_only_show_items_used_in_crafting": "Tryck SHIFT + CTRL för att visa endast objekt som används i receptet.", @@ -76,9 +77,9 @@ "gui.refinedstorage.pattern_grid.clear": "Radera", "gui.refinedstorage.pattern_grid.fuzzy_mode": "Luddigt läge", "gui.refinedstorage.pattern_grid.fuzzy_mode.on.help": "Matcha designen, strunta i komponenterna.", - "gui.refinedstorage.pattern_grid.fuzzy_mode.off.help": "Matcha designen exakt.", - "gui.refinedstorage.pattern_grid.processing.inputs": "Indata", - "gui.refinedstorage.pattern_grid.processing.outputs": "Resultat", + "gui.refinedstorage.pattern_grid.fuzzy_mode.off.help": "Matcha mallens innehåll exakt.", + "gui.refinedstorage.pattern_grid.processing.inputs": "Inmatning", + "gui.refinedstorage.pattern_grid.processing.outputs": "Utmatning", "gui.refinedstorage.pattern_grid.processing.input_slots_help": "Resurserna kommer att plockas ut från nätverket för att skickas in i mål förrådet.", "gui.refinedstorage.pattern_grid.processing.output_slots_help": "Resurserna förväntas återkomma till förrådet för att nätverket ska anse att tillverkningen är klar.", "gui.refinedstorage.pattern_grid.processing.click_to_configure_amount_and_alternatives": "Klicka för att konfigurera antal och alternativ", @@ -113,9 +114,9 @@ "gui.refinedstorage.redstone_mode": "Rödstensläge", "gui.refinedstorage.redstone_mode.ignore": "Ignorera", "gui.refinedstorage.redstone_mode.ignore.help": "Denna enhet kommer alltid att vara aktiv, oavsett rödstenssignal.", - "gui.refinedstorage.redstone_mode.high": "Hög", + "gui.refinedstorage.redstone_mode.high": "Stark", "gui.refinedstorage.redstone_mode.high.help": "Denna enhet kommer bara att vara aktiv med en rödstenssignal.", - "gui.refinedstorage.redstone_mode.low": "Låg", + "gui.refinedstorage.redstone_mode.low": "Svag", "gui.refinedstorage.redstone_mode.low.help": "Denna enhet kommer bara att vara aktiv utan en rödstenssignal.", "gui.refinedstorage.scheduling_mode": "Schemaläge", "gui.refinedstorage.scheduling_mode.default": "Standard", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Använda ett slumpmässigt filter.", "gui.refinedstorage.priority": "Prioritet", "gui.refinedstorage.priority.storage_help": "Ordningen i vilken nätverket kommer att lägga till eller plocka ut resurser, högst först.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Konfigurera summa", "gui.refinedstorage.configure_amount.reset": "Återställ", "gui.refinedstorage.configure_amount.set": "Välj", @@ -151,7 +152,7 @@ "gui.refinedstorage.access_mode.insert.help": "Nätverket kommer bara att kunna infoga i denna lagring. Inneslutna resurser kommer fortfarande att ses i ett rutnät.", "gui.refinedstorage.access_mode.extract": "Endast plocka ut", "gui.refinedstorage.access_mode.extract.help": "Nätverket kommer endast att kunna infoga eller plocka ut från denna lagring.", - "gui.refinedstorage.void_excess": "Kasta bort överflödiga resurser", + "gui.refinedstorage.void_excess": "Kasta bort överblivna resurser", "gui.refinedstorage.void_excess.help": "När släng läge är påslaget och utrymmet är fullt, kommer den att fortsätta att acceptera resurser men kasta bort dom.", "gui.refinedstorage.void_excess.allowlist_warning": "Släng överskott fungerar bara när lagringen är i vitlisteläge.", "gui.refinedstorage.empty_upgrade_slot": "Rensa uppgradering-slot", @@ -171,19 +172,19 @@ "gui.refinedstorage.security_manager.redstone_mode_help": "När den här enheten är inaktiv kommer nätverket inte att skyddas.", "gui.refinedstorage.security_manager.fallback_security_card_slot_hint": "Plats för ett reserv säkerhetskort.", "gui.refinedstorage.security_manager.no_fallback_security_card_consequence": "Lägg till ett reservsäkerhetskort till denna plats för att sätta behörigheter för varje spelare utan ett säkerhetskort. Som standard nekas alla åtgärder.", - "gui.refinedstorage.relay.filter_help": "Resources and patterns which should be exposed from the input network to the output network if the Relay isn't in pass-through mode.", - "gui.refinedstorage.relay.pass_through": "Passera-igenom", - "gui.refinedstorage.relay.pass_through.help": "Om den här enheten ska passera-igenom hela indata-nätverkets signal som det är. Stäng av detta för att selektivt exponera komponenter för utdatanätverket.", + "gui.refinedstorage.relay.filter_help": "Resurser och mallar som ska vara synliga från det ingående nätverket till det utgående nätverket om reläet inte är i pass-thru läge.", + "gui.refinedstorage.relay.pass_through": "Pass-thru", + "gui.refinedstorage.relay.pass_through.help": "Om den här enheten ska passera genom hela det ingående nätverket signal som det är. Stäng av detta för att selektivt exponera komponenter för det utgående nätverket.", "gui.refinedstorage.relay.pass_energy": "Genomgående energi", - "gui.refinedstorage.relay.pass_energy.help": "Om denna enhet ska skicka sin energi-buffert från indata-nätverket till utdatanätverket.", + "gui.refinedstorage.relay.pass_energy.help": "Om denna enhet ska skicka energi-bufferten från det ingående nätverket till det utgående nätverket.", "gui.refinedstorage.relay.pass_storage": "Passera lagring", - "gui.refinedstorage.relay.pass_storage.help": "Om denna enhet ska passera lagring från indata-nätverket till utdatanätverket.", + "gui.refinedstorage.relay.pass_storage.help": "Om denna enhet ska passera lagring från det ingående nätverket till det utgående nätverket.", "gui.refinedstorage.relay.pass_security": "Passera säkerhet", - "gui.refinedstorage.relay.pass_security.help": "Om denna enhet ska skicka säkerhetsinställningarna från indata-nätverket till utdatanätverket.", - "gui.refinedstorage.relay.pass_autocrafting": "Pass autocrafting", - "gui.refinedstorage.relay.pass_autocrafting.help": "Whether this device should pass the autocrafting patterns from the input network to the output network.", - "gui.refinedstorage.relay.filter_mode.allow.help": "Visa endast resurser från indata-nätverket till utdatanätverket som är konfigurerat i filter.", - "gui.refinedstorage.relay.filter_mode.block.help": "Visa inte resurser från indata-nätverket till utdatanätverket som är konfigurerat i filter.", + "gui.refinedstorage.relay.pass_security.help": "Om denna enhet ska skicka säkerhetsinställningarna från det ingående nätverket till det utgående nätverket.", + "gui.refinedstorage.relay.pass_autocrafting": "Passera autocrafting", + "gui.refinedstorage.relay.pass_autocrafting.help": "Om denna enhet ska skicka autorcrafting mallen från det ingående nätverket till det utgående nätverket.", + "gui.refinedstorage.relay.filter_mode.allow.help": "Visa endast resurser från det ingående nätverket till det utgående nätverkets som är konfigurerat i filter.", + "gui.refinedstorage.relay.filter_mode.block.help": "Visa inte resurser från det ingående nätverket till utgående nätverket som är konfigurerat i filter.", "gui.refinedstorage.disk_interface.filter_mode.allow.help": "Tillåt bara resurser på nätverkets lagring eller nätverket som är konfigurerat i filter.", "gui.refinedstorage.disk_interface.filter_mode.block.help": "Tillåt inte resurser på nätverkets lagring eller nätverket som är konfigurerat i filter.", "gui.refinedstorage.disk_interface.in": "In", @@ -194,27 +195,45 @@ "gui.refinedstorage.disk_interface.transfer_mode.insert_into_network.help": "Överför resurserna från lagringsdiskarna till nätverket.", "gui.refinedstorage.disk_interface.transfer_mode.extract_from_network": "Plocka ut från nätverket", "gui.refinedstorage.disk_interface.transfer_mode.extract_from_network.help": "Överför resurserna från nätverket till lagringsdiskarna.", - "gui.refinedstorage.autocrafter.empty_pattern_slot": "Empty pattern slot", - "gui.refinedstorage.autocrafter.lock_mode": "Lock mode", - "gui.refinedstorage.autocrafter.lock_mode.never": "Never", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_redstone_pulse_received": "Lock until redstone pulse is received", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_connected_machine_is_empty": "Lock until connected machine is empty", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", - "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", - "gui.refinedstorage.autocrafter.edit_name": "Edit", - "gui.refinedstorage.autocrafter.chained": "Chained", - "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", - "gui.refinedstorage.autocrafter.chained.head_help": "This autocrafter is the head of the chain.", - "gui.refinedstorage.autocrafter.not_chained": "Not chained", - "gui.refinedstorage.autocrafter.not_chained.help": "If another autocrafter is facing this one, they'll form a chain, allowing you to have more patterns going into a single machine.", + "gui.refinedstorage.autocrafter.empty_pattern_slot": "Tomt fack för mall", + "gui.refinedstorage.autocrafter.lock_mode": "Låst läge", + "gui.refinedstorage.autocrafter.lock_mode.never": "Aldrig", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_redstone_pulse_received": "Lås tills rödstenspuls aktiverar", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_connected_machine_is_empty": "Lås tills den anslutna maskinen är tom", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lås tills allt utgående har mottagits", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lås tills rödstenssignal är stark", + "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lås tills rödstenssignal är svag", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", + "gui.refinedstorage.autocrafter.edit_name": "Redigera", + "gui.refinedstorage.autocrafter.chained": "Sammankopplad", + "gui.refinedstorage.autocrafter.chained.help": "Denna crafter är en del av en sammankoppling.", + "gui.refinedstorage.autocrafter.chained.head_help": "Denna crafter är huvudenhet av en sammankoppling.", + "gui.refinedstorage.autocrafter.not_chained": "Ej sammankopplad", + "gui.refinedstorage.autocrafter.not_chained.help": "Om en annan crafter är vänd mot den här kommer de att bilda en sammankoppling, och gör så att du kan få in fler mallar i en enda maskin.", "gui.refinedstorage.autocrafting_preview.title": "Autocrafting", "gui.refinedstorage.autocrafting_preview.start": "Start", - "gui.refinedstorage.autocrafting_preview.pending": "Pending", - "gui.refinedstorage.autocrafting_preview.start.missing_resources": "There are missing resources.", - "gui.refinedstorage.autocrafting_preview.available": "Available: %s", - "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", - "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafting_preview.pending": "Väntande", + "gui.refinedstorage.autocrafting_preview.start.missing_resources": "Det saknas resurser.", + "gui.refinedstorage.autocrafting_preview.available": "Tillgängligt: %s", + "gui.refinedstorage.autocrafting_preview.to_craft": "Att tillverka: %s", + "gui.refinedstorage.autocrafting_preview.missing": "Saknas: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Förser nätverket med energi. Kan ha flera i samma nätverk.", "item.refinedstorage.creative_controller.help": "Förser nätverket med obegränsad energi.", "item.refinedstorage.disk_drive.help": "Accepterar lagringsdiskar för att förse nätverket med lagringsutrymme.", @@ -230,7 +249,7 @@ "item.refinedstorage.constructor.help": "Placerar block från nätverket i världen.", "item.refinedstorage.destructor.help": "Förstör block från världen och placerar dem i nätverket.", "item.refinedstorage.relay.help": "Slå på eller stäng av en hel sektion av ett nätverk och skapa en ny del av ditt nätverk.", - "item.refinedstorage.autocrafter.help": "Accepts patterns to store autocraftable resources.", + "item.refinedstorage.autocrafter.help": "Accepterar mallar för att lagra auto-tillverkningsbara resurser.", "item.refinedstorage.quartz_enriched_iron": "Kvartsberikat järn", "item.refinedstorage.quartz_enriched_copper": "Kvartsberikad koppar", "item.refinedstorage.processor_binding": "Processor-fog", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Mall", "item.refinedstorage.pattern.fuzzy_mode": "Luddigt läge", "item.refinedstorage.pattern.help": "Används vid auto-tillverkning för att lagra receptet som ska craftas. Använd medan du hukar för att rensa.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Lager: %s", "misc.refinedstorage.stored_with_capacity": "Lager: %s / %s (%d%%)", "misc.refinedstorage.total": "%d totalt", @@ -354,10 +374,10 @@ "misc.refinedstorage.no_permission.build.break": "Du har inte behörighet att ta i sönder %s.", "misc.refinedstorage.no_permission.build.rotate": "Du har inte behörighet att rotera %s.", "misc.refinedstorage.no_permission.build.dismantle": "Du har inte behörighet att demontera %s.", - "misc.refinedstorage.pattern.crafting": "Crafting-mönster", - "misc.refinedstorage.pattern.processing": "Process-mönster", - "misc.refinedstorage.pattern.stonecutter": "Stenhuggar-mönster", - "misc.refinedstorage.pattern.smithing_table": "Smides-mönster", + "misc.refinedstorage.pattern.crafting": "Crafting-mall", + "misc.refinedstorage.pattern.processing": "Process-mall", + "misc.refinedstorage.pattern.stonecutter": "Stenhuggar-mall", + "misc.refinedstorage.pattern.smithing_table": "Smides-mall", "key.refinedstorage.focus_search_bar": "Fokusera sökfältet", "key.refinedstorage.clear_crafting_grid_matrix_to_network": "Rensa craftingrunäts-matris till nätverk", "key.refinedstorage.clear_crafting_grid_matrix_to_inventory": "Rensa runäts-matris till inventory", @@ -380,9 +400,9 @@ "tag.item.refinedstorage.constructors": "Konstruktör", "tag.item.refinedstorage.controllers": "Huvudenheter", "tag.item.refinedstorage.crafting_grids": "Crafting-rutnät", - "tag.item.refinedstorage.pattern_grids": "Mall-rutnät", + "tag.item.refinedstorage.pattern_grids": "Mall-rutnäten", "tag.item.refinedstorage.creative_controllers": "Kreativa huvudenheter", - "tag.item.refinedstorage.destructors": "Förstörare", + "tag.item.refinedstorage.destructors": "Destruktörer", "tag.item.refinedstorage.detectors": "Detektorer", "tag.item.refinedstorage.exporters": "Exportörer", "tag.item.refinedstorage.external_storages": "Externa lagringsutrymmen", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Lagring diskar", "tag.item.refinedstorage.wireless_transmitters": "Trådlösa sändare", "tag.item.refinedstorage.disk_interfaces": "Disk-gränssnitt", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autorafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage konfiguration", "refinedstorage.configuration.title": "Refined Storage konfiguration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage konfiguration", @@ -501,10 +522,10 @@ "text.autoconfig.refinedstorage.option.constructor.tooltip": "Konfiguration för konstruktören.", "text.autoconfig.refinedstorage.option.constructor.energyUsage": "Energiförbrukning", "text.autoconfig.refinedstorage.option.constructor.energyUsage.tooltip": "Energiförbrukningen på konstruktören.", - "text.autoconfig.refinedstorage.option.destructor": "Förstörare", + "text.autoconfig.refinedstorage.option.destructor": "Destruktör", "text.autoconfig.refinedstorage.option.destructor.tooltip": "Konfiguration för förstöraren.", "text.autoconfig.refinedstorage.option.destructor.energyUsage": "Energiförbrukning", - "text.autoconfig.refinedstorage.option.destructor.energyUsage.tooltip": "Energiförbrukningen på förstöraren.", + "text.autoconfig.refinedstorage.option.destructor.energyUsage.tooltip": "Energiförbrukningen på Destruktören.", "text.autoconfig.refinedstorage.option.upgrade": "Uppgradering", "text.autoconfig.refinedstorage.option.upgrade.tooltip": "Konfiguration för uppgraderingar.", "text.autoconfig.refinedstorage.option.upgrade.speedUpgradeEnergyUsage": "Hastighetsuppgraderingens energiförbrukning", @@ -558,88 +579,98 @@ "text.autoconfig.refinedstorage.option.networkReceiver": "Nätverksmottagare", "text.autoconfig.refinedstorage.option.networkReceiver.tooltip": "Konfiguration för nätverksmottagaren.", "text.autoconfig.refinedstorage.option.networkReceiver.energyUsage": "Energiförbrukning", - "text.autoconfig.refinedstorage.option.networkReceiver.energyUsage.tooltip": "The energy used by the Network Receiver.", - "text.autoconfig.refinedstorage.option.networkTransmitter": "Network Transmitter", - "text.autoconfig.refinedstorage.option.networkTransmitter.tooltip": "Configuration for the Network Transmitter.", - "text.autoconfig.refinedstorage.option.networkTransmitter.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.networkTransmitter.energyUsage.tooltip": "The energy used by the Network Transmitter.", - "text.autoconfig.refinedstorage.option.portableGrid": "Portable Grid", - "text.autoconfig.refinedstorage.option.portableGrid.tooltip": "Configuration for the Portable Grid.", - "text.autoconfig.refinedstorage.option.portableGrid.energyCapacity": "Energy capacity", - "text.autoconfig.refinedstorage.option.portableGrid.energyCapacity.tooltip": "The energy capacity of the Portable Grid.", - "text.autoconfig.refinedstorage.option.portableGrid.openEnergyUsage": "Open energy usage", - "text.autoconfig.refinedstorage.option.portableGrid.openEnergyUsage.tooltip": "The energy used by the Portable Grid to open.", - "text.autoconfig.refinedstorage.option.portableGrid.insertEnergyUsage": "Insert energy usage", - "text.autoconfig.refinedstorage.option.portableGrid.insertEnergyUsage.tooltip": "The energy used by the Portable Grid to insert resources.", - "text.autoconfig.refinedstorage.option.portableGrid.extractEnergyUsage": "Extract energy usage", - "text.autoconfig.refinedstorage.option.portableGrid.extractEnergyUsage.tooltip": "The energy used by the Portable Grid to extract resources.", - "text.autoconfig.refinedstorage.option.securityCard": "Security Card", - "text.autoconfig.refinedstorage.option.securityCard.tooltip": "Configuration for the Security Card.", - "text.autoconfig.refinedstorage.option.securityCard.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.securityCard.energyUsage.tooltip": "The energy used by the Security Card.", - "text.autoconfig.refinedstorage.option.fallbackSecurityCard": "Fallback Security Card", - "text.autoconfig.refinedstorage.option.fallbackSecurityCard.tooltip": "Configuration for the Fallback Security Card.", - "text.autoconfig.refinedstorage.option.fallbackSecurityCard.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.fallbackSecurityCard.energyUsage.tooltip": "The energy used by the Fallback Security Card.", - "text.autoconfig.refinedstorage.option.securityManager": "Security Manager", - "text.autoconfig.refinedstorage.option.securityManager.tooltip": "Configuration for the Security Manager.", - "text.autoconfig.refinedstorage.option.securityManager.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.securityManager.energyUsage.tooltip": "The energy used by the Security Manager.", - "text.autoconfig.refinedstorage.option.relay": "Relay", + "text.autoconfig.refinedstorage.option.networkReceiver.energyUsage.tooltip": "Energiförbrukning på nätverksmottagaren.", + "text.autoconfig.refinedstorage.option.networkTransmitter": "Nätverkssändare", + "text.autoconfig.refinedstorage.option.networkTransmitter.tooltip": "Konfiguration för nätverkssändaren.", + "text.autoconfig.refinedstorage.option.networkTransmitter.energyUsage": "Energiförbrukning", + "text.autoconfig.refinedstorage.option.networkTransmitter.energyUsage.tooltip": "Energiförbrukning på nätverkssändaren.", + "text.autoconfig.refinedstorage.option.portableGrid": "Bärbart rutnät", + "text.autoconfig.refinedstorage.option.portableGrid.tooltip": "Konfiguration för det bärbara rutnätet.", + "text.autoconfig.refinedstorage.option.portableGrid.energyCapacity": "Energikapacitet", + "text.autoconfig.refinedstorage.option.portableGrid.energyCapacity.tooltip": "Energikapaciteten för det bärbara rutnätet.", + "text.autoconfig.refinedstorage.option.portableGrid.openEnergyUsage": "Öppna energiförbrukning", + "text.autoconfig.refinedstorage.option.portableGrid.openEnergyUsage.tooltip": "Energiförbrukningen för bärbara rutnätet när den används.", + "text.autoconfig.refinedstorage.option.portableGrid.insertEnergyUsage": "Energiförbrukning för insättning", + "text.autoconfig.refinedstorage.option.portableGrid.insertEnergyUsage.tooltip": "Energiförbrukningen på det bärbara rutnätet när resurser sätts in.", + "text.autoconfig.refinedstorage.option.portableGrid.extractEnergyUsage": "Energiförbrukning för utplockning", + "text.autoconfig.refinedstorage.option.portableGrid.extractEnergyUsage.tooltip": "Energiförbrukningen på det bärbara rutnätet när resurser plockas ut.", + "text.autoconfig.refinedstorage.option.securityCard": "Säkerhetskort", + "text.autoconfig.refinedstorage.option.securityCard.tooltip": "Konfiguration för säkerhetskortet.", + "text.autoconfig.refinedstorage.option.securityCard.energyUsage": "Energiförbrukning", + "text.autoconfig.refinedstorage.option.securityCard.energyUsage.tooltip": "Energiförbrukning på säkerhetskortet.", + "text.autoconfig.refinedstorage.option.fallbackSecurityCard": "Reserv säkerhetskort", + "text.autoconfig.refinedstorage.option.fallbackSecurityCard.tooltip": "Konfiguration för reserv säkerhetskortet.", + "text.autoconfig.refinedstorage.option.fallbackSecurityCard.energyUsage": "Energiförbrukning", + "text.autoconfig.refinedstorage.option.fallbackSecurityCard.energyUsage.tooltip": "Energiförbrukning på reserv säkerhetskortet.", + "text.autoconfig.refinedstorage.option.securityManager": "Säkerhetshanterare", + "text.autoconfig.refinedstorage.option.securityManager.tooltip": "Konfiguration för säkerhetshanteraren.", + "text.autoconfig.refinedstorage.option.securityManager.energyUsage": "Energiförbrukning", + "text.autoconfig.refinedstorage.option.securityManager.energyUsage.tooltip": "Energiförbrukning på säkerhetshanteraren.", + "text.autoconfig.refinedstorage.option.relay": "Relä", "text.autoconfig.refinedstorage.option.relay.tooltip": "Konfiguration för reläet.", "text.autoconfig.refinedstorage.option.relay.inputNetworkEnergyUsage": "Inmatningsnätverkets energiförbrukning", "text.autoconfig.refinedstorage.option.relay.inputNetworkEnergyUsage.tooltip": "Inmatningsnätverkets energiförbrukning.", - "text.autoconfig.refinedstorage.option.relay.outputNetworkEnergyUsage": "Utmatningsnätverkets energiförbrukning (om inte i \"pass thru\" läge)", - "text.autoconfig.refinedstorage.option.relay.outputNetworkEnergyUsage.tooltip": "Utmatningsnätverkets energiförbrukning (om inte i pass thru läge)", + "text.autoconfig.refinedstorage.option.relay.outputNetworkEnergyUsage": "Utgående nätverkets energiförbrukning (om inte i \"pass thru\" läge)", + "text.autoconfig.refinedstorage.option.relay.outputNetworkEnergyUsage.tooltip": "Utgående nätverkets energiförbrukning (om inte i pass-thru läge).", "text.autoconfig.refinedstorage.option.autocrafter": "Autocrafter", - "text.autoconfig.refinedstorage.option.autocrafter.tooltip": "Configuration for the Autocrafter.", - "text.autoconfig.refinedstorage.option.autocrafter.energyUsage": "Energy usage", - "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", - "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", - "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafter.tooltip": "Konfiguration för autocraftern.", + "text.autoconfig.refinedstorage.option.autocrafter.energyUsage": "Energiförbrukning", + "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "Energiförbrukningen på autocraftern.", + "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energiförbrukning för varje mall", + "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "Den extra energi som förbrukas per räckviddsuppgradering.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Använd en eller flera huvudenheter i ett nätverk för att förse det med energi", "advancements.refinedstorage.connecting": "Ansluter", "advancements.refinedstorage.connecting.description": "Använd kablar för att ansluta enheter med varandra, eller placera enheterna mot varandra", - "advancements.refinedstorage.drives": "Drives", - "advancements.refinedstorage.drives.description": "Craft a Disk Drive to be able to store your storage disks", - "advancements.refinedstorage.interfacing_with_disks": "Interfacing with disks", - "advancements.refinedstorage.interfacing_with_disks.description": "Craft a Disk Interface to transfer resources between the storage network and storage disks", - "advancements.refinedstorage.storing_items": "Storing items", - "advancements.refinedstorage.storing_items.description": "Craft a Storage Disk and put it in your Disk Drive", - "advancements.refinedstorage.viewing_your_storage": "Viewing your storage", - "advancements.refinedstorage.viewing_your_storage.description": "Craft a Grid to interact with your storage", - "advancements.refinedstorage.upgrading_your_grid": "Upgrading your Grid", - "advancements.refinedstorage.upgrading_your_grid.description": "Upgrade your Grid to a Crafting Grid to get crafting abilities", - "advancements.refinedstorage.storing_fluids": "Storing fluids", - "advancements.refinedstorage.storing_fluids.description": "Craft a Fluid Storage Disk and put it in your Disk Drive", - "advancements.refinedstorage.importing": "Importing", - "advancements.refinedstorage.importing.description": "Get resources into the storage network with an Importer", - "advancements.refinedstorage.exporting": "Exporting", - "advancements.refinedstorage.exporting.description": "Get resources out of the storage network with an Exporter", - "advancements.refinedstorage.upgrading": "Upgrading", - "advancements.refinedstorage.upgrading.description": "Craft an Upgrade to improve various devices", - "advancements.refinedstorage.interface_to_the_world": "Interface to the world", - "advancements.refinedstorage.interface_to_the_world.description": "Export and import items at the same time with an Interface", - "advancements.refinedstorage.storing_externally": "Storing externally", - "advancements.refinedstorage.storing_externally.description": "Use an External Storage to provide the network with storage from an external block like a chest", - "advancements.refinedstorage.detecting": "Detecting", - "advancements.refinedstorage.detecting.description": "Use redstone to check resources stored in the storage network", - "advancements.refinedstorage.construction": "Construction", - "advancements.refinedstorage.construction.description": "Get blocks from the storage network into the world with a Constructor", - "advancements.refinedstorage.destruction": "Destruction", - "advancements.refinedstorage.destruction.description": "Get blocks from in the world into the storage network with a Destructor", - "advancements.refinedstorage.wireless": "Wireless", - "advancements.refinedstorage.wireless.description": "Access your resources wirelessly with a Wireless Grid", - "advancements.refinedstorage.better_than_a_barrel": "Better than a barrel", - "advancements.refinedstorage.better_than_a_barrel.description": "Craft a Storage Monitor to view, insert or extract resources in a storage network", - "advancements.refinedstorage.no_cables_required": "No cables required", - "advancements.refinedstorage.no_cables_required.description": "Add extra components to your storage network without using cables by using a Network Transmitter, Network Receiver and Network Card", - "advancements.refinedstorage.portable_storage": "Portable storage", - "advancements.refinedstorage.portable_storage.description": "Craft a Portable Grid to access the content of disks without requiring a storage network", - "advancements.refinedstorage.security": "Security", - "advancements.refinedstorage.security.description": "Secure your storage network with a Security Manager and a Security Card", - "advancements.refinedstorage.conditional_connecting": "Conditional connecting", - "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", + "advancements.refinedstorage.drives": "Enheter", + "advancements.refinedstorage.drives.description": "Tillverka en diskenhet för att kunna lagra dina lagringsdiskar", + "advancements.refinedstorage.interfacing_with_disks": "Gränssnitt mot diskar", + "advancements.refinedstorage.interfacing_with_disks.description": "Skapa ett diskgränssnitt för att överföra resurser mellan nätverket och lagringsdiskar", + "advancements.refinedstorage.storing_items": "Lagrar objekt", + "advancements.refinedstorage.storing_items.description": "Tillverka en lagringsdisk och placera den i diskenheten", + "advancements.refinedstorage.viewing_your_storage": "Visar ditt lagringsutrymme", + "advancements.refinedstorage.viewing_your_storage.description": "Skapa ett rutnät för att interagera med ditt lagringsutrymme", + "advancements.refinedstorage.upgrading_your_grid": "Uppgraderar ditt rutnät", + "advancements.refinedstorage.upgrading_your_grid.description": "Uppgradera ditt rutnät till ett craftingrutnät för att kunna tillverka", + "advancements.refinedstorage.storing_fluids": "Lagra vätska", + "advancements.refinedstorage.storing_fluids.description": "Tillverka en förvaringsdisk för vätska och placera den i diskenheten", + "advancements.refinedstorage.importing": "Importerar", + "advancements.refinedstorage.importing.description": "För in resurser till nätverket med en importör", + "advancements.refinedstorage.exporting": "Exporterar", + "advancements.refinedstorage.exporting.description": "Plockar ut resurser från nätverket med en exportör", + "advancements.refinedstorage.upgrading": "Uppgraderar", + "advancements.refinedstorage.upgrading.description": "Tillverka en uppgradering för att förbättra olika enheter", + "advancements.refinedstorage.interface_to_the_world": "Gränssnitt mot världen", + "advancements.refinedstorage.interface_to_the_world.description": "Exportera och importera objekt samtidigt med ett gränssnitt", + "advancements.refinedstorage.storing_externally": "Lagrar externt", + "advancements.refinedstorage.storing_externally.description": "Använd en extern lagring för att förse nätverket med utrymme från ett externt block som en kista", + "advancements.refinedstorage.detecting": "Detektera", + "advancements.refinedstorage.detecting.description": "Använd redstone för att kontrollera resurser lagrade i nätverket", + "advancements.refinedstorage.construction": "Konstruktion", + "advancements.refinedstorage.construction.description": "Hämta block från nätverket till världen med en Konstruktör", + "advancements.refinedstorage.destruction": "Destruktion", + "advancements.refinedstorage.destruction.description": "Få block från världen till nätverket med en destruktör", + "advancements.refinedstorage.wireless": "Trådlös", + "advancements.refinedstorage.wireless.description": "Få tillgång till dina resurser trådlöst med ett trådlöst rutnät", + "advancements.refinedstorage.better_than_a_barrel": "Bättre än en tunna", + "advancements.refinedstorage.better_than_a_barrel.description": "Tillverka en lagrings monitor för att se, infoga eller plocka ut resurser i ett nätverk", + "advancements.refinedstorage.no_cables_required": "Kabelfritt", + "advancements.refinedstorage.no_cables_required.description": "Lägg till extra komponenter i ditt nätverk utan att använda kablar, genom att använda en nätverkssändare, nätverksmottagare och nätverkskort", + "advancements.refinedstorage.portable_storage": "Bärbar lagring", + "advancements.refinedstorage.portable_storage.description": "Tillverka ett bärbart rutnät för att komma åt till innehållet på diskar utan att behöva ett nätverk", + "advancements.refinedstorage.security": "Säkerhet", + "advancements.refinedstorage.security.description": "Säkra ditt nätverk med en säkerhetshanterare och ett säkerhetskort", + "advancements.refinedstorage.conditional_connecting": "Villkor för anslutning", + "advancements.refinedstorage.conditional_connecting.description": "Slå på eller stäng av en hel sektion av ett nätverk och skapa en ny del av ditt nätverk med ett relä", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automatisera tillverkning med en Autocrafter genom att använda mallar skapade i ett mönsterrutnät", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From c60a2bc053a9d6b7973cbdbd12398e852311441e Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:53 +0100 Subject: [PATCH 14/30] chore: update translation Ukrainian from crowdin --- .../assets/refinedstorage/lang/uk_ua.json | 45 ++++++++++++++++--- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/uk_ua.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/uk_ua.json index b28edd34e..da797ba6f 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/uk_ua.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/uk_ua.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relay", "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "When this device is inactive, the storage network will not be able to use this device as an energy source.", "gui.refinedstorage.disk_drive.disks": "Disks", "gui.refinedstorage.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -52,9 +53,9 @@ "gui.refinedstorage.grid.sorting.direction": "Sorting direction", "gui.refinedstorage.grid.sorting.direction.ascending": "Ascending", "gui.refinedstorage.grid.sorting.direction.descending": "Descending", - "gui.refinedstorage.grid.sorting.type": "Sorting type", + "gui.refinedstorage.grid.sorting.type": "Тип сортування", "gui.refinedstorage.grid.sorting.type.quantity": "Quantity", - "gui.refinedstorage.grid.sorting.type.name": "Name", + "gui.refinedstorage.grid.sorting.type.name": "Назва", "gui.refinedstorage.grid.sorting.type.id": "ID", "gui.refinedstorage.grid.sorting.type.last_modified": "Last modified", "gui.refinedstorage.grid.auto_selected": "Auto-selected", @@ -63,8 +64,8 @@ "gui.refinedstorage.grid.synchronization_mode.off": "Off", "gui.refinedstorage.grid.synchronization_mode.off.help": "Don't sync the search box text.", "gui.refinedstorage.grid.resource_type": "Resource type", - "gui.refinedstorage.grid.resource_type.all": "All", - "gui.refinedstorage.grid.craft": "Craft", + "gui.refinedstorage.grid.resource_type.all": "Всі", + "gui.refinedstorage.grid.craft": "Створити", "gui.refinedstorage.grid.autocraftable": "This resource is autocraftable", "gui.refinedstorage.grid.pattern_in_inventory": "This resource has a pattern in your inventory.", "gui.refinedstorage.grid.click_to_autocraft": "Click to autocraft", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Use a random filter.", "gui.refinedstorage.priority": "Priority", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From 6e2c54e3294c640096d71c924637a393e2296a91 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:55 +0100 Subject: [PATCH 15/30] chore: update translation Chinese Simplified from crowdin --- .../assets/refinedstorage/lang/zh_cn.json | 57 ++++++++++++++----- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/zh_cn.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/zh_cn.json index 11071c7f0..6efadea21 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/zh_cn.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/zh_cn.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "中继器", "block.refinedstorage.disk_interface": "磁盘接口", "block.refinedstorage.autocrafter": "自动合成仓", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "当此设备处于非激活状态时,存储网络将无法将此设备用作能源来源。", "gui.refinedstorage.disk_drive.disks": "磁盘", "gui.refinedstorage.storage.redstone_mode_help": "当此设备处于非激活状态时,其中的存储空间将无法从存储网络内访问。", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "使用随机过滤器。", "gui.refinedstorage.priority": "优先级", "gui.refinedstorage.priority.storage_help": "存储网络存入或提取资源的顺序,从高到低。", - "gui.refinedstorage.priority.crafter_help": "如果一个资源存在多个样板,合成任务将按照这些样板的装配室优先级进行合成。", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "配置数量", "gui.refinedstorage.configure_amount.reset": "重置", "gui.refinedstorage.configure_amount.set": "设定", @@ -171,17 +172,17 @@ "gui.refinedstorage.security_manager.redstone_mode_help": "当此设备处于未激活状态时,将不能保护网络。", "gui.refinedstorage.security_manager.fallback_security_card_slot_hint": "后备安全卡卡槽", "gui.refinedstorage.security_manager.no_fallback_security_card_consequence": "在此槽位加入后备权限卡来设置没有单独使用权限卡配置的玩家的权限。默认情况下所有操作均被阻止。", - "gui.refinedstorage.relay.filter_help": "Resources and patterns which should be exposed from the input network to the output network if the Relay isn't in pass-through mode.", + "gui.refinedstorage.relay.filter_help": "如果中继器未处于直通模式,则应从输入网络向输出网络公开样板和资源。", "gui.refinedstorage.relay.pass_through": "传递", "gui.refinedstorage.relay.pass_through.help": "此设备是否应按原样通过整个输入网络信号。关闭此选项可有选择地将元件暴露于输出网络。", "gui.refinedstorage.relay.pass_energy": "能量传递", "gui.refinedstorage.relay.pass_energy.help": "此器件是否应将能量缓冲器从输入网络传递到输出网络。", "gui.refinedstorage.relay.pass_storage": "存储传递", "gui.refinedstorage.relay.pass_storage.help": "此设备是否应将存储从输入网络传递到输出网络。", - "gui.refinedstorage.relay.pass_security": "通过安全检验", + "gui.refinedstorage.relay.pass_security": "传递安保权限", "gui.refinedstorage.relay.pass_security.help": "此设备是否应将安全设置从输入网络传递到输出网络。", - "gui.refinedstorage.relay.pass_autocrafting": "Pass autocrafting", - "gui.refinedstorage.relay.pass_autocrafting.help": "Whether this device should pass the autocrafting patterns from the input network to the output network.", + "gui.refinedstorage.relay.pass_autocrafting": "传递自动合成", + "gui.refinedstorage.relay.pass_autocrafting.help": "此设备是否应将自动合成样板从输入网络传递到输出网络。", "gui.refinedstorage.relay.filter_mode.allow.help": "仅将在筛选器中配置的资源从输入网络公开到输出网络。", "gui.refinedstorage.relay.filter_mode.block.help": "不要将输入网络中的资源公开给在筛选器中配置的输出网络。", "gui.refinedstorage.disk_interface.filter_mode.allow.help": "仅允许资源进入在筛选器中配置的存储磁盘或网络", @@ -202,11 +203,13 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "直到本次合成完成后再进行下一次合成", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "收到高红石信号才进行合成", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "收到低红石信号才进行合成", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "编辑", - "gui.refinedstorage.autocrafter.chained": "Chained", - "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", - "gui.refinedstorage.autocrafter.chained.head_help": "This autocrafter is the head of the chain.", - "gui.refinedstorage.autocrafter.not_chained": "Not chained", + "gui.refinedstorage.autocrafter.chained": "已连接", + "gui.refinedstorage.autocrafter.chained.help": "该自动合成仓是连接的一部分", + "gui.refinedstorage.autocrafter.chained.head_help": "该自动合成仓位于连接的顶部", + "gui.refinedstorage.autocrafter.not_chained": "未连接", "gui.refinedstorage.autocrafter.not_chained.help": "如果另一个自动合成仓面向当前合成仓,他们会形成一个链状结构,从而让一个机器可以拥有更多的样板。", "gui.refinedstorage.autocrafting_preview.title": "自动合成", "gui.refinedstorage.autocrafting_preview.start": "开始", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "可用: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "合成数量:%s", "gui.refinedstorage.autocrafting_preview.missing": "缺少:%s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "为存储网络提供能量。一个存储网络中允许包含多个。", "item.refinedstorage.creative_controller.help": "为存储网络提供无限能源。", "item.refinedstorage.disk_drive.help": "接受存储磁盘,为存储网络提供存储空间。", @@ -230,7 +249,7 @@ "item.refinedstorage.constructor.help": "从存储网络中的方块放置方块到世界中。", "item.refinedstorage.destructor.help": "从世界中销毁方块并将其放入存储网络。", "item.refinedstorage.relay.help": "打开或关闭存储网络的整个部分,并创建网络的新分支。", - "item.refinedstorage.autocrafter.help": "Accepts patterns to store autocraftable resources.", + "item.refinedstorage.autocrafter.help": "接受样板来存储可自动合成的资源。", "item.refinedstorage.quartz_enriched_iron": "富石英铁", "item.refinedstorage.quartz_enriched_copper": "富石英铜", "item.refinedstorage.processor_binding": "处理器绑定", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "样板", "item.refinedstorage.pattern.fuzzy_mode": "模糊匹配模式", "item.refinedstorage.pattern.help": "在合成仓中用于存储要制作的配方。蹲下时使用以清除。", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "存储:%s", "misc.refinedstorage.stored_with_capacity": "存储:%s / %s (%d%%)", "misc.refinedstorage.total": "总数:%d", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "存储磁盘", "tag.item.refinedstorage.wireless_transmitters": "无线发射器", "tag.item.refinedstorage.disk_interfaces": "磁盘接口", - "tag.item.refinedstorage.crafters": "合成仓", + "tag.item.refinedstorage.autocrafters": "自动合成仓", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "精致存储配置", "refinedstorage.configuration.title": "精致存储配置", "refinedstorage.configuration.section.refinedstorage.common.toml": "精致存储配置", @@ -596,7 +617,15 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage": "耗能", "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "自动合成仓耗能", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "每个样板的耗能", - "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "每个样板所需的额外能量", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "在网络中使用一个或多个控制器为其提供能量", "advancements.refinedstorage.connecting": "连接", "advancements.refinedstorage.connecting.description": "使用电缆将设备连接在一起,或放置时使设备贴在一起", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "条件连接", "advancements.refinedstorage.conditional_connecting.description": "打开或关闭存储网络的整个部分,并使用中继创建网络的新分支", "advancements.refinedstorage.autocrafting": "自动合成", - "advancements.refinedstorage.autocrafting.description": "使用自动合成仓和样板终端制作的样板进行自动合成" + "advancements.refinedstorage.autocrafting.description": "使用自动合成仓和样板终端制作的样板进行自动合成", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From 01c3bcf99cddf65ad686fd038e564180f003891e Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:56 +0100 Subject: [PATCH 16/30] chore: update translation Chinese Traditional from crowdin --- .../assets/refinedstorage/lang/zh_tw.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/zh_tw.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/zh_tw.json index 650e24710..f949c203d 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/zh_tw.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/zh_tw.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "中繼", "block.refinedstorage.disk_interface": "硬碟介面", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "未啟動該裝置時,存儲網路將無法將其作為能量來源", "gui.refinedstorage.disk_drive.disks": "硬碟", "gui.refinedstorage.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Use a random filter.", "gui.refinedstorage.priority": "Priority", "gui.refinedstorage.priority.storage_help": "The order in which the storage network will insert or extract resources, highest-first.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From 7f7dd5e064f6d02e7ac9346cd9ec8d69acb9aef4 Mon Sep 17 00:00:00 2001 From: Raoul Date: Fri, 1 Nov 2024 15:21:57 +0100 Subject: [PATCH 17/30] chore: update translation Indonesian from crowdin --- .../assets/refinedstorage/lang/id_id.json | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/id_id.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/id_id.json index 19ae30be9..d13e921cf 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/id_id.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/id_id.json @@ -38,6 +38,7 @@ "block.refinedstorage.relay": "Relay", "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", + "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", "gui.refinedstorage.controller.redstone_mode_help": "Ketika peranagkat ini nonaktif, jaringan penyimpanan tidak dapat menggunakan perangkat ini sebagai sumber energi.", "gui.refinedstorage.disk_drive.disks": "Cakram", "gui.refinedstorage.storage.redstone_mode_help": "Ketika perangkat ini nonaktif, penyimpanan tidak akan dapat diakses dari dalam jaringan penyimpanan.", @@ -126,7 +127,7 @@ "gui.refinedstorage.scheduling_mode.random.help": "Gunakan filter acak.", "gui.refinedstorage.priority": "Prioritas", "gui.refinedstorage.priority.storage_help": "Urutan dimana jaringan penyimpanan akan memasukkan atau mengekstrak sumber daya, mulai dari yang tertinggi.", - "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the Autocrafter with the highest priority.", + "gui.refinedstorage.priority.crafter_help": "If multiple patterns exist for one resource, crafting tasks will prioritize the pattern in the autocrafter with the highest priority.", "gui.refinedstorage.configure_amount": "Configure amount", "gui.refinedstorage.configure_amount.reset": "Reset", "gui.refinedstorage.configure_amount.set": "Set", @@ -202,6 +203,8 @@ "gui.refinedstorage.autocrafter.lock_mode.lock_until_all_outputs_are_received": "Lock until all outputs are received", "gui.refinedstorage.autocrafter.lock_mode.lock_until_high_redstone_signal": "Lock until high redstone signal", "gui.refinedstorage.autocrafter.lock_mode.lock_until_low_redstone_signal": "Lock until low redstone signal", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager": "Visible to the Autocrafter Manager", + "gui.refinedstorage.autocrafter.visible_to_the_autocrafter_manager.help": "If this is enabled, you will be able to manage this autocrafter in the Autocrafter Manager.", "gui.refinedstorage.autocrafter.edit_name": "Edit", "gui.refinedstorage.autocrafter.chained": "Chained", "gui.refinedstorage.autocrafter.chained.help": "This autocrafter is part of a chain.", @@ -215,6 +218,22 @@ "gui.refinedstorage.autocrafting_preview.available": "Available: %s", "gui.refinedstorage.autocrafting_preview.to_craft": "To craft: %s", "gui.refinedstorage.autocrafting_preview.missing": "Missing: %s", + "gui.refinedstorage.autocrafter_manager.search_mode": "Search mode", + "gui.refinedstorage.autocrafter_manager.search_mode.all": "All", + "gui.refinedstorage.autocrafter_manager.search_mode.all.help": "Search in pattern inputs, pattern outputs and autocrafter names.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs": "Pattern inputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_inputs.help": "Search in pattern inputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs": "Pattern outputs", + "gui.refinedstorage.autocrafter_manager.search_mode.pattern_outputs.help": "Search in pattern outputs.", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names": "Autocrafter names", + "gui.refinedstorage.autocrafter_manager.search_mode.autocrafter_names.help": "Search in autocrafter names.", + "gui.refinedstorage.autocrafter_manager.view_type": "View type", + "gui.refinedstorage.autocrafter_manager.view_type.visible": "Visible", + "gui.refinedstorage.autocrafter_manager.view_type.visible.help": "Show all autocrafters that are visible to the Autocrafter Manager.", + "gui.refinedstorage.autocrafter_manager.view_type.not_full": "Not full", + "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", + "gui.refinedstorage.autocrafter_manager.view_type.all": "All", + "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", "item.refinedstorage.controller.help": "Menyediakan energi ke jaringan penyimpanan. dapat digunakan beberapa kali dalam satu jaringan penyimpanan.", "item.refinedstorage.creative_controller.help": "Menyediakan energi tidak terbatas ke jaringan penyimpanan.", "item.refinedstorage.disk_drive.help": "Menerima cakram penyimpanan untuk menyediakan ruang penyimpanan kedalam jaringan penyimpanan.", @@ -327,6 +346,7 @@ "item.refinedstorage.pattern": "Pattern", "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", + "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "misc.refinedstorage.stored": "Tersimpan: %s", "misc.refinedstorage.stored_with_capacity": "Tersimpan: %s / %s (%d%%)", "misc.refinedstorage.total": "Total %d", @@ -396,7 +416,8 @@ "tag.item.refinedstorage.storage_disks": "Storage Disks", "tag.item.refinedstorage.wireless_transmitters": "Wireless Transmitters", "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", - "tag.item.refinedstorage.crafters": "Crafters", + "tag.item.refinedstorage.autocrafters": "Autocrafters", + "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -597,6 +618,14 @@ "text.autoconfig.refinedstorage.option.autocrafter.energyUsage.tooltip": "The energy used by the Autocrafter.", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern": "Energy usage per pattern", "text.autoconfig.refinedstorage.option.autocrafter.energyUsagePerPattern.tooltip": "The additional energy used per pattern.", + "text.autoconfig.refinedstorage.option.autocrafterManager": "Autocrafter Manager", + "text.autoconfig.refinedstorage.option.autocrafterManager.tooltip": "Configuration for the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocrafterManager.energyUsage.tooltip": "The energy used by the Autocrafter Manager.", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode": "Search mode", + "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", + "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Menyambungkan", "advancements.refinedstorage.connecting.description": "Gunakan Kabel untuk menghubungkan perangkat satu sama lain, atau letakkan perangkat melawan satu sama lain", @@ -641,5 +670,7 @@ "advancements.refinedstorage.conditional_connecting": "Conditional connecting", "advancements.refinedstorage.conditional_connecting.description": "Turn entire sections of a storage network on or off and create new branches of your network with a Relay", "advancements.refinedstorage.autocrafting": "Autocrafting", - "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid" + "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", + "advancements.refinedstorage.managing_patterns": "Managing patterns", + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" } From b8db042212e7298097f521d8b8890fa38c002ad5 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 2 Nov 2024 03:07:30 +0100 Subject: [PATCH 18/30] feat: autocrafting monitor block --- CHANGELOG.md | 4 + gradle.properties | 1 + .../blockstates/autocrafting_monitor.json | 110 ++++++++++++++++++ .../black_autocrafting_monitor.json | 110 ++++++++++++++++++ .../blue_autocrafting_monitor.json | 110 ++++++++++++++++++ .../brown_autocrafting_monitor.json | 110 ++++++++++++++++++ .../cyan_autocrafting_monitor.json | 110 ++++++++++++++++++ .../gray_autocrafting_monitor.json | 110 ++++++++++++++++++ .../green_autocrafting_monitor.json | 110 ++++++++++++++++++ .../light_gray_autocrafting_monitor.json | 110 ++++++++++++++++++ .../lime_autocrafting_monitor.json | 110 ++++++++++++++++++ .../magenta_autocrafting_monitor.json | 110 ++++++++++++++++++ .../orange_autocrafting_monitor.json | 110 ++++++++++++++++++ .../pink_autocrafting_monitor.json | 110 ++++++++++++++++++ .../purple_autocrafting_monitor.json | 110 ++++++++++++++++++ .../blockstates/red_autocrafting_monitor.json | 110 ++++++++++++++++++ .../white_autocrafting_monitor.json | 110 ++++++++++++++++++ .../yellow_autocrafting_monitor.json | 110 ++++++++++++++++++ .../block/autocrafting_monitor/black.json | 13 +++ .../block/autocrafting_monitor/blue.json | 13 +++ .../block/autocrafting_monitor/brown.json | 13 +++ .../block/autocrafting_monitor/cyan.json | 13 +++ .../block/autocrafting_monitor/gray.json | 13 +++ .../block/autocrafting_monitor/green.json | 13 +++ .../block/autocrafting_monitor/inactive.json | 13 +++ .../autocrafting_monitor/light_blue.json | 13 +++ .../autocrafting_monitor/light_gray.json | 13 +++ .../block/autocrafting_monitor/lime.json | 13 +++ .../block/autocrafting_monitor/magenta.json | 13 +++ .../block/autocrafting_monitor/orange.json | 13 +++ .../block/autocrafting_monitor/pink.json | 13 +++ .../block/autocrafting_monitor/purple.json | 13 +++ .../block/autocrafting_monitor/red.json | 13 +++ .../block/autocrafting_monitor/white.json | 13 +++ .../block/autocrafting_monitor/yellow.json | 13 +++ .../models/item/autocrafting_monitor.json | 3 + .../item/black_autocrafting_monitor.json | 3 + .../item/blue_autocrafting_monitor.json | 3 + .../item/brown_autocrafting_monitor.json | 3 + .../item/cyan_autocrafting_monitor.json | 3 + .../item/gray_autocrafting_monitor.json | 3 + .../item/green_autocrafting_monitor.json | 3 + .../item/light_gray_autocrafting_monitor.json | 3 + .../item/lime_autocrafting_monitor.json | 3 + .../item/magenta_autocrafting_monitor.json | 3 + .../item/orange_autocrafting_monitor.json | 3 + .../item/pink_autocrafting_monitor.json | 3 + .../item/purple_autocrafting_monitor.json | 3 + .../models/item/red_autocrafting_monitor.json | 3 + .../item/white_autocrafting_monitor.json | 3 + .../item/yellow_autocrafting_monitor.json | 3 + .../coloring/black_autocrafting_monitor.json | 32 +++++ .../coloring/blue_autocrafting_monitor.json | 32 +++++ .../coloring/brown_autocrafting_monitor.json | 32 +++++ .../coloring/cyan_autocrafting_monitor.json | 32 +++++ .../coloring/gray_autocrafting_monitor.json | 32 +++++ .../coloring/green_autocrafting_monitor.json | 32 +++++ .../light_blue_autocrafting_monitor.json | 32 +++++ .../light_gray_autocrafting_monitor.json | 32 +++++ .../coloring/lime_autocrafting_monitor.json | 32 +++++ .../magenta_autocrafting_monitor.json | 32 +++++ .../coloring/orange_autocrafting_monitor.json | 32 +++++ .../coloring/pink_autocrafting_monitor.json | 32 +++++ .../coloring/purple_autocrafting_monitor.json | 32 +++++ .../coloring/red_autocrafting_monitor.json | 32 +++++ .../coloring/white_autocrafting_monitor.json | 32 +++++ .../coloring/yellow_autocrafting_monitor.json | 32 +++++ .../blocks/autocrafting_monitor.json | 30 +++++ .../blocks/black_autocrafting_monitor.json | 30 +++++ .../blocks/blue_autocrafting_monitor.json | 30 +++++ .../blocks/brown_autocrafting_monitor.json | 30 +++++ .../blocks/cyan_autocrafting_monitor.json | 30 +++++ .../blocks/gray_autocrafting_monitor.json | 30 +++++ .../blocks/green_autocrafting_monitor.json | 30 +++++ .../light_gray_autocrafting_monitor.json | 30 +++++ .../blocks/lime_autocrafting_monitor.json | 30 +++++ .../blocks/magenta_autocrafting_monitor.json | 30 +++++ .../blocks/orange_autocrafting_monitor.json | 30 +++++ .../blocks/pink_autocrafting_monitor.json | 30 +++++ .../blocks/purple_autocrafting_monitor.json | 30 +++++ .../blocks/red_autocrafting_monitor.json | 30 +++++ .../blocks/white_autocrafting_monitor.json | 30 +++++ .../blocks/yellow_autocrafting_monitor.json | 30 +++++ .../coloring/black_autocrafting_monitor.json | 16 +++ .../coloring/blue_autocrafting_monitor.json | 16 +++ .../coloring/brown_autocrafting_monitor.json | 16 +++ .../coloring/cyan_autocrafting_monitor.json | 16 +++ .../coloring/gray_autocrafting_monitor.json | 16 +++ .../coloring/green_autocrafting_monitor.json | 16 +++ .../light_blue_autocrafting_monitor.json | 16 +++ .../light_gray_autocrafting_monitor.json | 16 +++ .../coloring/lime_autocrafting_monitor.json | 16 +++ .../magenta_autocrafting_monitor.json | 16 +++ .../coloring/orange_autocrafting_monitor.json | 16 +++ .../coloring/pink_autocrafting_monitor.json | 16 +++ .../coloring/purple_autocrafting_monitor.json | 16 +++ .../coloring/red_autocrafting_monitor.json | 16 +++ .../coloring/white_autocrafting_monitor.json | 16 +++ .../coloring/yellow_autocrafting_monitor.json | 16 +++ .../tags/item/autocrafting_monitors.json | 20 ++++ .../common/AbstractModInitializer.java | 8 ++ .../refinedstorage/common/Config.java | 2 + .../AutocrafterManagerScreen.java | 3 + .../monitor/AutocraftingMonitorBlock.java | 76 ++++++++++++ .../AutocraftingMonitorBlockEntity.java | 31 +++++ .../autocrafting/monitor/package-info.java | 7 ++ .../common/content/BlockEntities.java | 11 ++ .../refinedstorage/common/content/Blocks.java | 11 ++ .../common/content/ContentIds.java | 1 + .../common/content/ContentNames.java | 1 + .../common/content/CreativeModeTabItems.java | 1 + .../common/content/DefaultEnergyUsage.java | 1 + .../refinedstorage/common/content/Items.java | 9 ++ .../refinedstorage/common/content/Tags.java | 1 + .../assets/refinedstorage/lang/en_us.json | 11 +- .../block/autocrafting_monitor/back.png | Bin 0 -> 1423 bytes .../autocrafting_monitor/cutouts/black.png | Bin 0 -> 3031 bytes .../autocrafting_monitor/cutouts/blue.png | Bin 0 -> 3054 bytes .../autocrafting_monitor/cutouts/brown.png | Bin 0 -> 3060 bytes .../autocrafting_monitor/cutouts/cyan.png | Bin 0 -> 3078 bytes .../autocrafting_monitor/cutouts/gray.png | Bin 0 -> 3036 bytes .../autocrafting_monitor/cutouts/green.png | Bin 0 -> 3068 bytes .../autocrafting_monitor/cutouts/inactive.png | Bin 0 -> 324 bytes .../cutouts/light_blue.png | Bin 0 -> 553 bytes .../cutouts/light_gray.png | Bin 0 -> 2997 bytes .../autocrafting_monitor/cutouts/lime.png | Bin 0 -> 3071 bytes .../autocrafting_monitor/cutouts/magenta.png | Bin 0 -> 3056 bytes .../autocrafting_monitor/cutouts/orange.png | Bin 0 -> 3026 bytes .../autocrafting_monitor/cutouts/pink.png | Bin 0 -> 2977 bytes .../autocrafting_monitor/cutouts/purple.png | Bin 0 -> 3070 bytes .../autocrafting_monitor/cutouts/red.png | Bin 0 -> 3026 bytes .../autocrafting_monitor/cutouts/white.png | Bin 0 -> 2949 bytes .../autocrafting_monitor/cutouts/yellow.png | Bin 0 -> 3029 bytes .../block/autocrafting_monitor/front.png | Bin 0 -> 554 bytes .../block/autocrafting_monitor/left.png | Bin 0 -> 1453 bytes .../block/autocrafting_monitor/right.png | Bin 0 -> 1452 bytes .../block/autocrafting_monitor/top.png | Bin 0 -> 1419 bytes .../advancement/monitoring.json | 26 +++++ .../recipe/autocrafting_monitor.json | 28 +++++ .../fabric/ClientModInitializerImpl.java | 2 + .../refinedstorage/fabric/ConfigImpl.java | 10 ++ .../fabric/ModInitializerImpl.java | 1 + .../refinedstorage/neoforge/ConfigImpl.java | 10 ++ .../neoforge/ModInitializer.java | 1 + .../datagen/BlockModelProviderImpl.java | 13 ++- .../datagen/BlockStateProviderImpl.java | 9 ++ .../datagen/ItemModelProviderImpl.java | 9 ++ .../datagen/loot/BlockDropProvider.java | 2 + .../recipe/RecoloringRecipeProvider.java | 3 + .../datagen/tag/ItemTagsProviderImpl.java | 5 + 150 files changed, 3590 insertions(+), 5 deletions(-) create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/black_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/blue_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/brown_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/cyan_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/green_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/light_gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/lime_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/magenta_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/orange_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pink_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/purple_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/red_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/white_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/yellow_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/black.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/blue.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/brown.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/cyan.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/gray.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/green.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/inactive.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/light_blue.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/light_gray.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/lime.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/magenta.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/orange.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/pink.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/purple.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/red.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/white.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/yellow.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/black_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/blue_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/brown_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/cyan_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/green_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/light_gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/lime_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/magenta_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/orange_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pink_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/purple_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/red_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/white_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/yellow_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/black_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/blue_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/brown_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/cyan_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/green_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_blue_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/lime_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/magenta_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/orange_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/pink_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/purple_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/red_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/white_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/yellow_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/black_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/blue_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/brown_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/cyan_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/green_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/light_gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/lime_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/magenta_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/orange_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pink_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/purple_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/red_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/white_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/yellow_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/black_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/blue_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/brown_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/cyan_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/green_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_blue_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_gray_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/lime_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/magenta_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/orange_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/pink_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/purple_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/red_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/white_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/yellow_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/generated/resources/data/refinedstorage/tags/item/autocrafting_monitors.json create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlock.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/package-info.java create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/back.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/black.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/blue.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/brown.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/cyan.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/gray.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/green.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/inactive.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/light_blue.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/light_gray.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/lime.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/magenta.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/orange.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/pink.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/purple.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/red.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/white.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/yellow.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/front.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/left.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/right.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/top.png create mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/advancement/monitoring.json create mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/recipe/autocrafting_monitor.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ee7fb919..2039a46a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- Autocrafting Monitor + ## [2.0.0-milestone.4.9] - 2024-11-01 ### Added diff --git a/gradle.properties b/gradle.properties index a1b566f8c..d77ada458 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,3 +5,4 @@ org.gradle.configureondemand=true org.gradle.caching=true org.gradle.configuration-cache=true org.gradle.configuration-cache.problems=warn +org.gradle.vfs.watch=false diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/autocrafting_monitor.json new file mode 100644 index 000000000..e2907bd3e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/light_blue", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/black_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/black_autocrafting_monitor.json new file mode 100644 index 000000000..9e02bbbf6 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/black_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/black" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/black", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/blue_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/blue_autocrafting_monitor.json new file mode 100644 index 000000000..bf8dc6c0d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/blue_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/blue" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/blue", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/brown_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/brown_autocrafting_monitor.json new file mode 100644 index 000000000..5687f86d7 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/brown_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/brown" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/brown", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/cyan_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/cyan_autocrafting_monitor.json new file mode 100644 index 000000000..5417ffb1a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/cyan_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/cyan" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/cyan", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/gray_autocrafting_monitor.json new file mode 100644 index 000000000..d46db554f --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/gray_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/gray" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/gray", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/green_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/green_autocrafting_monitor.json new file mode 100644 index 000000000..ca8c76d35 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/green_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/green" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/green", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/light_gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/light_gray_autocrafting_monitor.json new file mode 100644 index 000000000..5412f565e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/light_gray_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/light_gray", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/lime_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/lime_autocrafting_monitor.json new file mode 100644 index 000000000..f45569f24 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/lime_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/lime" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/lime", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/magenta_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/magenta_autocrafting_monitor.json new file mode 100644 index 000000000..bd877d9f3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/magenta_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/magenta" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/magenta", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/orange_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/orange_autocrafting_monitor.json new file mode 100644 index 000000000..93d12914b --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/orange_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/orange" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/orange", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pink_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pink_autocrafting_monitor.json new file mode 100644 index 000000000..119979899 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/pink_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/pink" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/pink", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/purple_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/purple_autocrafting_monitor.json new file mode 100644 index 000000000..f69029b1b --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/purple_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/purple" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/purple", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/red_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/red_autocrafting_monitor.json new file mode 100644 index 000000000..50e4fb618 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/red_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/red" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/red", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/white_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/white_autocrafting_monitor.json new file mode 100644 index 000000000..066fa5c46 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/white_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/white" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/white", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/yellow_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/yellow_autocrafting_monitor.json new file mode 100644 index 000000000..6a9b91a53 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/blockstates/yellow_autocrafting_monitor.json @@ -0,0 +1,110 @@ +{ + "variants": { + "active=false,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": -90 + }, + "active=false,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90 + }, + "active=false,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 180 + }, + "active=false,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": 90, + "y": 90 + }, + "active=false,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 90 + }, + "active=false,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive" + }, + "active=false,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 180 + }, + "active=false,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": -90 + }, + "active=false,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 180 + }, + "active=false,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90 + }, + "active=false,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "x": -90, + "y": 90 + }, + "active=false,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/inactive", + "y": 270 + }, + "active=true,direction=down_east": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "x": 90, + "y": -90 + }, + "active=true,direction=down_north": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "x": 90 + }, + "active=true,direction=down_south": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "x": 90, + "y": 180 + }, + "active=true,direction=down_west": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "x": 90, + "y": 90 + }, + "active=true,direction=east": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "y": 90 + }, + "active=true,direction=north": { + "model": "refinedstorage:block/autocrafting_monitor/yellow" + }, + "active=true,direction=south": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "y": 180 + }, + "active=true,direction=up_east": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "x": -90, + "y": -90 + }, + "active=true,direction=up_north": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "x": -90, + "y": 180 + }, + "active=true,direction=up_south": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "x": -90 + }, + "active=true,direction=up_west": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "x": -90, + "y": 90 + }, + "active=true,direction=west": { + "model": "refinedstorage:block/autocrafting_monitor/yellow", + "y": 270 + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/black.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/black.json new file mode 100644 index 000000000..d43b33083 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/black.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/black", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/blue.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/blue.json new file mode 100644 index 000000000..ea545fab6 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/blue.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/blue", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/brown.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/brown.json new file mode 100644 index 000000000..cfb905820 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/brown.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/brown", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/cyan.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/cyan.json new file mode 100644 index 000000000..f8a3694f0 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/cyan.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/cyan", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/gray.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/gray.json new file mode 100644 index 000000000..76dcae8a9 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/gray.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/gray", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/green.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/green.json new file mode 100644 index 000000000..887326aba --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/green.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/green", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/inactive.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/inactive.json new file mode 100644 index 000000000..e4c9478c3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/inactive.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/inactive", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/light_blue.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/light_blue.json new file mode 100644 index 000000000..e02b71ccc --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/light_blue.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/light_blue", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/light_gray.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/light_gray.json new file mode 100644 index 000000000..574ebfa75 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/light_gray.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/light_gray", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/lime.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/lime.json new file mode 100644 index 000000000..27d5de28f --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/lime.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/lime", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/magenta.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/magenta.json new file mode 100644 index 000000000..8d8ba7895 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/magenta.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/magenta", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/orange.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/orange.json new file mode 100644 index 000000000..b789ba0f7 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/orange.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/orange", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/pink.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/pink.json new file mode 100644 index 000000000..054cebc8d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/pink.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/pink", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/purple.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/purple.json new file mode 100644 index 000000000..e6b5ce099 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/purple.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/purple", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/red.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/red.json new file mode 100644 index 000000000..9f78698be --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/red.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/red", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/white.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/white.json new file mode 100644 index 000000000..5aa9ef1c3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/white.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/white", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/yellow.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/yellow.json new file mode 100644 index 000000000..1044427ab --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/block/autocrafting_monitor/yellow.json @@ -0,0 +1,13 @@ +{ + "parent": "refinedstorage:block/emissive_north_cutout", + "textures": { + "cutout": "refinedstorage:block/autocrafting_monitor/cutouts/yellow", + "down": "refinedstorage:block/bottom", + "east": "refinedstorage:block/autocrafting_monitor/right", + "north": "refinedstorage:block/autocrafting_monitor/front", + "particle": "refinedstorage:block/autocrafting_monitor/right", + "south": "refinedstorage:block/autocrafting_monitor/back", + "up": "refinedstorage:block/autocrafting_monitor/top", + "west": "refinedstorage:block/autocrafting_monitor/left" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/autocrafting_monitor.json new file mode 100644 index 000000000..889e9040e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/light_blue" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/black_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/black_autocrafting_monitor.json new file mode 100644 index 000000000..551f4949d --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/black_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/black" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/blue_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/blue_autocrafting_monitor.json new file mode 100644 index 000000000..7c2234cc8 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/blue_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/blue" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/brown_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/brown_autocrafting_monitor.json new file mode 100644 index 000000000..bca75b4ae --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/brown_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/brown" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/cyan_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/cyan_autocrafting_monitor.json new file mode 100644 index 000000000..00f902a84 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/cyan_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/cyan" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/gray_autocrafting_monitor.json new file mode 100644 index 000000000..38d0866c6 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/gray_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/gray" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/green_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/green_autocrafting_monitor.json new file mode 100644 index 000000000..2b0d77167 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/green_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/green" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/light_gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/light_gray_autocrafting_monitor.json new file mode 100644 index 000000000..a9fe55a4b --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/light_gray_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/light_gray" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/lime_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/lime_autocrafting_monitor.json new file mode 100644 index 000000000..922c4d33c --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/lime_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/lime" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/magenta_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/magenta_autocrafting_monitor.json new file mode 100644 index 000000000..f2d988c9a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/magenta_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/magenta" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/orange_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/orange_autocrafting_monitor.json new file mode 100644 index 000000000..2e108639e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/orange_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/orange" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pink_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pink_autocrafting_monitor.json new file mode 100644 index 000000000..a963b2b5b --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/pink_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/pink" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/purple_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/purple_autocrafting_monitor.json new file mode 100644 index 000000000..4ee2e54df --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/purple_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/purple" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/red_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/red_autocrafting_monitor.json new file mode 100644 index 000000000..bd1d9e45f --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/red_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/red" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/white_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/white_autocrafting_monitor.json new file mode 100644 index 000000000..265a854bc --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/white_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/white" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/yellow_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/yellow_autocrafting_monitor.json new file mode 100644 index 000000000..142efd4e0 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/assets/refinedstorage/models/item/yellow_autocrafting_monitor.json @@ -0,0 +1,3 @@ +{ + "parent": "refinedstorage:block/autocrafting_monitor/yellow" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/black_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/black_autocrafting_monitor.json new file mode 100644 index 000000000..2f0250697 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/black_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/black_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/black_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/blue_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/blue_autocrafting_monitor.json new file mode 100644 index 000000000..cf8adc802 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/blue_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/blue_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/blue_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/brown_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/brown_autocrafting_monitor.json new file mode 100644 index 000000000..04a4501cf --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/brown_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/brown_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/brown_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/cyan_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/cyan_autocrafting_monitor.json new file mode 100644 index 000000000..36a95795f --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/cyan_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/cyan_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/cyan_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/gray_autocrafting_monitor.json new file mode 100644 index 000000000..e3a3d7ee3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/gray_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/gray_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/gray_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/green_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/green_autocrafting_monitor.json new file mode 100644 index 000000000..3dd398666 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/green_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/green_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/green_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_blue_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_blue_autocrafting_monitor.json new file mode 100644 index 000000000..6a79cfc69 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_blue_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/light_blue_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/light_blue_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_gray_autocrafting_monitor.json new file mode 100644 index 000000000..38cddd6e6 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/light_gray_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/light_gray_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/light_gray_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/lime_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/lime_autocrafting_monitor.json new file mode 100644 index 000000000..ba49953dc --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/lime_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/lime_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/lime_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/magenta_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/magenta_autocrafting_monitor.json new file mode 100644 index 000000000..c92c8ce7a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/magenta_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/magenta_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/magenta_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/orange_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/orange_autocrafting_monitor.json new file mode 100644 index 000000000..7dd87d49a --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/orange_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/orange_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/orange_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/pink_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/pink_autocrafting_monitor.json new file mode 100644 index 000000000..9656faf18 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/pink_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/pink_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/pink_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/purple_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/purple_autocrafting_monitor.json new file mode 100644 index 000000000..b927b7dea --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/purple_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/purple_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/purple_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/red_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/red_autocrafting_monitor.json new file mode 100644 index 000000000..96555b6be --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/red_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/red_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/red_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/white_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/white_autocrafting_monitor.json new file mode 100644 index 000000000..faf301eb1 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/white_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/white_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/white_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/yellow_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/yellow_autocrafting_monitor.json new file mode 100644 index 000000000..7c1fdac62 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/advancement/recipes/misc/coloring/yellow_autocrafting_monitor.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_autocrafting_monitors": { + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "refinedstorage:coloring/yellow_autocrafting_monitor" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_autocrafting_monitors" + ] + ], + "rewards": { + "recipes": [ + "refinedstorage:coloring/yellow_autocrafting_monitor" + ] + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/autocrafting_monitor.json new file mode 100644 index 000000000..cde420a26 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/black_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/black_autocrafting_monitor.json new file mode 100644 index 000000000..8ca02bc57 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/black_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:black_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/black_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/blue_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/blue_autocrafting_monitor.json new file mode 100644 index 000000000..040c74174 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/blue_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:blue_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/blue_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/brown_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/brown_autocrafting_monitor.json new file mode 100644 index 000000000..4adc0ff91 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/brown_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:brown_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/brown_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/cyan_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/cyan_autocrafting_monitor.json new file mode 100644 index 000000000..2ef6a1a68 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/cyan_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:cyan_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/cyan_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/gray_autocrafting_monitor.json new file mode 100644 index 000000000..2d6b9a1db --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/gray_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:gray_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/gray_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/green_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/green_autocrafting_monitor.json new file mode 100644 index 000000000..3e031b1cd --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/green_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:green_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/green_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/light_gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/light_gray_autocrafting_monitor.json new file mode 100644 index 000000000..48a71c986 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/light_gray_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:light_gray_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/light_gray_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/lime_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/lime_autocrafting_monitor.json new file mode 100644 index 000000000..f0d5c53df --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/lime_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:lime_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/lime_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/magenta_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/magenta_autocrafting_monitor.json new file mode 100644 index 000000000..b793087ce --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/magenta_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:magenta_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/magenta_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/orange_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/orange_autocrafting_monitor.json new file mode 100644 index 000000000..4655065a3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/orange_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:orange_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/orange_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pink_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pink_autocrafting_monitor.json new file mode 100644 index 000000000..e9fd667c3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/pink_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:pink_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/pink_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/purple_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/purple_autocrafting_monitor.json new file mode 100644 index 000000000..051bfeb35 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/purple_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:purple_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/purple_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/red_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/red_autocrafting_monitor.json new file mode 100644 index 000000000..282a7e2a9 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/red_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:red_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/red_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/white_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/white_autocrafting_monitor.json new file mode 100644 index 000000000..a81489896 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/white_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:white_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/white_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/yellow_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/yellow_autocrafting_monitor.json new file mode 100644 index 000000000..3a25c3a15 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/loot_table/blocks/yellow_autocrafting_monitor.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:copy_components", + "include": [ + "minecraft:custom_name" + ], + "source": "block_entity" + } + ], + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "refinedstorage:yellow_autocrafting_monitor" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "refinedstorage:blocks/yellow_autocrafting_monitor" +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/black_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/black_autocrafting_monitor.json new file mode 100644 index 000000000..32c86bf82 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/black_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/black" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:black_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/blue_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/blue_autocrafting_monitor.json new file mode 100644 index 000000000..577c657cc --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/blue_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/blue" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:blue_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/brown_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/brown_autocrafting_monitor.json new file mode 100644 index 000000000..ce65cc462 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/brown_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/brown" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:brown_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/cyan_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/cyan_autocrafting_monitor.json new file mode 100644 index 000000000..99754afcb --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/cyan_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/cyan" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:cyan_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/gray_autocrafting_monitor.json new file mode 100644 index 000000000..0f0e830de --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/gray_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/gray" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:gray_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/green_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/green_autocrafting_monitor.json new file mode 100644 index 000000000..90ef352a1 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/green_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/green" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:green_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_blue_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_blue_autocrafting_monitor.json new file mode 100644 index 000000000..3b85eead5 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_blue_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/light_blue" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_gray_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_gray_autocrafting_monitor.json new file mode 100644 index 000000000..a0fb4de4e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/light_gray_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/light_gray" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:light_gray_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/lime_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/lime_autocrafting_monitor.json new file mode 100644 index 000000000..80259f0cc --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/lime_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/lime" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:lime_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/magenta_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/magenta_autocrafting_monitor.json new file mode 100644 index 000000000..d852bcda3 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/magenta_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/magenta" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:magenta_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/orange_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/orange_autocrafting_monitor.json new file mode 100644 index 000000000..488d50f67 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/orange_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/orange" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:orange_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/pink_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/pink_autocrafting_monitor.json new file mode 100644 index 000000000..63026bb3c --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/pink_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/pink" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:pink_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/purple_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/purple_autocrafting_monitor.json new file mode 100644 index 000000000..f58dbe0e0 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/purple_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/purple" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:purple_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/red_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/red_autocrafting_monitor.json new file mode 100644 index 000000000..ee86c872f --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/red_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/red" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:red_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/white_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/white_autocrafting_monitor.json new file mode 100644 index 000000000..37b805e63 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/white_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/white" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:white_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/yellow_autocrafting_monitor.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/yellow_autocrafting_monitor.json new file mode 100644 index 000000000..c6d73864e --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/recipe/coloring/yellow_autocrafting_monitor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "tag": "refinedstorage:autocrafting_monitors" + }, + { + "tag": "c:dyes/yellow" + } + ], + "result": { + "count": 1, + "id": "refinedstorage:yellow_autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/generated/resources/data/refinedstorage/tags/item/autocrafting_monitors.json b/refinedstorage-common/src/generated/resources/data/refinedstorage/tags/item/autocrafting_monitors.json new file mode 100644 index 000000000..4416b4a94 --- /dev/null +++ b/refinedstorage-common/src/generated/resources/data/refinedstorage/tags/item/autocrafting_monitors.json @@ -0,0 +1,20 @@ +{ + "values": [ + "refinedstorage:white_autocrafting_monitor", + "refinedstorage:orange_autocrafting_monitor", + "refinedstorage:magenta_autocrafting_monitor", + "refinedstorage:autocrafting_monitor", + "refinedstorage:yellow_autocrafting_monitor", + "refinedstorage:lime_autocrafting_monitor", + "refinedstorage:pink_autocrafting_monitor", + "refinedstorage:gray_autocrafting_monitor", + "refinedstorage:light_gray_autocrafting_monitor", + "refinedstorage:cyan_autocrafting_monitor", + "refinedstorage:purple_autocrafting_monitor", + "refinedstorage:blue_autocrafting_monitor", + "refinedstorage:brown_autocrafting_monitor", + "refinedstorage:green_autocrafting_monitor", + "refinedstorage:red_autocrafting_monitor", + "refinedstorage:black_autocrafting_monitor" + ] +} \ No newline at end of file diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java index 848a97e24..6361de17b 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java @@ -25,6 +25,7 @@ import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerData; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridData; @@ -347,6 +348,7 @@ protected final void registerBlocks(final RegistryCallback callback, Blocks.INSTANCE.setDiskInterface(blockEntityProviders.diskInterface()).registerBlocks(callback); Blocks.INSTANCE.getAutocrafter().registerBlocks(callback); Blocks.INSTANCE.getAutocrafterManager().registerBlocks(callback); + Blocks.INSTANCE.getAutocraftingMonitor().registerBlocks(callback); } protected final void registerItems(final RegistryCallback callback) { @@ -371,6 +373,7 @@ protected final void registerItems(final RegistryCallback callback) { Blocks.INSTANCE.getDiskInterface().registerItems(callback, Items.INSTANCE::addDiskInterface); Blocks.INSTANCE.getAutocrafter().registerItems(callback, Items.INSTANCE::addAutocrafter); Blocks.INSTANCE.getAutocrafterManager().registerItems(callback, Items.INSTANCE::addAutocrafterManager); + Blocks.INSTANCE.getAutocraftingMonitor().registerItems(callback, Items.INSTANCE::addAutocraftingMonitor); registerStorageItems(callback); registerUpgrades(callback); } @@ -678,6 +681,11 @@ protected final void registerBlockEntities( () -> typeFactory.create(AutocrafterManagerBlockEntity::new, Blocks.INSTANCE.getAutocrafterManager().toArray()) )); + BlockEntities.INSTANCE.setAutocraftingMonitor(callback.register( + ContentIds.AUTOCRAFTING_MONITOR, + () -> typeFactory.create(AutocraftingMonitorBlockEntity::new, + Blocks.INSTANCE.getAutocraftingMonitor().toArray()) + )); } protected final void registerMenus(final RegistryCallback> callback, diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java index f91ffc40e..44bf24616 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java @@ -79,6 +79,8 @@ public interface Config { AutocrafterManagerEntry getAutocrafterManager(); + SimpleEnergyUsageEntry getAutocraftingMonitor(); + interface SimpleEnergyUsageEntry { long getEnergyUsage(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java index ab9b00465..e595859a0 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java @@ -23,6 +23,9 @@ import static com.refinedmods.refinedstorage.common.support.Sprites.SEARCH_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; +// TODO: fix sonar issues +// TODO: search box autoselected mode make generic. +// TODO: tooltip on search icon public class AutocrafterManagerScreen extends AbstractStretchingScreen { private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/autocrafter_manager.png"); private static final List SEARCH_FIELD_HISTORY = new ArrayList<>(); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlock.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlock.java new file mode 100644 index 000000000..e277e6c08 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlock.java @@ -0,0 +1,76 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.common.content.BlockColorMap; +import com.refinedmods.refinedstorage.common.content.BlockConstants; +import com.refinedmods.refinedstorage.common.content.BlockEntities; +import com.refinedmods.refinedstorage.common.content.Blocks; +import com.refinedmods.refinedstorage.common.support.AbstractActiveColoredDirectionalBlock; +import com.refinedmods.refinedstorage.common.support.AbstractBlockEntityTicker; +import com.refinedmods.refinedstorage.common.support.BaseBlockItem; +import com.refinedmods.refinedstorage.common.support.BlockItemProvider; +import com.refinedmods.refinedstorage.common.support.NetworkNodeBlockItem; +import com.refinedmods.refinedstorage.common.support.direction.BiDirection; +import com.refinedmods.refinedstorage.common.support.direction.BiDirectionType; +import com.refinedmods.refinedstorage.common.support.direction.DirectionType; +import com.refinedmods.refinedstorage.common.support.network.NetworkNodeBlockEntityTicker; + +import javax.annotation.Nullable; + +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; + +public class AutocraftingMonitorBlock + extends AbstractActiveColoredDirectionalBlock + implements BlockItemProvider, EntityBlock { + private static final Component HELP = createTranslation("item", "autocrafting_monitor.help"); + private static final AbstractBlockEntityTicker TICKER = + new NetworkNodeBlockEntityTicker<>(BlockEntities.INSTANCE::getAutocraftingMonitor, ACTIVE); + + public AutocraftingMonitorBlock(final DyeColor color, final MutableComponent name) { + super(BlockConstants.PROPERTIES, color, name); + } + + @Override + public BlockColorMap getBlockColorMap() { + return Blocks.INSTANCE.getAutocraftingMonitor(); + } + + @Override + public boolean canAlwaysConnect() { + return true; + } + + @Override + public BaseBlockItem createBlockItem() { + return new NetworkNodeBlockItem(this, HELP); + } + + @Override + protected DirectionType getDirectionType() { + return BiDirectionType.INSTANCE; + } + + @Override + @Nullable + public BlockEntity newBlockEntity(final BlockPos blockPos, final BlockState blockState) { + return new AutocraftingMonitorBlockEntity(blockPos, blockState); + } + + @Override + @Nullable + public BlockEntityTicker getTicker(final Level level, + final BlockState state, + final BlockEntityType type) { + return TICKER.get(level, type); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java new file mode 100644 index 000000000..d06b65362 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java @@ -0,0 +1,31 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.network.impl.node.SimpleNetworkNode; +import com.refinedmods.refinedstorage.common.Platform; +import com.refinedmods.refinedstorage.common.content.BlockEntities; +import com.refinedmods.refinedstorage.common.content.ContentNames; +import com.refinedmods.refinedstorage.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity; + +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; +import net.minecraft.world.level.block.state.BlockState; + +public class AutocraftingMonitorBlockEntity extends AbstractBaseNetworkNodeContainerBlockEntity { + public AutocraftingMonitorBlockEntity(final BlockPos pos, final BlockState state) { + super(BlockEntities.INSTANCE.getAutocraftingMonitor(), pos, state, new SimpleNetworkNode( + Platform.INSTANCE.getConfig().getAutocraftingMonitor().getEnergyUsage() + )); + } + + @Override + public Component getName() { + return overrideName(ContentNames.AUTOCRAFTING_MONITOR); + } + + @Override + protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState oldBlockState, + final BlockState newBlockState) { + return AbstractDirectionalBlock.didDirectionChange(oldBlockState, newBlockState); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/package-info.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/package-info.java new file mode 100644 index 000000000..a9671ff9e --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/BlockEntities.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/BlockEntities.java index 2b5320718..bad5dcbf5 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/BlockEntities.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/BlockEntities.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage.common.autocrafting.autocrafter.AutocrafterBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerBlockEntity; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridBlockEntity; import com.refinedmods.refinedstorage.common.constructordestructor.AbstractConstructorBlockEntity; import com.refinedmods.refinedstorage.common.constructordestructor.AbstractDestructorBlockEntity; @@ -94,6 +95,8 @@ public final class BlockEntities { private Supplier> autocrafter; @Nullable private Supplier> autocrafterManager; + @Nullable + private Supplier> autocraftingMonitor; private BlockEntities() { } @@ -315,4 +318,12 @@ public BlockEntityType getAutocrafterManager() { public void setAutocrafterManager(final Supplier> supplier) { this.autocrafterManager = supplier; } + + public BlockEntityType getAutocraftingMonitor() { + return requireNonNull(autocraftingMonitor).get(); + } + + public void setAutocraftingMonitor(final Supplier> supplier) { + this.autocraftingMonitor = supplier; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java index e3c403d05..e07b1276c 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage.common.autocrafting.autocrafter.AutocrafterBlock; import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerBlock; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorBlock; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridBlock; import com.refinedmods.refinedstorage.common.constructordestructor.AbstractConstructorBlockEntity; import com.refinedmods.refinedstorage.common.constructordestructor.AbstractDestructorBlockEntity; @@ -158,6 +159,12 @@ public final class Blocks { ContentNames.AUTOCRAFTER_MANAGER, COLOR ); + private final BlockColorMap autocraftingMonitor = new BlockColorMap<>( + AutocraftingMonitorBlock::new, + ContentIds.AUTOCRAFTING_MONITOR, + ContentNames.AUTOCRAFTING_MONITOR, + COLOR + ); @Nullable private Supplier quartzEnrichedIronBlock; @@ -433,4 +440,8 @@ public BlockColorMap getAutocrafter() { public BlockColorMap getAutocrafterManager() { return autocrafterManager; } + + public BlockColorMap getAutocraftingMonitor() { + return autocraftingMonitor; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java index 69792f5fb..1b3ae4fce 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java @@ -69,6 +69,7 @@ public final class ContentIds { public static final ResourceLocation PATTERN = createIdentifier("pattern"); public static final ResourceLocation AUTOCRAFTER = createIdentifier("autocrafter"); public static final ResourceLocation AUTOCRAFTER_MANAGER = createIdentifier("autocrafter_manager"); + public static final ResourceLocation AUTOCRAFTING_MONITOR = createIdentifier("autocrafting_monitor"); private ContentIds() { } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java index 8a6233c1a..dcccc402c 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java @@ -41,6 +41,7 @@ public final class ContentNames { public static final MutableComponent DISK_INTERFACE = name("disk_interface"); public static final MutableComponent AUTOCRAFTER = name("autocrafter"); public static final MutableComponent AUTOCRAFTER_MANAGER = name("autocrafter_manager"); + public static final MutableComponent AUTOCRAFTING_MONITOR = name("autocrafting_monitor"); public static final String CLEAR_CRAFTING_MATRIX_TO_NETWORK_TRANSLATION_KEY = createTranslationKey("key", "clear_crafting_grid_matrix_to_network"); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java index f1bc18a0d..c368aeba3 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java @@ -60,6 +60,7 @@ private static void appendBlocks(final Consumer consumer) { Items.INSTANCE.getDiskInterfaces().stream().map(Supplier::get).forEach(itemConsumer); Items.INSTANCE.getAutocrafters().stream().map(Supplier::get).forEach(itemConsumer); Items.INSTANCE.getAutocrafterManagers().stream().map(Supplier::get).forEach(itemConsumer); + Items.INSTANCE.getAutocraftingMonitors().stream().map(Supplier::get).forEach(itemConsumer); } private static void appendBlockColors(final Consumer consumer, final BlockColorMap map) { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java index 1da5d7d4b..12196696f 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java @@ -25,6 +25,7 @@ public final class DefaultEnergyUsage { public static final long AUTOCRAFTER = 4; public static final long AUTOCRAFTER_PER_PATTERN = 2; public static final long AUTOCRAFTER_MANAGER = 16; + public static final long AUTOCRAFTING_MONITOR = 16; public static final long CONTROLLER_CAPACITY = 1000; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java index f16588c5f..9471ab294 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java @@ -53,6 +53,7 @@ public final class Items { private final List> allDiskInterfaces = new ArrayList<>(); private final List> allAutocrafters = new ArrayList<>(); private final List> allAutocrafterManagers = new ArrayList<>(); + private final List> allAutocraftingMonitors = new ArrayList<>(); @Nullable private Supplier quartzEnrichedIron; @Nullable @@ -456,6 +457,14 @@ public List> getAutocrafterManagers() { return Collections.unmodifiableList(allAutocrafterManagers); } + public void addAutocraftingMonitor(final Supplier supplier) { + allAutocraftingMonitors.add(supplier); + } + + public List> getAutocraftingMonitors() { + return Collections.unmodifiableList(allAutocraftingMonitors); + } + public Item getNetworkCard() { return requireNonNull(networkCard).get(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Tags.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Tags.java index e7038a70f..863107f31 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Tags.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Tags.java @@ -29,6 +29,7 @@ public final class Tags { public static final TagKey DISK_INTERFACES = createTag("disk_interfaces"); public static final TagKey AUTOCRAFTERS = createTag("autocrafters"); public static final TagKey AUTOCRAFTER_MANAGERS = createTag("autocrafter_managers"); + public static final TagKey AUTOCRAFTING_MONITORS = createTag("autocrafting_monitors"); private Tags() { } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json index 10d370c0a..0b28df43c 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -39,6 +39,7 @@ "block.refinedstorage.disk_interface": "Disk Interface", "block.refinedstorage.autocrafter": "Autocrafter", "block.refinedstorage.autocrafter_manager": "Autocrafter Manager", + "block.refinedstorage.autocrafting_monitor": "Autocrafting Monitor", "gui.refinedstorage.controller.redstone_mode_help": "When this device is inactive, the storage network will not be able to use this device as an energy source.", "gui.refinedstorage.disk_drive.disks": "Disks", "gui.refinedstorage.storage.redstone_mode_help": "When this device is inactive, the contained storage will no longer be accessible from within the storage network.", @@ -347,6 +348,7 @@ "item.refinedstorage.pattern.fuzzy_mode": "Fuzzy mode", "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", + "item.refinedstorage.autocrafting_monitor.help": "Displays the status of autocrafting tasks and allows you to cancel autocrafting tasks in your storage network.", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -418,6 +420,7 @@ "tag.item.refinedstorage.disk_interfaces": "Disk Interfaces", "tag.item.refinedstorage.autocrafters": "Autocrafters", "tag.item.refinedstorage.autocrafter_managers": "Autocrafter Managers", + "tag.item.refinedstorage.autocrafting_monitors": "Autocrafting Monitors", "text.autoconfig.refinedstorage.title": "Refined Storage Configuration", "refinedstorage.configuration.title": "Refined Storage Configuration", "refinedstorage.configuration.section.refinedstorage.common.toml": "Refined Storage Configuration", @@ -626,6 +629,10 @@ "text.autoconfig.refinedstorage.option.autocrafterManager.searchMode.tooltip": "The search mode.", "text.autoconfig.refinedstorage.option.autocrafterManager.viewType": "View type", "text.autoconfig.refinedstorage.option.autocrafterManager.viewType.tooltip": "The view type.", + "text.autoconfig.refinedstorage.option.autocraftingMonitor": "Autocrafting Monitor", + "text.autoconfig.refinedstorage.option.autocraftingMonitor.tooltip": "Configuration for the Autocrafting Monitor.", + "text.autoconfig.refinedstorage.option.autocraftingMonitor.energyUsage": "Energy usage", + "text.autoconfig.refinedstorage.option.autocraftingMonitor.energyUsage.tooltip": "The energy used by the Autocrafting Monitor.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -672,5 +679,7 @@ "advancements.refinedstorage.autocrafting": "Autocrafting", "advancements.refinedstorage.autocrafting.description": "Automate crafting with an Autocrafter by using patterns created in a Pattern Grid", "advancements.refinedstorage.managing_patterns": "Managing patterns", - "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface" + "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface", + "advancements.refinedstorage.monitoring": "Monitoring", + "advancements.refinedstorage.monitoring.description": "Check the status of your autocrafting tasks with a Autocrafting Monitor" } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/back.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/back.png new file mode 100644 index 0000000000000000000000000000000000000000..3d9b6a87eb864a727424103e66fffb8a5af5f0d0 GIT binary patch literal 1423 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n9DLlB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxOgGuk&``nLQqR!T z!q~`EN5ROz&{W^RQs2-(*TB%q(7?*bKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv|9-O^tOeQ%y{DEmM*#b&U;;4N_AQ%`FU*4PfSA({JW#YGiI|;bdWA=xS)_ zYGz?*>F8{3VP;}%XldqX;0n|0nO9trn3tRivpW-LH&m}9UcFY%MX8A;`9&f5`8lvu z5Rj2yl3$#WU!dUZ432dLjquF8l>G8yO;9vJeC?82lv$RV;#QQOs{jsXt4u6zAkO~~ z{VC*zpFYr0`k=&ulz3o5z!V8$!m|R91J6vUdB7Z01k5Uzycy&e7#P=kx;TbZ+_IT; zny<-$$F-f2#l%i*mW27Pi|aqc|H(?eGjqp9RhGnxGY=%Q=CpV&-@A8jE~nmfZvmFt z`_|95T=QCK(YJPM?(HODuEP`5%^BWty#HAvCh-1dPFQGY?DdLQA5DCl@0P}jxNg6F zHrT0t|NX*)7o~!yK79}~@j2%KgE{A)U#Z+1m*TW)vWjB*?z_t}y8@*bZ;_kgwVCIW zBFBM=8*b+G7)l7PdEoH5P4IT4x9Ro@mpKPCT#huOwUc)|6PDNT)4mre2{s0?tJOgCKcX(5B9SQJSz6zzw*(x zz(J(dJe7cQX#Q!2iCiT;Y9%#DQR~0N+epxf_ zpkh?mPxBATZ`3(o7g$`lT(mPK?2`EoozpE$q8AoAF(;M({yXoPf?gLBOU8nNhg1H( zDYJI#cmFKd+;BILOF#2YPq)bz2Y*eK4=s29*KAl9rhVeijIC@39U3N`pKN{p^Vcfh zDMA0P?}%H!$u;Rk;*Efy2{JzqH=Zgw@t@0pA^UfiwEy8b4xl2^)78&qol`;+0PUy% Ap#T5? literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/black.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/black.png new file mode 100644 index 0000000000000000000000000000000000000000..d10b61222b50b9fb5123ca8bae0bd2dcc10ca076 GIT binary patch literal 3031 zcmcImZEO@p7~c8=N)dyifixtnTjM8tyR%=nyKrFXfh~Hqlp^H^gt?j7cI9q&+1>W8 zjS&Jh0gM`h#)w3Wnt(OY81;t|Ly6)KZHO`92Sg2DDn@K0V9*%F+52iMEp0?L+1c5d zXWoxz-uIo^+0y*bteV;yhGAwkH6~l>cXsqvPowREi&r51%;MS@sG37Oo zPP?(!C#!p#+feT&WMFRT5_WOkqyn-egls;WaRM`+;0kh0+K+|>jx9jKO$n|(QpmQa zTG$5HC#)6|c_fMw8#iJ=Qxr{H$V#Fl3Zg0ii3ge~Dkg}trH7;1d~BJm$rUAC^e@46 zhM{K)LN1q!<>Z*_cL=~R3_+9xN#ZGj4|<#s=6NTmD@#a{0Qt5T+OES!5@Fiy3KJZ) zwCF1paArCzP#Kg#@0uZAL&g=3s1?3nCBtx>q2?L4+6)a^bm8!tU6`Rdg z&_TGon_5)zZCrHF*5eVOl>}~=kI3?Fs5-QVU zs0eLq0)^4c7%0ix6F{Sx3e+jc z4cp^v@YJX*ip_NrO4c=^wg?McE6hQk)OS#ZC(R0BBI5(teQnc0Tmd4`2yYp(#;ZgT z`LwLYc}+J^T9hS1K)mew)uziPP)w102!oMp-@jqE) zaz(T^g@e}|uNHtQ#vnb3OoPW z*IVqP7%I>(>fTfyqL;C#Te$_&pUORwI5cm4dQ0rSCv%x$s%~yd*0<@;9NC?E{HFTb z`wk6(ZQtGh>YXpwRda*$lh1FSGxso>cZvC7=%4-*x8hX%`+_|JCpt{d;a1 zI$Aep!HK_T4jd4^xNvOEi$8@m`p~nBc2o~Fubd&D@qVw~&dB7wcCj{5b<$xD)c*O` zqOSGtAI~`R`<~oM{y05!6n|}YzI4Z}hX-e`YF#=1x&3gu(b3;O^g;iIy#vnW&!1Rw z<AB{V`%&;*5;7)gjxYLs9=oViz9ZE1tD$-ZX3 z`Tu{u`Tl>Vx2fU2*`+s?QWQ12zAn;?-*d=4V>*7`^4mp-Uo)M$Hjkpp=8<~})&J@Z z6jj=3w#NKe^Z`w`Qvqn$aTLg;9E_%@%EcK6>MM{>$5Fd!g_&PI+QZPM5oVT4Q9kNa zqYkrfrHfitHni$1SLmw2EWU@X%xKs^3i*)Eq>`4WWx`C>u7uBm2+{eA!QNaWp*2Tp^S(*7EW+VZyi!bT|;;$&|7{Loec-E;pHVZs;6Jq7<@x4`V?Qi&=_Bi|{ec zrcy<;=ht-Oi1KqA6YaJ3IEZUTp55i@sHPixtSAKL`ORpUnn?`D@Zw;n!}e{j!ybo( zV)rO2d^0hQL(($}iZbRnP|{O`I$E`hpl`daww)|!r>PJdEr5VP-@e?m3_I;DA`{OK zKoRJpFhhjI@(L^Rt%9KOK$F0oJpSNw&?uIs0ev_Utg<|41-vF=m^un<8)l+sLa3o@ z3ENFUyl`d;wj<85+OyuGQLWzcd}!&YJ`!edr~%V7GzsadA_o=L5LJQYg&@zyB?+>I zgcLyy$!bCs3gaWT-bF-3#^>_Ouyt&sxEh)O6$L0*?{Og%WJQFnDGC%=RTT^%$;e0q zLj`M%u8C6|CP!K&Q5o1`0x7bn8*x@NLWot2AYfGxClAR`#UKzvam?Yc-)cK)yHVS~ zoQn)iR$Ig7aj1~wSC|3$#u$-mvMbjZ5_o)ZfIRd4Z4>klcRy&Em|{!~(TkS#--1gQ z4nUS9QOdVBnHiLfMNG_^mkUH5+0!<p<12kVa@gAYfTI4%zq_KI-8Ul)N@nN zi8_(Nlf&!xLr&H(u}_?7np9AQS{VkP(|u zMVXa|n&P4qVr50uSlYMY>D&J@ zxPR)>IcxWP`}QYG%J#>~;#*I)RX*`dY|}$k6*HE)Q|8{bdBYELD|`Ev)vhmJQ*%}N z?4Z4?bFhCKSkp2%>)_eH&Yf7bpx0#jAN`Y~&N#acpE@A6Cw7;X%zW|Jud0}z7k<9~ z!q?mTre&Px)7SNGf9ky*r`{hp(Q#~}`P!cK<=^b=J>56p%>DAmQmTA@bYt(7>_Xrw^_>e`;vM(LYKC*S)jmrEB{)-@FVQoHeWR_a~p5zu@c_)YOLV zjYG%p9r$>WqO7WYcx^+;whK>RII{4LcRQ^uHx8Zm#p`h>uVY!14|xR^EZUj^~3-G literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/brown.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/brown.png new file mode 100644 index 0000000000000000000000000000000000000000..2b2cd0a660051c5e2f7dcd8291939b7db49deb98 GIT binary patch literal 3060 zcmcImeQXp(6yHKbEg=>)(GU%rB{2}(+wZ;Gg`?J9Ya6*z+L{)Eh1uEJ-iEu~?e4aB zZ3q!DN)t(lglJF%s!{wxBqjt*1k@%P5aS=j5E8VB{$m7`j~FFTXYQ-5w6sClWWVP9 z=Dpv0^WK{oXl{CHPUXBxilXK;HY8f`yNcZR%)-z4mq!48-Rm{13Mgv!1LUrtcE0g2 zMOAj&Z5?4pa=8xOOaz#&fg-t#htU+Zv^wVjxE_VHfx2ub&RqQLC_~$3oM~5*eA25$ zDZ8QHN3H!$ZLohm)J&#&8ND>8V+9!$0y>vTJAs~yGkLu_{wBj5L+2sk`Z!ZV4ALFR zX1dn(5v@je7V^AEN41Ec%CgEoPK&(AbG*U{A}gpmFY7{-E?x|_=9`w@lBh4*!hdll z6^5S9aoKD(l9eK^-^B@}(FhE;CyX&1+UzD0$AMkbw)&=onoze~ zKLhZ>*%{D?#A+6=vIxk4jX?-lO_9}@ zEQx|-71-kW2^aQ|q$2YR^<}yc>nN{=4g`~r0!d^oOO{v|lLb~&p~}V-#gKR<7DX{w zVza`xafyTUSgnMWNm!wnDnZj=B{PcHm`U^q26-r^Cdq;nH887DyR~lG^^>lNV=gf? zS#2Gw$5a8SuQ($V2Rlfrrh5v5QIW?NCy-}RzG@2jsQ4Mj#vv9Nn&gX~x8I6e7bc)8 zilh|Bo9!G*cO+~awV*&m9V=NiUP3wMnkzZ8~3+I)DWiAjwW- zGR0wgq6MB-C<|({DTIS{i>xic0@n(&z(+M*IKop_1veS_0QBCPx)7BGUQiKhX_Cq+ zNak5XQlhLH)1bjiB0@s6ss z#q~O7aepcoBptf+X#1HoXeRRQF*z{SN|^%vKiZozU7q?I*rm-L&cIecf49zp{B}xWQ`W^v)OPBb}d~W44}s zcewIg>nClQjYH3l%sIN`jNu$!wuip^_s%tsW?H&-ud~;jWaLK*a$~P9;%WPlJ{qxAV Oys@q+vH!_+&;J9fwfRW^ literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/cyan.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/cyan.png new file mode 100644 index 0000000000000000000000000000000000000000..5c0ea4da586fadefe330080372ceb78ff3219db0 GIT binary patch literal 3078 zcmcgudu$X%7{8*T)bOlELNqRmfE4%kb-R1J_CV~F_5ue-dxTbrb#`~Qx9Q#Pc6Zym zHY5@hr6xom*gz$ue_(<^h=gdUXn3TANYoez5lx7XphiR~8YmGHoV`~Iw6wv;CAT{} z-*3LhZ@%xF>5MI_o>)4g)aUa}jMRi{(R+&be_%X%KK{oIfL;@1qgH#YL&8 zRS6S%O@|HZI+n$ij%Gzv@r4Vpij0I5q@WA1Oe$$OQYM6F^-5^$O_Mm5g}BWje354m ztB=O8O4EiI@23cbq8LmN{WKp4@YGWnLopOdaU{(UG%ryBi59T@4@cH)Rg-GNi}SY7 zR|rqIt|gIVI-T~XS-)vFk+dj^B*l;nLm&jPtS5Qa0Wpdkz$#nvrXHx10w2xPO> z4dKYsTnH(vsMc`uG$F#s46sPrPkA9_fvQr(S*><5Yg|=Gn1m^4xDLY7MJ!?|8ZE+y zRhvo`(T-cyhCIs0HZ0nSw_A{`g^t;3E3m2!S)5gH%yDbsAT?uHj^M?`R>E{mCt;32 zLQ#AZ6|Sz0V9=A?1ce!W1gIw|LM^G%hQKxLxM?N}xf3h+hB36C!Jb^D8>*Rh=6QkV z7r-!ZVF>pUiJ*c6OT`&RqG*Yu=Tm4v<)BfNnksO?P_Rf)beyInmbn#ds=C%bDpXY@ z&9qYhZJeG0O^~#VrmVGSREijm3k(HD!XX^F>eqD@*`YO_1scI901~JGGy((!mXLu! zX@D0skqZ>ohfSr`ODb=DuD(=LK{|@NAql*uXf!1gl&G-;rv(5Zdn1{rgn-O|pcVuL zZOd&Pl{iQa)#`brB8?gh@~ooD1gi>=2&w^^5NX+aaH_}#XjYIBhl6%2&7^5ZO%-v@ z;+VJF5>k&`1zvrHa5_I(@1<(8H8&|R6#9|0_sq*1Mv)JSR~kB^n87hGU!<)4I@G$5 z13bsETz)>LXJE2EtRvQ(oFn{DNyE(&uakKdD%I!?%DMJ@uc?DA`B75GvPCHYB^QF? zWhYee{IovI29J%(oZ55(BC_s~wK31Os_Bz>9(y5K%VWz7NATg#S1g#WdQWJtVO#U;}iJLfZ-9nr)^q zU|C6B$yOKHW~lk|saTMhYhr`#XGGFeXzN3AV5pU%3)sJCZ`6z%TQ~gQH;MEv2)Q;u z-r6B@-{BmSi@m+c9=y_UyDzex+R}^Rbiel>?I+UU))FHinpm{HK3jo?MpbI?&Ql8Sk9>(=)I1 zclGpEA9(k@HHpdCvG30(HZPufA%w5nzQ4^~f8Xq_u_f4^GYz4SdQN@w+N*0f^epI! zl+L~u>h^U$HotD=(v7?Kj2kyIQgXK9P}Ppg(?3qw)$(R_*VT#lwlrRU_~iJOsk^^x pEZaGty*<1Ct!p<9e?j+8k~Vd({_6QH*S(v1q-t4s-?J~S`x{3*2POaj literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/gray.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/gray.png new file mode 100644 index 0000000000000000000000000000000000000000..6534b858107cb97484d0fc259099c052ac5211dd GIT binary patch literal 3036 zcmcguTWl3Y7(NI=uG(T^&_ue~Y69wATgvU8jJ)@e6Y@(TU%*qgO^SAHuKH@ z|MSiF|1-~bv_CR;*1fZ0vDnJ2X*U@{%bno7x_!F zJyGNv9GB1M<9R9W1>KyW>pI7aoG1c<0Aary!2)o@#;S!B4pHFvk>j}xwFphGH%hW3 z(()8?e$A{KR%jxGaRumeLY${lDgiB2!}+~Iw&dJG9M0k#cB7DBg&LNylup;+W17w7 zYUnUp-bW&;%xz3`nCbU1*NH=~H$ZrKAMw~&4J?d0@h~-$7*61|!G4byd0~$?4hgmH zQB*{ZJ&r@#GYX0e&NxuoQ-k_OOMqeI1sTuFR<+Ynjg1k7xX3JA=eU-a4;RsiR|en| zjBt{rLIQjONPI>V4PG!5;US)U@MUP4NYjE590}F|FJuJXkcjHUQDDz@-qLBK%?%^yBHWfrvLw{F<5&j5iiMGafTSmM07V%A9a$0(Y^Y-k zCQL1nsE$v0sF#Y0jxXnz`NRvffu3B3a zI3&ekcBEArl|?MtIH5|&GJ#}i7$huN0J>n(hhpiHEJ&J3I2`ud;$^)c?OB9#iDl?& z8^k;b71I1lvO=Y?i%K=yTW-`uo?M(jpOyag6Z8*vuXPE5^wV-|$}crwUy`*1KqSUwCO*+_8^CRsc1at!qStbo}=G|qMBNvqHOa2b3XoX?)z|5K`7`u^pG z%|HG*`-7*_>b@NZAAI-gIa1@`_C58>n8B52{yW)tgHX#$QxIVEqFn=V=6lk9G&+1!foEx{PFu1J&@_0-?R6*V}}-f z`qJ)s?6U2<>IUxo1$_5@_u(gYg?7_|M)ujdSmM?8#NZ!m&)=3i`_6@{8$Y{#c-=GM n&Y%0vF3z3!ZD?qA!_-w@9NAOkSD)&q=kK=V?Wse{o_zW*+qv)O literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/green.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/green.png new file mode 100644 index 0000000000000000000000000000000000000000..c964b9554ef51fe2e50b85ad5ac8969c3800552f GIT binary patch literal 3068 zcmcgudu-KI81Hx~TNZ{uP{Gi2#0ajpr|oTT+i-=sJJ?`%&g~M0G03^?=~i}cTiR~- z4w(TGS%%>?{}|{D31Y(h!@ys}h=IgF1Pq3tK^{t?iHSxfu*5)o%+veYCL3Gu(WI|) ze&_ps=R3deJEy0iepPAllf?uwMSS!Fqh6a#=(0pQ4x9AL#@Py`hu2ROh0fnhnC6%`Ov*bte!DD2JAbfqz}GUp5b zg{fB0vlWI(rBZIQp8x!ruI&H)>BG+nnR8-x8J(lN*xn3h04$UNnV|Zb(-D-K3+iHyy zghKbIPp9Q`ILEZ&I^bzd3yQQ1B#9OP3W<^+>LC?t^mu%g(5uw>7gB6GO&E3BEN~HJf>V`ur%I0#v`OB_@$LpuHMTe%774y5Vl)3{i-s}N)wzR}gUdYgXsTxFkq`9$>N<$T_i4&Xt1nmu9d zoyet^HxKmIaT~tfyJ`BpFD@CSyRNS%Qs$|LE6`Tx)(d$zdc?4x%u0HYklu8J)P)fPyR4F`TCh--|t+r@Uc(N z|2l6)S@F;B79E`(`Ln0u$lgWjkr{#Z3x_Y9ICkY5ff$(g^n7Aq=F$Dpr>wq1jWh2? ge;<0Kc>#E&>(zHI?dTc0>z~hStLq~lJil?rUxd2$)&Kwi literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/inactive.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..0e83290075022b88264f7065e87271d5f933ba32 GIT binary patch literal 324 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucLCF%=h?3y^w370~qEv>0#LT=By}Z;C1rt33 zJtM=93Yk-Zine&VIEGmGFP-Gb*P_7Vy0=9^sfl~fe_m_5Noo@wXc%`-KQ#T{v_~pR z^%q6mUvw#(NI##Wb6V+0?roJ8h2Q(8o6g!A_N;PW-#v*5bBgumJiobNUG~LZ!|NBN zncwean3~)(DM)L>F$RsG=O%1hDz7t!JJy>lxK${l%G7Dq9?llE_g$0e^(vDGi~Zs+ z+HOABFnvX_6!YAY^~|O}ZZYQjus*P|D(&t6e^9^VsNk+g9I+p5jcOSVH)O6gU+}jU P=za!IS3j3^P6Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^MlX|MGF00EgvL_t(IPotGo7VKJO_N@{-dXcY^h*735X0w(l(W=Cy>Jk`?$1$ICJ1Xqc8n6+^4v@bUWE)6%@WUiCsK6_ z1XX%MN#2BY2BJFs;SAluB%PrYt$`fAOrH8VRjMw5PQ_#;niCgK~D}%(x zed%tt!wWF0#sF^uAhK~S231*B!A4dDA`pNgK#_;44rCq1+1kYsYk_6!J;v6WE%KM- z@=@gLf>0`zVkIf&1vvp~nkE2I5JjFK_;ARLP?>kbHFXUJ4$Z*vBgb=Dsu5+qfhfrl zPpcsm{f1gMtkFaW6UxXJU<}ZZDnQF@;QWE0P%&dG0Cfd!0OSKyp=pwu7K+eRu*L(Jfk2mJT~w!mJN>>hm&?Yyn+{`J&SNIaV%YJ zov0_SB3fTb4%P5$ZrRIj0b<9dx&GmqRHCYzAJ{rg~mWouYd7yQFRda!TBjYFkQ9m{(FpdnWPHH(x)t ze;;UV{^`+8T)DZu_1x-{6Dy3p*0Gk058s_Coj?2grZ+a^r2e%p@6D_|^X7vWZyz4` zQy6*oeCPKcojv!(wfn~QfACaG)7bt?36{$r8UJCyxfkEx_{#D1j4^Wfz2d!BPK+lG zoL@ZJ^6QE5=F2~~E-;#}wOzV=>}lp|@~saK8M%YFzx&RG$DQFtuio>O*1CLj-5;BK znUT@9+s0RBwy(JS`fGokdVXx{FL!-+{r;WbuKrRS?J~Bsoc`>|k7PI|CTb#61>*|O`| FzX3&W(u)89 literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/lime.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/lime.png new file mode 100644 index 0000000000000000000000000000000000000000..1de4e53709ff880f0e318237c7df9b699869d778 GIT binary patch literal 3071 zcmcguYitx%6rMsrEL00f1BQgjfQBlw^W1rb6-&3!61J9hk(P+z&di;5WOrtmnRd68 z#A3lf;^PMz6-pE}G@1xC5fda>2$t}p1Pv;JL<3P1OoSMM4>aPPeYKUAHu#uiUiWJAq+bkxSRjt!cu6H6Y#7pE1ZAPIedr;`cGQ_>M4qgO%S!7xSO8Hm3jLR16>@y1vk zUTM1!7eX|t(KL&Ta)=RlUZ5A@EX~ps9i|wTWCVrg6-LB!7lEv~x}nrZm*s4szX;Ld z`;J0UsZ=VI;zG9DOfj-7Q#4DlEQt`L*KYYBOQJ{gO0Cki~7XsgQJtItz`V)YO3whJt01X5tL3u(HAn!@#y~8tr33bxkpB zHwnb(!NCPE-+xgLW(Jgzd&`9dVBI z2dk|h^~hBa)K`RHa)XUQswP^qgCa|#i(-OjPTn+zd{DgFG7-frfd~1bWb8Mf)`c7p z!eK6)8?Q6dFwqz_5o=!75n-sLX}BclWI=^0)uxAXu07Xl8sNsz4~c!lNiHFP_!=V;YhfYl7qCPWdpAB<$MIxWiv z$;v<@d6fsG#2G3IOVW4^aFQmVEWLRhMr;WGaWI-~wLy1CVmZJCXd{KL7axhDjg`D#?U{@&sX-1f0QgVL=FM z1_&}b&}RSBW*_8GhK3>Mru+~(j0K;CQy}^&oFk!y>efZ4#OJsC-iu*Hd`+|>EO6P7q3O#DUo|%EoYmWVReqmkK8?;h^7WR+wWTFx_kVKK zODf>xU{rEF4&lQ#Pznp5Gd&1v#=5VB;>)P6vHVM-H1@Guj ztc=h3@Ws=+&-`}RvR8W!o-Kc}r?_*@;-}U*y=}*j-F*j#^&Hpws_rXYIz76+yZr6) znXesV5AdKSzuMGcHWsXe_%J**xV^_i}OK zwh4RAw!CS?yRf3;{U7(7D%(?iaK)vL>%~7_{$TsV3*m_cTk(4;PR?#W_4(yp1C##P h`{xa6QOU292BS?pNO|8nw<_o-BwX3n|3goAQmmjI#BCIKB=NE(~43TkDj1NQ;$-sg*Y2`8c@<~ z>UYt~{?-nyzgv@aYRO`9QC7hU(#VHoHl4COB^#x3dKLT~3^Np&gZSN1sy;ACCgN>m zgY6*wY&mNm@p;_9fk|BK}b2Eu9a|3kDJOF*EI&EP#Rgjhp}7VnC5Wz9>2SD{4v2!l z3x)AEGmBD*n2A~Q@{Wk*lFpHmppyj^sx+A%&bhuquUU!K7QRv@nJY>KYWWbfAUlyx z6^6}G7IjNRjJBDZ{nXBy^mVspYDR z>9zF2{!}VR(znUs_A@4FI&#gj94NO^a)JCG?Twpp6YGZ87RyauBqlf@|tL3u(!rXg(<4m#8;2io+XHi+0C)~j>vNZFCKfa zp}uy@i6auXZ`a)SC&yameWp|{-f(x_+`4(+{@!wY)1+jCf^;J6>*~p9+=4^chPM?}tvteD!*=H_R81Fs# z!Qw~G`iCkG4EEL4_FW~ir+}qg`DWg#9}ZP*|Lz!Za&Z6riuQ++AO703W6r>~a~Fs^ zziO;A&OO@O*1zTL@Ap1?VCd^L)l1c_bs%$>eI*t8NxD4r6ojA7SikUfa^Q&zyMr@% N^Rm|1yAM3J@gG>0?wtSt literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/orange.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/orange.png new file mode 100644 index 0000000000000000000000000000000000000000..2006764d98c380a42af56e97880acf9097b1064c GIT binary patch literal 3026 zcmcImYitx%6rK`6grGz;D#dh|R)gZ~%$?`Xq+4jaEp5Vnd!{5 zyCrHC(r7d)iD+VoAS%HhA`ycT1Qi7Th>8!?`h!R$A(}`?K!0GOcxPX2rKJtZB=frG zyXW!UbI!d_cXq5=FmLfZf*=;Ox5c~gdtrFbor9k>m##qky2Wi<=M%*IMd4jVYV~Vtl7`0YRunD&r z^;vBjJ=DFiBdKrf*A;_W(LmPcRIDI_0!ZdEY1>zGF{+?f#oysDLy-kY&>y23LxW^b zqLXZPJVZ(nmeyI8BV{E5Btekahe(d)ScVlDz|lZbSwRIdS-L1}%`;53E8beNh5uqy zUl6z|!(_ABNS2Q{UWx&VqA)DSa2$;hv_EVIFh|>dZCOJc`MPJhf#uj_s1a(;U=X9Q zr^OI5Zbhx_muSL-F*)cmAi{R zDri4w8NwcwVw)80Cx>0cbRpjv^mNoRge}&V9rJ@OG)Bz~rek!>{*qp+(H%Q941fg<2UlQvjWrvWQOX^q!pT2p{1 zbC6R^Ae86F9eprNs&Ia>z6?jlIx4H7vLnlcq(qK=Rs_DVvpvwBEx)93--Hl>%tC5 zqR5M-@lGp;(mintv*s5ak;Y5bO_YS4EUZwq&GK>14VQXNHyS8?r7f~hlq%GVA?RUt zB7-UoTazsC%&07?&GsQo)-|%W2=g5?$U+Y_rZB_PRs}Pa^FAE9w(CF^01G5Un+h+{ zA`)1fo1#ohQAO8SoO&Apb{u(`MYvy5ZHua)TF%2@eRxHo*M5 zLlpnxMJ8LrwJB`8>SVoOra6drVimXcX_~zO6kXC}k%o$-(LfB#6N(BAd6VNsNfLDv zH~XSD&VOz8VGb2&73X-KG|?Y{_N4gZ(pj)?+H)c?JXVgy-gc7{{#2C;gtXY literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/pink.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/pink.png new file mode 100644 index 0000000000000000000000000000000000000000..9cb47fac06c1495dfab2de53c9f0aa235c47cecf GIT binary patch literal 2977 zcmcgudx#ZP7{5yqxvL^YDH%G9WSX5jXWkFI`PjR<3*L2Iuekn^?3tM}_fC87%s4Z< z_uhptDk!6{FrkN$mPGWhKYGvuaw~-pl1PjsdI(`5gpgs7f}L|;dpCF8#U8`G^Elt{ zeBbZ;&i8%i?CR@XKd1e+_Cz8vr>8sJPoDGW|Hd20eewCrh&*Nm-P@u>qT^=zZ%aJ4 zZ$To_zQfH9!~>ZPhUFKN$o5T~EEfZUP9#>YDhJ3K!ZBmwoa?37a~~aM8P`s+TjdPQ z1f4kVc8`X5^Js6@8XdB9n_YDev$AXu1w|Yqrd%v|kx@>uRlNpzr^6h}R3Y(Did{nu zG6R`Drqd5Gqa-1)AQTu?Px6W+De!JafCA*8%<%%?6$45JuQK(ECDuaQG5XW%>bA&N zip|GyU~pWiR7#e_q#x!uUe|RF3Y;JSf&fv)i%}VP(UOLSG>)v$4Pw{#7^)GO{&1XP z3DcSj#h|Iyi|Sz_0prRj;P@n@E>(fH)x-tEVWDc=wm4kCMeM~9!SYQkiBcxhgiorr zSZt!BxNC$ks{1x6I?7f8%=P2Q9}X?tH9{;dX%LIzemowU8B8be=Hwvn$9|OerwBq* zJRuaZ>r7#gN+v*Y*_{GPB~55xbcPtkewg+BLL+zj8r&FxPYTSkt*&SLrD!>IygmV^ zQH)b8O(Xy{Ai}I57?3w)egz~ium;VL)U;8ITERMie3plXNPgM`uy4CgWm>3h8IB(o z5m`95h;o<FNet{#Ie`z41zi`6&(TzNgA+J zNdlT+%YY{}BSJw`RY*$X%5|8uA^gYASiU!c!9Gzio+gjyTm{@x*K-|1Q; z*U`19ZoI~1yEVyZGgx?++%rsaub9U##WL|IW}%Rw}wsW$(g zHhY>w)iAW2n;JvpFh*aSr$F-2JV#=W)NM#kiCxbgdWoDczwSw|$!brW+>`3<AC%55+V?y=YwdySb}fCRd(R)YZ+z_C?tP1wEt>P~8^4}Be*E#`DQCmM zP2cTo3rZg@=Z@N6zC1R#aQ5ugZSOsGBKm4e;==wr4_tip_4J7H{et07{Wo)9?D|Xi znVa?uiJcEz{OpsTmX6KsFTHd0)T4L(d?J5g;X||Wy@PANS+Re2^xLL0#l-6KXLsj+ z8NKEA)TJYX9orWyy6^3?M^4-K-#UNkYaL(wu=iu3T>AW2W_`zxFPz?crt-mCPv2aw iR672=yc0=dZ7mNmS01B>=$@|L^r5wb5B>!msLDkE literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/purple.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/purple.png new file mode 100644 index 0000000000000000000000000000000000000000..9879fbabfbf8897d787f619c60ed17bd836de145 GIT binary patch literal 3070 zcmcImYitx%6rM_{r46CJ2ojCMGzh47=RLbKvO?PhTH`{~F47u}-nnz9ov^zzotbtQ zOiXBkr4b_rmDmzYKzWb8nRO%XxKUqWm678Q`FjZSqGx+*r#>eVWp$YuP5JSXv>H)+vGSGcN%b~ z)wt8etvfd-(9Z2hHJEh|(QC6BQINtuq_e4H+S9U8CZ|^;-@!1;&^d^|J<8Mt2I;nV zGu>djm{vj@KpZE~VKu}nlB94C&;loLEGM(P0C+{?B#jT#g^MB9T*K5_VjBy#$X}G{ z^nFKT*-R!A%7`J`?O=ITRas781pyEQ@OGqqm<4ICwx}V7J>*)BZ`o-&&h;2r+m)PN8wgr23w~O$G9%8Y!=$PlX;7MxcF`d9mlbuf6x4lk#77|M0 zX;k=@Ig7zSG7XBe)-2FKQi3{KgNvbWy9wJ)7IUY$=o>BYA%R}K%}N_~##<8vUYLMm z(8p0GNF=~TfXF2TLF0H$=I`go2bYJ&NopFapzk}8;=uP?(!L`P{gG!^oOu3`j4K`?>BO9p@jGJwfLte7&A1*jLb zZE-D9;xIW?Yv7eZG@3Y~h{(`^XoN9{7!nUuUJo9!p^6eOhIPW>q}>KPX}fXTAe@T~ z9jvxS)Du@>P+w7oFATN?shaH04~7MfTr3|v3-b0kx+LgiL4|6KmPc}KN1@lW;;zD1(xP)ksX>$v z0R`EK4W=+`&9K1pqcX2H(}@XL*T~vD%(G2D16^F#K^UI1D%jba_h8SpUFX9R&+!Td zrYb5x#u5i~Q4Rwoq9UCW1&sM{G4!il7d2ke1hH5{*W-GDR@4d89hhuFEOY(A7`$Xk ziYfw5i69Wck_aFtVZg~Mk_;INNSQI185_b44hGrj9_&s@EC;%fY^2!rqKxUM{~yaUxiMIq+{UZT)C=aDgJdVxNNb;?*&Doy6g?~hs46<(<)A#FtO6*Sf+#DB zj7%7mXQ0jgugyNlp&SiU&P~N3au^FfOQ%5cQ#wcDG^tycoD#o(r#4AZWnxpTE)jYD zgL9`IUQkyv^4rA4L$}0_o~o=LIa^;n#4Y(6{dv1Syr-&{MYT)Iz{2WLR-#u|9)E1* zfeRPzd~R&tPe=LQb7$VWVw&s5K3TTv@KDdh!kQ)be)#d1uUMZZ-`HDbJ_}zTK<4n@ zOGjTiGbpbqA71$A@gHAxS5m!J=7|NFK0C3$>iO@w{F{ejkKa8kv=01msq<8YHoAY% z9U8y5sd`t><+oP7{LCSX8sS3YPqv*OIP&7!y%oaZgI^4eed92DDy_@et-_hU)AyB^ zw;cmiP5-_(nVU@Kg!jV0*`MonkM!AHEhmrOwdJr`xo`07B9*DXa_p}qBmGAP63u)2 zKU%SV`H4F|yA(fI*}m+T^%bxE{<;2s`DoL`K-1IU!Tx6P{0cN~HB{~TYHVU+_t35_ YeYYO?cD(m=aMGumHf)Z)UH???KddeI&j0`b literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/red.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/red.png new file mode 100644 index 0000000000000000000000000000000000000000..f36528cabdb3ec1c94d10c6021afb645a1647091 GIT binary patch literal 3026 zcmcImduY{G7*9K=w!`66&~-3FWcbWYPI8mngkHPatM)Q)E$tQCJy=hYliSdHlbEFU z-pUZ!gV_y1Co&PYzcvTkaBd*Tgz1!tihpd#KsJQp{!}}eZfp*5=iFD@+1lb}Ag}ZN z&iDA8@B7Xf?(En&ud%6-qNsVv_Cyzc&nNfX+4#Bi);)+{4PJY1Kv7RDBzGNk@X!*9 zYTRb0d%~X7Ce3hj5oo$PiWGAmMpIOCOVNYI019axWo#$T{CeUfL)&JY*(#;@l-Gv( z?e^_H>fYXwHntBKs>!shrJIWyR**v>q>H(%6KKUaQ_`#9Z!*j=bO{m;#F7-z7j zS^x=O6HHL#A_YG_eKHWK(d8QL19f2~9RCF0%}j^CX1Y-Z>D{Ha6dyN{k)l0SXgdu&tRo&E3r1!up#`#{f$(T~1K zZ}}v(;QbX}pS!zwr*rq{F5~gxpPd~ys0DKxlGoQgzhLvVW5?=WzPdyHWz~f@_FtP- zSi5}T9s9!Hec!kD{r=SAZENb3E6bE%`95#>;s>wHZFc1w4S$T@zI40)$hR$LjnTuG zmNqo)q`z!>a`@t|i~Pt)$DUOO&J0nf&b;Pb9eY~3NrErV&dgqx-tBI8 zH@Qm%zo-vIS|vh}QlU@U7i%d(K~WJA6qHi5h**nnDhh=b^r1qWx!c<$Hfch&3p+bI z^PB(2Z~p)P%;BNEyVtGhTa(M>)|CfK!|c1BzpGcV_JM1&h<$p)!SOhkTf2e3J-Op2 z?#<=a9Pp}R$ynuS8wZU%B7sBmtwzYux!l%mtq|e;G!YzH^ZcTC<)cqU!6QX+RIh+a zI6x=7!GjSUIk>lq5AMen5w|@lY;D<0K!YYoXf^77Y`2PHTdvLed{`ERHYC|!6#KbC zVXQJF3SBLI zaUw}VTb7&6X1)pYK~$3!%d%vk%Bm_cgcMKv32I4xys;~xL}MIzVd4e8z$GFlm`sWy zv$W$vBh1A5aY_>-Om3l2R`P(m)CLlq;ljzN-d0YqOzX5k{Ul~sCBrh7DwPbrsMtm$ zL&wR^DP~dX+oI^WIvrAZn8v|mgz3&Hrg3A}us9i}bJVP0IfG}5!-*gX;)!4h60+$9 zR3x6eghD>E07_fl5>P&qK|^~Wq9_TXY7o@Bu`|@QO;DA*Dr_3{d=fO{$GGF^0$M@| zEs8vlBv6nbsH&h)SaqOgI;LZFr9BgQEX7fM zzEo}%VG>&;jB_Xoe79{To|%ex zeicO}9USAKTA%C;nkrzAtnfCSA75sEZhD{ZF^W}D;PGO&^^dU9#SAcX9qQ@$kk_L1 zv69DFi#vueGTSTKGvfnr zyfP{~Vw)3`k#&=(?ZD!|O`0g8{WZq$vRNT7WqgdLZf?3_Y6?&cD!CRkB%QL@bf9iZ zM!~`kfGVYm*>(L!)1j?swwmS8t(czDiYJg?qwElp#anlVx)_*x0ZJy(T&bWlXON4K z1T<2hE`0t&;rhuhgDPx&N0pR$A$ zl0cX%KTDEEXyna{f%#f86NLX!-?9<6vTAr^vfSoPlKBOpQwHRJSBTDksl((hzBlcI z*Iuj^tTYDMNo=#yzD%(v3M=xCsY}Q*97*93?I7Kf5Oh_j8-|Wu#3PzZ3;t`d=P}f# zVcxx|JH#$yyqnzu*-v(lq&~~rh}{zVo_*;GyJ3DU~fB)-_hwj0p?>{~lH_NLZytMhP`%c9B-X2}u^EtTm zD1h}JSIr3H4}W>)eC_>Q4pc@iSoi;VdGzE{+xPTde*S~T+VY)O-@D$s{p{C2pURy) v_0!{jTz{c&c-0$Q`u2T0JG=Jv9{JeS!$;nI^}C2)l*>E!mQL?@?v;N4se!&~ literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/yellow.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/cutouts/yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..dbdff29ec2a8e6114c7f69c6aa0b0f37565c59d2 GIT binary patch literal 3029 zcmcgudu$X%7(WmZDv(BFBq(uRVgzMwclLF+3nwW(pp9OseLzcqI6FJruH5ZzcelN3 zeMSih35rUhU{LfgjX`5b6EIaMA|Me(jA95636V!6Y9hw?U!A>ITWM*7k4^S9-*3Lh zZ@%xF*;rqKWH>sB<}xltMCnD4N2l-&vFCHv6)aK(w)vA!BS5P zA!OXLTH7zuL#%J31@W-?{8 zA1vvj9u;F75$!j1yM${XzSHSpvZRYzoKtel4;siIHRG60;pNG0yAwEmyE6(2W$`d7 z0?Qo5U?>>|B{^#pXecQ|U9H+9C~&+c$4QrRr@rJHBfzM@%w1{OhLiQ@g@G3*kR%F7 zf(;W1@NppWO@g5DP?O<3A7L z7tYF{Hp01fTi#kKrPbPgfNV@^lL?l(8nrA#(+yct3>5)GHe`Se$plE}1t5#i5QP{P zrI=ZopLB3%m{j5XLVXzyraH>2p~*-QWE3X=tI!0JEU5qqd<@8nf<+l4UBG%t+j7sM zC63ZVwT509RHI4aiiiyzh(?TnxFJEHLOp!QhAK)>jOmoaLA%vX+VN73K{*#$CR}Ze zs;91^u)Y#3EDpAWshaLA48{bWUK|XcMS1HO@wrL>Ve+9WDtwSy-W3jpfsv>n`@1M$%FIN?T06C^du&A>c4OiNO|! ztq~S@d{h?HX4?rR>pEFmfccIYWRXXz+9<G4hv-I1JU_vjo|9pa>!vN7uP(03 zHj4XGxgeRqVFugJsH7RhvxelrP%C8@n19jUm>D;|Zuq}15*Hp23T=SQH^24CzO7vJ$6tcJc@tl%Ja;cs_2#81Gk2VB1^pL(-z=Gt zu065xj+;(7=b!9|PW{GSwW4pq{@EY7+278*c;wHw&z_qzY3cJPUwiq9ZTt3~`TEM5 zT^j%H+WiL~7w>}yj`lN?4xf2=Yv0q8XS%14>Gp=z9gQEZCQS3ry%Ww}oqgPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00EjwL_t(IPnA>Gs=`nZJl|zEHWYioE}~*D zsQ6$7@j>7H;JKL*eFzb*!njFx&t!IXW5VGuEXzV55P;9;QzRmh2tuI{JRXnW^?LRE z9a$R;1|fp$^@{ubj@#{~_9*dL4ehABKO2!{KKI z&1UnZfOF-DepNsMPS9`^o6Sa}au$9=DwWdMKOS&Va=DzHb3fn&x3t}EzxIG0ESF1U zvspXme!vN~K+mLrJH1}7Q7Vmi`i>58Wkv?3h04WnJsV%yWLJ+Y`0rs zHk*lfJRWQB`9YD0_xu(!OiU&d#p!gaUGH|gDx_iTx!>=j*Xv<894f~pH0*;+ sG=zSTkZtjrZ>3CL6RdsL5SC@(55YB7Ik9^q4gdfE07*qoM6N<$f_Sj#zyJUM literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/left.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/left.png new file mode 100644 index 0000000000000000000000000000000000000000..55647d716058c35942ebfab1146ec417530174bf GIT binary patch literal 1453 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n9DLlB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxOgGuk&``nLQqR!T z!q~`EN5ROz&{W^RQs2-(*TB%q(7?*bKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv|9-O^tOeQ%y{DEmM*#b&U;;4N_AQ%`FU*4PfSA({JqLWa(()>||kL=xS)_ zYUXHW>S$qZ>EdGUX6$I}W(w2mnO9trn3tRivpW-LH&m}9UcFY%MX8A;`9&f5`8lvu z5Rj2yl3$#WU!dUZ432dLjquF8l>G8yO;9vJeC?82lv$RV;#QQOs{jsXt4u6zAkO~~ z{VC*zpFYr0`k=&ulz3o5z!V8$!m|R91J6vUdB7Z01k5Tm_6rpl7#Pobx;TbZ+_IT; zx9gCBK@0iEc-_n}S=9ZZo#WGilt{LQlbT^JoELfS6zx=L z^0qpmeA@J`SGK!UN<#CD^Dpbu-+tS6_$~iDIW==q zfmF)N+{PY?_GLZ_PT6$p60(_#~vF>GaMIc3Gc|r=-hGLaIW8B-WGGAZI0garbW*Y hnBOk@?m>J5Bg0I|Aawr4vAy%q`-SYZNNf?RuV;iPxh-Cdy& zv*DZ)jBEmnI;MQkp$lf4EX=qOwh_#9Aepj%2tl{uwhxRoiiY4M^9mIGKo;XAcklb& z{hsId{Qg~2VSd({)k&)%2wLOJrrgS!5V_Sc%Jbcpsx)PJR<@VQMS@SRr9}W`FoFlb zPL8ewZa_12yDtF?1gUD+;!?TPl}CC7PDe*oJ@_F*Ax|S_~&~jMQWB(uFAA zM8-$DDaVp8O$4+oh{b~7k9I*}l^_dJl@Ne!wuP$0$t5h$2({9d zNSPL+rhv%S0LCE-9K4Wcl3hW=e~W(+&-~x~p^7Lp(k%aKp6Dy3BO}}8QBV%c!vuI` zf<$Fhv?+B*A!yZiPAa1~G-hcXI)P^-zIn|)bvIjn)P!LPac_0>?+Rs}qZQNf+eQ;ruq z-x~tk6EhO1?Xf-M)B83*kV(Js$ndMD5mjC9M9wHR`_LM1OE}=}m`p6Yd*;C%aqc%u z4;-F-Xt{hV*MDJyrt#3*lV3fJb8Vq z65rbk4(E-esD@j(i|>qTrt14z?VoS3SZCEoN#|II(@`>)>AG^&2M*YeDjg4RvfRnGDb e|JD!A$HYU0v@h}HINhbl|I=yDr%q&6?E4%1zYh}t literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/top.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/autocrafting_monitor/top.png new file mode 100644 index 0000000000000000000000000000000000000000..61ab1c376270f24b9aa5d239389c8e87f37ab58e GIT binary patch literal 1419 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n9DLlB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxOgGuk&``nLQqR!T z!q~`EN5ROz&{W^RQs2-(*TB%q(7?*bKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD#PU%0_}#n6BP2AO_EVu8M)o`HUDF34YC)x{-2sR(CaRb3oXS&*t9 zlv|9-O^tOeQ%y{DEmM*#b&U;;4N_AQ%`FU*4PfSA({E^MU~FLIVq{@r=w@i> zYGz?!;^gXN?C4@-WZ~>$>G8yO;9vJeC?82lv$RV;#QQOs{jsXt4u6zAkO~~ z{VC*zpFYr0`k=&ulz3o5z!V8$!m|R91J6vUdB7Z01k5U_9UwwPq@xmkXeAG%~cdt7gs_A;dP@XM(>&+aG+*xT>bNQYrJMb!=|GY!!?XGj* z|GxhEYD@0#pEYso!zZacX_PwtvBu8-@{}G0jGPidPz(?Gygh2I2W$W2Y!TPc z(2L9w6&B^YW#uYF_8))D$X0p8qiJ&RIukc0vmHiDtYr9p|CNhdroz+d)8;4{o4Ege zzJTPj8oO-P4e!4HPTI&IWFy7U$>w4;@pakmwb!#-E?zk@?etUo9!8a^3=?TX>Ik^~9h_H=5t@HEY*B5nAq$5vt;RZArK_&y7Vw z2N)cgY*H;gYTVq(vp}A8jtxsNkHpGtpQGPp*r_rbDCu%dJ<1Qm~-u6{1-oD!M literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/data/refinedstorage/advancement/monitoring.json b/refinedstorage-common/src/main/resources/data/refinedstorage/advancement/monitoring.json new file mode 100644 index 000000000..910451e4c --- /dev/null +++ b/refinedstorage-common/src/main/resources/data/refinedstorage/advancement/monitoring.json @@ -0,0 +1,26 @@ +{ + "display": { + "icon": { + "id": "refinedstorage:autocrafting_monitor" + }, + "title": { + "translate": "advancements.refinedstorage.monitoring" + }, + "description": { + "translate": "advancements.refinedstorage.monitoring.description" + } + }, + "parent": "refinedstorage:autocrafting", + "criteria": { + "autocrafting_monitor_in_inventory": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": "#refinedstorage:autocrafting_monitors" + } + ] + } + } + } +} \ No newline at end of file diff --git a/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/autocrafting_monitor.json b/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/autocrafting_monitor.json new file mode 100644 index 000000000..ccedb5d34 --- /dev/null +++ b/refinedstorage-common/src/main/resources/data/refinedstorage/recipe/autocrafting_monitor.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "PAG", + "EMG", + "PAG" + ], + "key": { + "P": { + "item": "refinedstorage:improved_processor" + }, + "A": { + "item": "refinedstorage:pattern" + }, + "G": { + "tag": "c:glass_blocks" + }, + "E": { + "item": "refinedstorage:quartz_enriched_iron" + }, + "M": { + "item": "refinedstorage:machine_casing" + } + }, + "result": { + "id": "refinedstorage:autocrafting_monitor" + } +} \ No newline at end of file diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java index 0ca4674bd..10d49971e 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java @@ -130,6 +130,7 @@ private void setRenderLayers() { setCutout(Blocks.INSTANCE.getDiskInterface()); setCutout(Blocks.INSTANCE.getAutocrafter()); setCutout(Blocks.INSTANCE.getAutocrafterManager()); + setCutout(Blocks.INSTANCE.getAutocraftingMonitor()); } private void setCutout(final BlockColorMap blockMap) { @@ -160,6 +161,7 @@ private void registerEmissiveModels() { Blocks.INSTANCE.getRelay().forEach((color, id, block) -> registerEmissiveRelayModels(color, id)); Blocks.INSTANCE.getAutocrafter().forEach((color, id, block) -> registerEmissiveAutocrafterModels(color, id)); registerColoredEmissiveModels(Blocks.INSTANCE.getAutocrafterManager(), "autocrafter_manager"); + registerColoredEmissiveModels(Blocks.INSTANCE.getAutocraftingMonitor(), "autocrafting_monitor"); } private void registerColoredEmissiveModels(final BlockColorMap blockMap, diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java index 37078f05d..1f5b809c7 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java @@ -127,6 +127,11 @@ public class ConfigImpl implements ConfigData, com.refinedmods.refinedstorage.co @ConfigEntry.Gui.CollapsibleObject private AutocrafterManagerEntryImpl autocrafterManager = new AutocrafterManagerEntryImpl(); + @ConfigEntry.Gui.CollapsibleObject + private SimpleEnergyUsageEntryImpl autocraftingMonitor = new SimpleEnergyUsageEntryImpl( + DefaultEnergyUsage.AUTOCRAFTING_MONITOR + ); + public static ConfigImpl get() { return AutoConfig.getConfigHolder(ConfigImpl.class).getConfig(); } @@ -297,6 +302,11 @@ public AutocrafterManagerEntry getAutocrafterManager() { return autocrafterManager; } + @Override + public SimpleEnergyUsageEntry getAutocraftingMonitor() { + return autocraftingMonitor; + } + private static class GridEntryImpl implements GridEntry { private boolean largeFont = false; diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java index 743cca012..f04a78317 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java @@ -698,6 +698,7 @@ private void registerCapabilities() { registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getWirelessTransmitter()); registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getAutocrafter()); registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getAutocrafterManager()); + registerNetworkNodeContainerProvider(BlockEntities.INSTANCE.getAutocraftingMonitor()); registerItemStorage( AbstractDiskDriveBlockEntity.class::isInstance, AbstractDiskDriveBlockEntity.class::cast, diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java index fb5553942..e0a678423 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java @@ -56,6 +56,7 @@ public class ConfigImpl implements Config { private final RelayEntry relay; private final AutocrafterEntryImpl autocrafter; private final AutocrafterManagerEntryImpl autocrafterManager; + private final SimpleEnergyUsageEntry autocraftingMonitor; public ConfigImpl() { screenSize = builder @@ -102,6 +103,10 @@ public ConfigImpl() { relay = new RelayEntryImpl(); autocrafter = new AutocrafterEntryImpl(); autocrafterManager = new AutocrafterManagerEntryImpl(); + autocraftingMonitor = new SimpleEnergyUsageEntryImpl( + "autocraftingMonitor", + DefaultEnergyUsage.AUTOCRAFTING_MONITOR + ); spec = builder.build(); } @@ -277,6 +282,11 @@ public AutocrafterManagerEntry getAutocrafterManager() { return autocrafterManager; } + @Override + public SimpleEnergyUsageEntry getAutocraftingMonitor() { + return autocraftingMonitor; + } + private static String translationKey(final String value) { return createTranslationKey("text.autoconfig", "option." + value); } diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java index 63a292e96..e2f7d174e 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java @@ -432,6 +432,7 @@ private void registerCapabilities(final RegisterCapabilitiesEvent event) { registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getWirelessTransmitter()); registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getAutocrafter()); registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getAutocrafterManager()); + registerNetworkNodeContainerProvider(event, BlockEntities.INSTANCE.getAutocraftingMonitor()); event.registerBlockEntity( Capabilities.ItemHandler.BLOCK, BlockEntities.INSTANCE.getDiskDrive(), diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockModelProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockModelProviderImpl.java index b74b9ce02..919434c19 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockModelProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockModelProviderImpl.java @@ -48,10 +48,11 @@ public BlockModelProviderImpl(final PackOutput output, final ExistingFileHelper protected void registerModels() { registerCables(); registerControllers(); - registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getGrid(), "grid", ""); - registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getCraftingGrid(), "crafting_grid", ""); - registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getPatternGrid(), "pattern_grid", ""); - registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getAutocrafterManager(), "autocrafter_manager", ""); + registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getGrid(), "grid"); + registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getCraftingGrid(), "crafting_grid"); + registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getPatternGrid(), "pattern_grid"); + registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getAutocrafterManager(), "autocrafter_manager"); + registerRightLeftBackFrontTopModel(Blocks.INSTANCE.getAutocraftingMonitor(), "autocrafting_monitor"); registerDetectors(); registerWirelessTransmitters(); registerNetworkReceivers(); @@ -96,6 +97,10 @@ private void registerControllers() { }); } + private void registerRightLeftBackFrontTopModel(final BlockColorMap blockMap, final String name) { + registerRightLeftBackFrontTopModel(blockMap, name, ""); + } + private void registerRightLeftBackFrontTopModel(final BlockColorMap blockMap, final String name, final String modelPrefix) { diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java index 775770ecf..61468a71d 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java @@ -60,6 +60,7 @@ protected void registerStatesAndModels() { registerDiskInterfaces(); registerAutocrafters(); registerAutocrafterManagers(); + registerAutocraftingMonitors(); } private void registerCables() { @@ -334,6 +335,14 @@ private void registerAutocrafterManagers() { )); } + private void registerAutocraftingMonitors() { + Blocks.INSTANCE.getAutocraftingMonitor().forEach((color, id, block) -> configureActiveColoredDirectionalBlock( + color, + block, + "autocrafting_monitor" + )); + } + private void configureActiveColoredDirectionalBlock(final DyeColor color, final Supplier block, final String name) { diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/ItemModelProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/ItemModelProviderImpl.java index e7c226bb3..107c0cdc5 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/ItemModelProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/ItemModelProviderImpl.java @@ -53,6 +53,7 @@ protected void registerModels() { registerDiskInterfaces(); registerAutocrafters(); registerAutocrafterManagers(); + registerAutocraftingMonitors(); } private void registerCables() { @@ -236,6 +237,14 @@ private void registerAutocrafterManagers() { )); } + private void registerAutocraftingMonitors() { + final var blocks = Blocks.INSTANCE.getAutocraftingMonitor(); + blocks.forEach((color, id, block) -> withExistingParent( + id.getPath(), + createIdentifier("block/autocrafting_monitor/" + color.getName()) + )); + } + private ModelFile modelFile(final ResourceLocation location) { return new ModelFile.ExistingModelFile(location, existingFileHelper); } diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/loot/BlockDropProvider.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/loot/BlockDropProvider.java index 6a71a8e05..385bed0c8 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/loot/BlockDropProvider.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/loot/BlockDropProvider.java @@ -43,6 +43,7 @@ protected void generate() { Blocks.INSTANCE.getDiskInterface().forEach((color, id, block) -> drop(block.get())); Blocks.INSTANCE.getAutocrafter().forEach((color, id, block) -> drop(block.get())); Blocks.INSTANCE.getAutocrafterManager().forEach((color, id, block) -> drop(block.get())); + Blocks.INSTANCE.getAutocraftingMonitor().forEach((color, id, block) -> drop(block.get())); } private void drop(final Block block) { @@ -75,6 +76,7 @@ protected Iterable getKnownBlocks() { blocks.addAll(Blocks.INSTANCE.getDiskInterface().values()); blocks.addAll(Blocks.INSTANCE.getAutocrafter().values()); blocks.addAll(Blocks.INSTANCE.getAutocrafterManager().values()); + blocks.addAll(Blocks.INSTANCE.getAutocraftingMonitor().values()); return blocks; } } diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/recipe/RecoloringRecipeProvider.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/recipe/RecoloringRecipeProvider.java index db6656d9b..0979c88a9 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/recipe/RecoloringRecipeProvider.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/recipe/RecoloringRecipeProvider.java @@ -83,6 +83,9 @@ protected void buildRecipes(final RecipeOutput output) { Blocks.INSTANCE.getAutocrafterManager().forEach((color, id, block) -> recipe(Tags.AUTOCRAFTER_MANAGERS, block.get().asItem(), color) .save(output, recipeId(color, "autocrafter_manager"))); + Blocks.INSTANCE.getAutocraftingMonitor().forEach((color, id, block) -> + recipe(Tags.AUTOCRAFTING_MONITORS, block.get().asItem(), color) + .save(output, recipeId(color, "autocrafting_monitor"))); } private ResourceLocation recipeId(final DyeColor color, final String suffix) { diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/tag/ItemTagsProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/tag/ItemTagsProviderImpl.java index 12e81288b..3cc8b0dcf 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/tag/ItemTagsProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/tag/ItemTagsProviderImpl.java @@ -22,6 +22,7 @@ import static com.refinedmods.refinedstorage.common.content.Tags.AUTOCRAFTERS; import static com.refinedmods.refinedstorage.common.content.Tags.AUTOCRAFTER_MANAGERS; +import static com.refinedmods.refinedstorage.common.content.Tags.AUTOCRAFTING_MONITORS; import static com.refinedmods.refinedstorage.common.content.Tags.CABLES; import static com.refinedmods.refinedstorage.common.content.Tags.CONSTRUCTORS; import static com.refinedmods.refinedstorage.common.content.Tags.CONTROLLERS; @@ -140,6 +141,10 @@ protected void addTags(final HolderLookup.Provider provider) { Blocks.INSTANCE.getAutocrafterManager().values().stream() .map(block -> (Supplier) block::asItem) .toList()); + addAllToTag(AUTOCRAFTING_MONITORS, + Blocks.INSTANCE.getAutocraftingMonitor().values().stream() + .map(block -> (Supplier) block::asItem) + .toList()); } private void addAllToTag(final TagKey t, final Collection> items) { From 91cb4e859d1f71d91fd5c268a77a33ce58495ae3 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 12 Nov 2024 18:36:18 +0100 Subject: [PATCH 19/30] feat: introduce autocrafting status --- .../api/autocrafting/AutocraftingPreview.java | 6 ---- .../autocrafting/AutocraftingPreviewType.java | 7 ----- .../preview/AutocraftingPreview.java | 9 ++++++ .../AutocraftingPreviewItem.java | 5 +++- .../AutocraftingPreviewProvider.java | 5 +++- .../preview/AutocraftingPreviewType.java | 10 +++++++ .../autocrafting/preview/package-info.java | 7 +++++ .../status/AutocraftingStatus.java | 29 +++++++++++++++++++ .../api/autocrafting/status/package-info.java | 7 +++++ .../refinedstorage/common/api/grid/Grid.java | 2 +- .../AutocraftingPreviewContainerMenu.java | 2 +- .../preview/AutocraftingPreviewListener.java | 2 +- .../preview/AutocraftingPreviewScreen.java | 6 ++-- .../preview/AutocraftingRequest.java | 2 +- .../common/grid/AbstractGridBlockEntity.java | 2 +- .../grid/AbstractGridContainerMenu.java | 4 +-- .../common/grid/WirelessGrid.java | 2 +- .../storage/portablegrid/PortableGrid.java | 2 +- ...tocraftingStorageMonitorContainerMenu.java | 4 +-- .../StorageMonitorBlockEntity.java | 4 +-- .../c2s/AutocraftingPreviewRequestPacket.java | 2 +- .../packet/c2s/AutocraftingRequestPacket.java | 2 +- .../AutocraftingPreviewResponsePacket.java | 6 ++-- .../common/support/packet/s2c/S2CPackets.java | 2 +- .../common/util/ClientPlatformUtil.java | 2 +- .../AutocraftingNetworkComponent.java | 2 +- .../AutocraftingNetworkComponentImpl.java | 6 ++-- 27 files changed, 97 insertions(+), 42 deletions(-) delete mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreview.java delete mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewType.java create mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreview.java rename refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/{ => preview}/AutocraftingPreviewItem.java (51%) rename refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/{ => preview}/AutocraftingPreviewProvider.java (63%) create mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewType.java create mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/package-info.java create mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingStatus.java create mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.java diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreview.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreview.java deleted file mode 100644 index e11e56a4f..000000000 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreview.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.refinedmods.refinedstorage.api.autocrafting; - -import java.util.List; - -public record AutocraftingPreview(AutocraftingPreviewType type, List items) { -} diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewType.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewType.java deleted file mode 100644 index 3d1832829..000000000 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewType.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.refinedmods.refinedstorage.api.autocrafting; - -public enum AutocraftingPreviewType { - SUCCESS, - MISSING_RESOURCES -} - diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreview.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreview.java new file mode 100644 index 000000000..ad5576ef7 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreview.java @@ -0,0 +1,9 @@ +package com.refinedmods.refinedstorage.api.autocrafting.preview; + +import java.util.List; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") +public record AutocraftingPreview(AutocraftingPreviewType type, List items) { +} diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewItem.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewItem.java similarity index 51% rename from refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewItem.java rename to refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewItem.java index 82919b373..f1c71ada5 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewItem.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewItem.java @@ -1,6 +1,9 @@ -package com.refinedmods.refinedstorage.api.autocrafting; +package com.refinedmods.refinedstorage.api.autocrafting.preview; import com.refinedmods.refinedstorage.api.resource.ResourceKey; +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") public record AutocraftingPreviewItem(ResourceKey resource, long available, long missing, long toCraft) { } diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewProvider.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewProvider.java similarity index 63% rename from refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewProvider.java rename to refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewProvider.java index 29c7210b2..7cb97463c 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewProvider.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewProvider.java @@ -1,9 +1,12 @@ -package com.refinedmods.refinedstorage.api.autocrafting; +package com.refinedmods.refinedstorage.api.autocrafting.preview; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import java.util.Optional; +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") public interface AutocraftingPreviewProvider { Optional getPreview(ResourceKey resource, long amount); diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewType.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewType.java new file mode 100644 index 000000000..47af2f527 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewType.java @@ -0,0 +1,10 @@ +package com.refinedmods.refinedstorage.api.autocrafting.preview; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") +public enum AutocraftingPreviewType { + SUCCESS, + MISSING_RESOURCES +} + diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/package-info.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/package-info.java new file mode 100644 index 000000000..bf08171a5 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage.api.autocrafting.preview; + +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingStatus.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingStatus.java new file mode 100644 index 000000000..5a01aee57 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingStatus.java @@ -0,0 +1,29 @@ +package com.refinedmods.refinedstorage.api.autocrafting.status; + +import com.refinedmods.refinedstorage.api.resource.ResourceKey; + +import java.util.List; +import java.util.UUID; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") +public record AutocraftingStatus(UUID id, List elements) { + public record Element( + ElementType type, + ResourceKey resource, + long stored, + long missing, + long processing, + long scheduled, + long crafting + ) { + } + + public enum ElementType { + NORMAL, + MACHINE_DOES_NOT_ACCEPT, + MACHINE_NONE, + LOCKED + } +} diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.java new file mode 100644 index 000000000..d15a12e18 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage.api.autocrafting.status; + +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/grid/Grid.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/grid/Grid.java index 6c999dd42..1e6a710e7 100644 --- a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/grid/Grid.java +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/grid/Grid.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.api.grid; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage.api.grid.watcher.GridWatcher; import com.refinedmods.refinedstorage.api.storage.Actor; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewContainerMenu.java index 3534d49e5..761ef1ae1 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewContainerMenu.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.autocrafting.preview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage.common.support.containermenu.AbstractResourceContainerMenu; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java index 5b38d81e8..1d3fb99f7 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.autocrafting.preview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; import javax.annotation.Nullable; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewScreen.java index 2aec4e0de..de474f0b6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewScreen.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.common.autocrafting.preview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewItem; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewType; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewItem; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewType; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage.common.support.amount.AbstractAmountScreen; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java index d761a33bd..14c0db7d6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.autocrafting.preview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java index ded8da906..534a09739 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.grid; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage.api.grid.watcher.GridWatcher; import com.refinedmods.refinedstorage.api.network.Network; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java index 10932544a..63b35dcf8 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.grid; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; import com.refinedmods.refinedstorage.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepository; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepositoryImpl; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java index aea58f720..37389c5a3 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.grid; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage.api.grid.operations.NoopGridOperations; import com.refinedmods.refinedstorage.api.grid.watcher.GridWatcher; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/portablegrid/PortableGrid.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/portablegrid/PortableGrid.java index d636764ab..b9757d581 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/portablegrid/PortableGrid.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/portablegrid/PortableGrid.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.storage.portablegrid; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; import com.refinedmods.refinedstorage.api.core.Action; import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage.api.grid.operations.NoopGridOperations; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/AutocraftingStorageMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/AutocraftingStorageMonitorContainerMenu.java index 156f18540..976400998 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/AutocraftingStorageMonitorContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/AutocraftingStorageMonitorContainerMenu.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.storagemonitor; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/StorageMonitorBlockEntity.java index 6018c945b..a13e72655 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/StorageMonitorBlockEntity.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.storagemonitor; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; import com.refinedmods.refinedstorage.api.network.Network; import com.refinedmods.refinedstorage.api.network.autocrafting.AutocraftingNetworkComponent; import com.refinedmods.refinedstorage.api.network.impl.node.SimpleNetworkNode; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingPreviewRequestPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingPreviewRequestPacket.java index c7e7fb8d3..b08a6c3b6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingPreviewRequestPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingPreviewRequestPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; import com.refinedmods.refinedstorage.common.support.packet.s2c.S2CPackets; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingRequestPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingRequestPacket.java index f4fc8c825..095a430ae 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingRequestPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingRequestPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; import com.refinedmods.refinedstorage.common.support.packet.s2c.S2CPackets; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingPreviewResponsePacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingPreviewResponsePacket.java index 94114242c..f61c4df2d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingPreviewResponsePacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingPreviewResponsePacket.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.common.support.packet.s2c; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewItem; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewType; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewItem; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewType; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.common.support.resource.ResourceCodecs; import com.refinedmods.refinedstorage.common.util.ClientPlatformUtil; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java index fbc8778cf..d25475029 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.s2c; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage.common.Platform; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/ClientPlatformUtil.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/ClientPlatformUtil.java index 25b475b21..879bae875 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/ClientPlatformUtil.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/ClientPlatformUtil.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.util; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.common.autocrafting.preview.AutocraftingPreviewScreen; import com.refinedmods.refinedstorage.common.autocrafting.preview.AutocraftingRequest; diff --git a/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java b/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java index 9cd137fc8..3d90a97da 100644 --- a/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java +++ b/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.api.network.autocrafting; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; import com.refinedmods.refinedstorage.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.api.network.NetworkComponent; import com.refinedmods.refinedstorage.api.resource.ResourceKey; diff --git a/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java b/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java index 399e3ed9b..08017d748 100644 --- a/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java +++ b/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.api.network.impl.autocrafting; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewItem; -import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewType; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewItem; +import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewType; import com.refinedmods.refinedstorage.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepositoryImpl; import com.refinedmods.refinedstorage.api.network.autocrafting.AutocraftingNetworkComponent; From c59a526cbe02c4752f6adeeb8f8ae3cdf6985021 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Wed, 13 Nov 2024 20:38:15 +0100 Subject: [PATCH 20/30] feat: autocrafting monitor screen --- CHANGELOG.md | 4 + ...tatus.java => AutocraftingTaskStatus.java} | 11 +- .../common/AbstractClientModInitializer.java | 2 + .../common/AbstractModInitializer.java | 9 + .../AutocraftingMonitorBlockEntity.java | 316 +++++++++++- .../AutocraftingMonitorContainerMenu.java | 76 +++ .../monitor/AutocraftingMonitorData.java | 69 +++ .../monitor/AutocraftingMonitorListener.java | 12 + .../monitor/AutocraftingMonitorScreen.java | 464 ++++++++++++++++++ .../monitor/AutocraftingTaskButton.java | 102 ++++ .../refinedstorage/common/content/Menus.java | 11 + .../common/support/AbstractBaseBlock.java | 1 + .../common/support/Sprites.java | 2 + .../support/amount/AbstractAmountScreen.java | 2 +- .../common/support/amount/ConfirmButton.java | 10 +- .../common/support/tooltip/SmallText.java | 14 + .../assets/refinedstorage/lang/en_us.json | 11 + .../textures/gui/autocrafting_monitor.png | Bin 0 -> 605 bytes .../gui/sprites/autocrafting_monitor/row.png | Bin 0 -> 171 bytes .../sprites/autocrafting_monitor/tasks.png | Bin 0 -> 340 bytes 20 files changed, 1103 insertions(+), 13 deletions(-) rename refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/{AutocraftingStatus.java => AutocraftingTaskStatus.java} (67%) create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorListener.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingTaskButton.java create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/autocrafting_monitor.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/autocrafting_monitor/row.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/autocrafting_monitor/tasks.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 2039a46a6..4cafaeabd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Autocrafting Monitor +### Changed + +- The Autocrafting Monitor now has a sidebar with all tasks instead of using tabs. + ## [2.0.0-milestone.4.9] - 2024-11-01 ### Added diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingStatus.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingTaskStatus.java similarity index 67% rename from refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingStatus.java rename to refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingTaskStatus.java index 5a01aee57..540094c4c 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingStatus.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingTaskStatus.java @@ -8,7 +8,10 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") -public record AutocraftingStatus(UUID id, List elements) { +public record AutocraftingTaskStatus(Id id, List elements) { + public record Id(UUID id, ResourceKey resource, long amount, long startTime) { + } + public record Element( ElementType type, ResourceKey resource, @@ -22,8 +25,8 @@ public record Element( public enum ElementType { NORMAL, - MACHINE_DOES_NOT_ACCEPT, - MACHINE_NONE, - LOCKED + MACHINE_DOES_NOT_ACCEPT_RESOURCE, + NO_MACHINE_FOUND, + AUTOCRAFTER_IS_LOCKED } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java index 58ee5dd10..7e4c75034 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage.common.api.upgrade.UpgradeMapping; import com.refinedmods.refinedstorage.common.autocrafting.autocrafter.AutocrafterScreen; import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerScreen; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorScreen; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridScreen; import com.refinedmods.refinedstorage.common.autocrafting.preview.AutocraftingPreviewContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.preview.AutocraftingPreviewScreen; @@ -106,6 +107,7 @@ public AutocraftingPreviewScreen create(final AutocraftingPreviewContainerMenu m } }); registration.register(Menus.INSTANCE.getAutocrafterManager(), AutocrafterManagerScreen::new); + registration.register(Menus.INSTANCE.getAutocraftingMonitor(), AutocraftingMonitorScreen::new); } protected static void registerAlternativeGridHints() { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java index 6361de17b..20bcd3e82 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java @@ -26,6 +26,8 @@ import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerData; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorBlockEntity; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorData; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridData; @@ -816,6 +818,13 @@ protected final void registerMenus(final RegistryCallback> callback, AutocrafterManagerData.STREAM_CODEC ) )); + Menus.INSTANCE.setAutocraftingMonitor(callback.register( + ContentIds.AUTOCRAFTING_MONITOR, + () -> extendedMenuTypeFactory.create( + (syncId, player, data) -> new AutocraftingMonitorContainerMenu(syncId, data), + AutocraftingMonitorData.STREAM_CODEC + ) + )); } protected final void registerLootFunctions(final RegistryCallback> callback) { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java index d06b65362..815c36c32 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java @@ -1,17 +1,34 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; +import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; import com.refinedmods.refinedstorage.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage.common.Platform; import com.refinedmods.refinedstorage.common.content.BlockEntities; import com.refinedmods.refinedstorage.common.content.ContentNames; import com.refinedmods.refinedstorage.common.support.AbstractDirectionalBlock; +import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; import com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage.common.support.resource.FluidResource; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; + +import java.util.List; +import java.util.UUID; import net.minecraft.core.BlockPos; +import net.minecraft.core.component.DataComponentPatch; +import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamEncoder; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluids; -public class AutocraftingMonitorBlockEntity extends AbstractBaseNetworkNodeContainerBlockEntity { +public class AutocraftingMonitorBlockEntity extends AbstractBaseNetworkNodeContainerBlockEntity + implements NetworkNodeExtendedMenuProvider { public AutocraftingMonitorBlockEntity(final BlockPos pos, final BlockState state) { super(BlockEntities.INSTANCE.getAutocraftingMonitor(), pos, state, new SimpleNetworkNode( Platform.INSTANCE.getConfig().getAutocraftingMonitor().getEnergyUsage() @@ -28,4 +45,301 @@ protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState final BlockState newBlockState) { return AbstractDirectionalBlock.didDirectionChange(oldBlockState, newBlockState); } + + @Override + public AutocraftingMonitorData getMenuData() { + return new AutocraftingMonitorData(List.of( + new AutocraftingTaskStatus( + new AutocraftingTaskStatus.Id( + UUID.randomUUID(), + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 64, + System.currentTimeMillis() + ), + List.of( + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 1, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 1, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 1, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 1 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 1, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 1, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 1, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 1 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 5448748, + 1, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 1, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 1, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 1 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 10000, + 0, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 1, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 1, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 1 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 5448748, + 1, + 0, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 1, + 0, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 1, + 0 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 1, + 0, + 0, + 0, + 1 + ), + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, + ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), + 10000, + 0, + 0, + 0, + 0 + ) + ) + ), + new AutocraftingTaskStatus( + new AutocraftingTaskStatus.Id( + UUID.randomUUID(), + new FluidResource(Fluids.WATER, DataComponentPatch.EMPTY), + Platform.INSTANCE.getBucketAmount() * 2, + System.currentTimeMillis() - 3000 + ), + List.of( + new AutocraftingTaskStatus.Element( + AutocraftingTaskStatus.ElementType.NORMAL, + ItemResource.ofItemStack(new ItemStack(Items.DIRT)), + 6, + 7, + 8, + 9, + 10 + ) + ) + ) + )); + } + + @Override + public StreamEncoder getMenuCodec() { + return AutocraftingMonitorData.STREAM_CODEC; + } + + @Override + public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { + return new AutocraftingMonitorContainerMenu(syncId, this); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java new file mode 100644 index 000000000..287f74a17 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java @@ -0,0 +1,76 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; +import com.refinedmods.refinedstorage.common.content.Menus; +import com.refinedmods.refinedstorage.common.support.AbstractBaseContainerMenu; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +public class AutocraftingMonitorContainerMenu extends AbstractBaseContainerMenu { + private final Map> elementsByTaskId; + private final List tasks; + private final List tasksView; + + @Nullable + private AutocraftingMonitorListener listener; + + @Nullable + private AutocraftingTaskStatus.Id currentTaskId; + + public AutocraftingMonitorContainerMenu(final int syncId, final AutocraftingMonitorData data) { + super(Menus.INSTANCE.getAutocraftingMonitor(), syncId); + this.elementsByTaskId = data.statuses().stream().collect(Collectors.toMap( + AutocraftingTaskStatus::id, + AutocraftingTaskStatus::elements + )); + this.tasks = data.statuses().stream().map(AutocraftingTaskStatus::id).collect(Collectors.toList()); + this.tasksView = Collections.unmodifiableList(tasks); + this.currentTaskId = data.statuses().isEmpty() ? null : data.statuses().getFirst().id(); + } + + AutocraftingMonitorContainerMenu(final int syncId, final AutocraftingMonitorBlockEntity autocraftingMonitor) { + super(Menus.INSTANCE.getAutocraftingMonitor(), syncId); + this.elementsByTaskId = Collections.emptyMap(); + this.tasks = Collections.emptyList(); + this.tasksView = Collections.emptyList(); + this.currentTaskId = null; + } + + void setListener(@Nullable final AutocraftingMonitorListener listener) { + this.listener = listener; + } + + List getCurrentElements() { + return elementsByTaskId.getOrDefault(currentTaskId, Collections.emptyList()); + } + + List getTasks() { + return tasksView; + } + + void setCurrentTaskId(@Nullable final AutocraftingTaskStatus.Id taskId) { + this.currentTaskId = taskId; + loadCurrentTask(); + } + + void loadCurrentTask() { + if (listener != null) { + listener.taskChanged( + currentTaskId, + elementsByTaskId.getOrDefault(currentTaskId, Collections.emptyList()) + ); + } + } + + void cancelCurrentTask() { + // todo + } + + void cancelAllTasks() { + // todo + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java new file mode 100644 index 000000000..fecfa5793 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java @@ -0,0 +1,69 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.support.resource.ResourceCodecs; +import com.refinedmods.refinedstorage.common.util.PlatformUtil; + +import java.util.ArrayList; +import java.util.List; + +import io.netty.buffer.ByteBuf; +import net.minecraft.core.UUIDUtil; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; + +public record AutocraftingMonitorData(List statuses) { + private static final StreamCodec + STATUS_ELEMENT_STREAM_CODEC = new StatusElementStreamCodec(); + private static final StreamCodec ID_STREAM_CODEC = + StreamCodec.composite( + UUIDUtil.STREAM_CODEC, AutocraftingTaskStatus.Id::id, + ResourceCodecs.STREAM_CODEC, s -> (PlatformResourceKey) s.resource(), + ByteBufCodecs.VAR_LONG, AutocraftingTaskStatus.Id::amount, + ByteBufCodecs.VAR_LONG, AutocraftingTaskStatus.Id::startTime, + AutocraftingTaskStatus.Id::new + ); + private static final StreamCodec STATUS_STREAM_CODEC = + StreamCodec.composite( + ID_STREAM_CODEC, AutocraftingTaskStatus::id, + ByteBufCodecs.collection(ArrayList::new, STATUS_ELEMENT_STREAM_CODEC), AutocraftingTaskStatus::elements, + AutocraftingTaskStatus::new + ); + public static final StreamCodec STREAM_CODEC = + StreamCodec.composite( + ByteBufCodecs.collection(ArrayList::new, STATUS_STREAM_CODEC), AutocraftingMonitorData::statuses, + AutocraftingMonitorData::new + ); + + private static class StatusElementStreamCodec + implements StreamCodec { + private static final StreamCodec ELEMENT_TYPE_STREAM_CODEC + = PlatformUtil.enumStreamCodec(AutocraftingTaskStatus.ElementType.values()); + + @Override + public AutocraftingTaskStatus.Element decode(final RegistryFriendlyByteBuf buf) { + return new AutocraftingTaskStatus.Element( + ELEMENT_TYPE_STREAM_CODEC.decode(buf), + ResourceCodecs.STREAM_CODEC.decode(buf), + buf.readLong(), + buf.readLong(), + buf.readLong(), + buf.readLong(), + buf.readLong() + ); + } + + @Override + public void encode(final RegistryFriendlyByteBuf buf, final AutocraftingTaskStatus.Element element) { + ELEMENT_TYPE_STREAM_CODEC.encode(buf, element.type()); + ResourceCodecs.STREAM_CODEC.encode(buf, (PlatformResourceKey) element.resource()); + buf.writeLong(element.stored()); + buf.writeLong(element.missing()); + buf.writeLong(element.processing()); + buf.writeLong(element.scheduled()); + buf.writeLong(element.crafting()); + } + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorListener.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorListener.java new file mode 100644 index 000000000..ff7800eac --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorListener.java @@ -0,0 +1,12 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; + +import java.util.List; +import javax.annotation.Nullable; + +@FunctionalInterface +interface AutocraftingMonitorListener { + void taskChanged(@Nullable AutocraftingTaskStatus.Id id, + List elements); +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java new file mode 100644 index 000000000..fb1713441 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java @@ -0,0 +1,464 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.support.tooltip.SmallText; +import com.refinedmods.refinedstorage.common.support.widget.ScrollbarWidget; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +import net.minecraft.ChatFormatting; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.Button; +import net.minecraft.client.renderer.Rect2i; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.FormattedCharSequence; +import net.minecraft.world.entity.player.Inventory; + +import static com.refinedmods.refinedstorage.common.support.Sprites.ERROR; +import static com.refinedmods.refinedstorage.common.support.Sprites.ERROR_SIZE; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; + +public class AutocraftingMonitorScreen extends AbstractBaseScreen + implements AutocraftingMonitorListener { + static final int TASK_BUTTON_HEIGHT = 168 / 7; + static final int TASK_BUTTON_WIDTH = 64; + + private static final int ROWS_VISIBLE = 6; + private static final int COLUMNS = 3; + private static final int ELEMENTS_AREA_HEIGHT = 179; + + private static final int PROCESSING_COLOR = 0xFFD9EDF7; + private static final int MISSING_COLOR = 0xFFF2DEDE; + private static final int SCHEDULED_COLOR = 0xFFE8E5CA; + private static final int CRAFTING_COLOR = 0xFFADDBC6; + + private static final int ROW_HEIGHT = 30; + private static final int ROW_WIDTH = 221; + + private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/autocrafting_monitor.png"); + private static final ResourceLocation ROW = createIdentifier("autocrafting_monitor/row"); + private static final ResourceLocation TASKS = createIdentifier("autocrafting_monitor/tasks"); + + private static final MutableComponent MACHINE_DOES_NOT_ACCEPT_RESOURCE = createTranslation( + "gui", + "autocrafting_monitor.machine_does_not_accept_resource" + ).withStyle(ChatFormatting.RED); + private static final MutableComponent NO_MACHINE_FOUND = createTranslation( + "gui", + "autocrafting_monitor.no_machine_found" + ).withStyle(ChatFormatting.RED); + private static final MutableComponent AUTOCRAFTER_IS_LOCKED = createTranslation( + "gui", + "autocrafting_monitor.autocrafter_is_locked" + ).withStyle(ChatFormatting.RED); + + private static final MutableComponent CANCEL = createTranslation("gui", "autocrafting_monitor.cancel"); + private static final MutableComponent CANCEL_ALL = createTranslation("gui", "autocrafting_monitor.cancel_all"); + + private static final int TASKS_WIDTH = 91; + private static final int TASKS_HEIGHT = 183; + private static final int TASKS_INNER_WIDTH = 64; + private static final int TASKS_INNER_HEIGHT = 168; + private static final int TASKS_VISIBLE = 7; + + @Nullable + private ScrollbarWidget taskElementsScrollbar; + @Nullable + private ScrollbarWidget taskButtonsScrollbar; + + @Nullable + private Button cancelButton; + @Nullable + private Button cancelAllButton; + + private final List taskButtons = new ArrayList<>(); + + public AutocraftingMonitorScreen(final AutocraftingMonitorContainerMenu menu, + final Inventory playerInventory, + final Component title) { + super(menu, playerInventory, title); + this.imageWidth = 254; + this.imageHeight = 231; + } + + @Override + protected void init() { + super.init(); + taskElementsScrollbar = new ScrollbarWidget( + leftPos + 235, + topPos + 20, + ScrollbarWidget.Type.NORMAL, + ELEMENTS_AREA_HEIGHT + ); + taskElementsScrollbar.setEnabled(false); + initTaskButtons(); + getMenu().setListener(this); + getExclusionZones().add(new Rect2i( + leftPos - TASKS_WIDTH + 4, + topPos, + TASKS_WIDTH, + TASKS_HEIGHT + )); + final int cancelButtonsY = topPos + 204; + cancelButton = addRenderableWidget(Button.builder(CANCEL, button -> getMenu().cancelCurrentTask()) + .pos(leftPos + 7, cancelButtonsY) + .size(font.width(CANCEL) + 14, 20).build()); + cancelButton.active = false; + cancelAllButton = addRenderableWidget(Button.builder(CANCEL_ALL, button -> getMenu().cancelAllTasks()) + .pos(cancelButton.getX() + cancelButton.getWidth() + 4, cancelButtonsY) + .size(font.width(CANCEL_ALL) + 14, 20).build()); + cancelAllButton.active = false; + getMenu().loadCurrentTask(); + } + + private void initTaskButtons() { + taskButtons.clear(); + taskButtonsScrollbar = new ScrollbarWidget( + leftPos - 17 + 4, + getTaskButtonsInnerY(), + ScrollbarWidget.Type.NORMAL, + 96 + ); + taskButtonsScrollbar.setListener(value -> { + final int scrollOffset = taskButtonsScrollbar.isSmoothScrolling() + ? (int) taskButtonsScrollbar.getOffset() + : (int) taskButtonsScrollbar.getOffset() * TASK_BUTTON_HEIGHT; + for (int i = 0; i < taskButtons.size(); i++) { + final AutocraftingTaskButton taskButton = taskButtons.get(i); + final int y = getTaskButtonY(i) - scrollOffset; + taskButton.setY(y); + taskButton.visible = isTaskButtonVisible(y); + } + }); + updateTaskButtonsScrollbar(); + for (int i = 0; i < getMenu().getTasks().size(); ++i) { + final AutocraftingTaskStatus.Id taskId = getMenu().getTasks().get(i); + final int buttonY = getTaskButtonY(i); + final AutocraftingTaskButton button = new AutocraftingTaskButton( + getTaskButtonsInnerX(), + buttonY, + taskId, + menu::setCurrentTaskId + ); + button.visible = isTaskButtonVisible(buttonY); + taskButtons.add(addWidget(button)); + } + } + + private boolean isTaskButtonVisible(final int y) { + final int innerY = getTaskButtonsInnerY(); + return y >= innerY - TASK_BUTTON_HEIGHT && y <= innerY + TASKS_INNER_HEIGHT; + } + + private int getTaskButtonY(final int i) { + return getTaskButtonsInnerY() + (i * TASK_BUTTON_HEIGHT); + } + + @Override + public void render(final GuiGraphics graphics, final int mouseX, final int mouseY, final float partialTicks) { + super.render(graphics, mouseX, mouseY, partialTicks); + if (taskElementsScrollbar != null) { + taskElementsScrollbar.render(graphics, mouseX, mouseY, partialTicks); + } + if (taskButtonsScrollbar != null) { + taskButtonsScrollbar.render(graphics, mouseX, mouseY, partialTicks); + } + + final int tasksInnerX = getTaskButtonsInnerX(); + final int tasksInnerY = getTaskButtonsInnerY(); + graphics.enableScissor( + tasksInnerX, + tasksInnerY, + tasksInnerX + TASKS_INNER_WIDTH, + tasksInnerY + TASKS_INNER_HEIGHT + ); + for (final AutocraftingTaskButton taskButton : taskButtons) { + taskButton.render(graphics, mouseX, mouseY, partialTicks); + } + graphics.disableScissor(); + } + + @Override + protected void renderBg(final GuiGraphics graphics, final float delta, final int mouseX, final int mouseY) { + super.renderBg(graphics, delta, mouseX, mouseY); + graphics.blitSprite(TASKS, leftPos - TASKS_WIDTH + 4, topPos, TASKS_WIDTH, TASKS_HEIGHT); + final List elements = getMenu().getCurrentElements(); + if (elements.isEmpty() || taskElementsScrollbar == null) { + return; + } + final int x = leftPos + 8; + final int y = topPos + 20; + graphics.enableScissor(x, y, x + 221, y + ELEMENTS_AREA_HEIGHT); + final int rows = Math.ceilDiv(elements.size(), COLUMNS); + for (int i = 0; i < rows; ++i) { + final int scrollOffset = taskElementsScrollbar.isSmoothScrolling() + ? (int) taskElementsScrollbar.getOffset() + : (int) taskElementsScrollbar.getOffset() * ROW_HEIGHT; + final int yy = y + (i * ROW_HEIGHT) - scrollOffset; + renderRow(graphics, x, yy, i, elements, mouseX, mouseY); + } + graphics.disableScissor(); + } + + private void renderRow(final GuiGraphics graphics, + final int x, + final int y, + final int i, + final List elements, + final double mouseX, + final double mouseY) { + if (y <= topPos + 20 - ROW_HEIGHT || y > topPos + 20 + ELEMENTS_AREA_HEIGHT) { + return; + } + graphics.blitSprite(ROW, x, y, ROW_WIDTH, ROW_HEIGHT); + for (int column = i * COLUMNS; column < Math.min(i * COLUMNS + COLUMNS, elements.size()); ++column) { + final AutocraftingTaskStatus.Element element = elements.get(column); + final int xx = x + (column % COLUMNS) * 74; + renderElement(graphics, xx, y, element, mouseX, mouseY); + } + } + + private static int getElementColor(final AutocraftingTaskStatus.Element element) { + if (element.missing() > 0) { + return MISSING_COLOR; + } + return getElementColor2(element); + } + + private static int getElementColor2(final AutocraftingTaskStatus.Element element) { + if (element.processing() > 0) { + return PROCESSING_COLOR; + } + if (element.scheduled() > 0) { + return SCHEDULED_COLOR; + } + if (element.crafting() > 0) { + return CRAFTING_COLOR; + } + return 0; + } + + private void renderElement(final GuiGraphics graphics, + final int x, + final int y, + final AutocraftingTaskStatus.Element elem, + final double mouseX, + final double mouseY) { + final int color = getElementColor(elem); + if (color != 0) { + graphics.fill(x, y, x + 73, y + 29, color); + } + if (elem.type() != AutocraftingTaskStatus.ElementType.NORMAL) { + renderElementErrorIcon(graphics, x, y); + } + int xx = x + 2; + final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(elem.resource().getClass()); + int yy = y + 7; + rendering.render(elem.resource(), graphics, xx, yy); + if (isHovering(x - leftPos, y - topPos, 73, 29, mouseX, mouseY) + && isHoveringOverTaskElements(mouseX, mouseY)) { + setTooltipForNextRenderPass(getElementTooltip(elem, rendering)); + } + if (!SmallText.isSmall()) { + yy -= 2; + } + xx += 16 + 3; + renderElementText(graphics, elem, rendering, xx, yy); + } + + private static void renderElementErrorIcon(final GuiGraphics graphics, final int x, final int y) { + graphics.blitSprite( + ERROR, + x + 73 - ERROR_SIZE - 3, + y + (29 / 2) - (ERROR_SIZE / 2), + ERROR_SIZE, + ERROR_SIZE + ); + } + + private List getElementTooltip(final AutocraftingTaskStatus.Element element, + final ResourceRendering rendering) { + final List tooltip = rendering.getTooltip(element.resource()).stream() + .map(Component::getVisualOrderText) + .collect(Collectors.toList()); + if (element.type() != AutocraftingTaskStatus.ElementType.NORMAL) { + tooltip.add(getErrorTooltip(element.type()).getVisualOrderText()); + } + return tooltip; + } + + private Component getErrorTooltip(final AutocraftingTaskStatus.ElementType type) { + return switch (type) { + case MACHINE_DOES_NOT_ACCEPT_RESOURCE -> MACHINE_DOES_NOT_ACCEPT_RESOURCE; + case NO_MACHINE_FOUND -> NO_MACHINE_FOUND; + case AUTOCRAFTER_IS_LOCKED -> AUTOCRAFTER_IS_LOCKED; + default -> Component.empty(); + }; + } + + private void renderElementText(final GuiGraphics graphics, + final AutocraftingTaskStatus.Element element, + final ResourceRendering rendering, + final int x, + final int y) { + int yy = y; + if (element.stored() > 0) { + renderElementText(graphics, "stored", rendering, x, yy, element.missing()); + yy += 7; + } + if (element.missing() > 0) { + renderElementText(graphics, "missing", rendering, x, yy, element.missing()); + yy += 7; + } + if (element.processing() > 0) { + renderElementText(graphics, "processing", rendering, x, yy, element.processing()); + yy += 7; + } + if (element.scheduled() > 0) { + renderElementText(graphics, "scheduled", rendering, x, yy, element.scheduled()); + yy += 7; + } + if (element.crafting() > 0) { + renderElementText(graphics, "crafting", rendering, x, yy, element.crafting()); + } + } + + private void renderElementText(final GuiGraphics graphics, + final String type, + final ResourceRendering rendering, + final int x, + final int y, + final long amount) { + SmallText.render( + graphics, + font, + createTranslation("gui", "autocrafting_monitor." + type, rendering.formatAmount(amount, true)) + .getVisualOrderText(), + x, + y, + 0x404040, + false + ); + } + + @Override + public boolean mouseClicked(final double mouseX, final double mouseY, final int clickedButton) { + if (taskElementsScrollbar != null + && taskElementsScrollbar.mouseClicked(mouseX, mouseY, clickedButton)) { + return true; + } + if (taskButtonsScrollbar != null && taskButtonsScrollbar.mouseClicked(mouseX, mouseY, clickedButton)) { + return true; + } + return super.mouseClicked(mouseX, mouseY, clickedButton); + } + + @Override + public void mouseMoved(final double mx, final double my) { + if (taskElementsScrollbar != null) { + taskElementsScrollbar.mouseMoved(mx, my); + } + if (taskButtonsScrollbar != null) { + taskButtonsScrollbar.mouseMoved(mx, my); + } + super.mouseMoved(mx, my); + } + + @Override + public boolean mouseReleased(final double mx, final double my, final int button) { + if (taskElementsScrollbar != null && taskElementsScrollbar.mouseReleased(mx, my, button)) { + return true; + } + if (taskButtonsScrollbar != null && taskButtonsScrollbar.mouseReleased(mx, my, button)) { + return true; + } + return super.mouseReleased(mx, my, button); + } + + @Override + public boolean mouseScrolled(final double x, final double y, final double z, final double delta) { + final boolean didTaskElementsScrollbar = taskElementsScrollbar != null + && isHoveringOverTaskElements(x, y) + && taskElementsScrollbar.mouseScrolled(x, y, z, delta); + final boolean didTaskButtonsScrollbar = !didTaskElementsScrollbar + && taskButtonsScrollbar != null + && isHoveringOverTaskButtons(x, y) + && taskButtonsScrollbar.mouseScrolled(x, y, z, delta); + return didTaskElementsScrollbar || didTaskButtonsScrollbar || super.mouseScrolled(x, y, z, delta); + } + + private boolean isHoveringOverTaskElements(final double x, final double y) { + return isHovering(8, 20, 221, ELEMENTS_AREA_HEIGHT, x, y); + } + + private boolean isHoveringOverTaskButtons(final double x, final double y) { + final int tasksInnerX = getTaskButtonsInnerX() - 1; + final int tasksInnerY = getTaskButtonsInnerY() - 1; + return isHovering(tasksInnerX - leftPos, tasksInnerY - topPos, 80, 98, x, y); + } + + private int getTaskButtonsInnerY() { + return topPos + 8; + } + + private int getTaskButtonsInnerX() { + return leftPos - 83 + 4; + } + + private void updateTaskButtonsScrollbar() { + if (taskButtonsScrollbar == null) { + return; + } + final int totalTaskButtons = getMenu().getTasks().size() - TASKS_VISIBLE; + final int maxOffset = taskButtonsScrollbar.isSmoothScrolling() + ? totalTaskButtons * TASK_BUTTON_HEIGHT + : totalTaskButtons; + taskButtonsScrollbar.setEnabled(maxOffset > 0); + taskButtonsScrollbar.setMaxOffset(maxOffset); + } + + @Override + public void renderLabels(final GuiGraphics graphics, final int mouseX, final int mouseY) { + graphics.drawString(font, title, titleLabelX, titleLabelY, 4210752, false); + } + + @Override + protected ResourceLocation getTexture() { + return TEXTURE; + } + + @Override + public void taskChanged(@Nullable final AutocraftingTaskStatus.Id taskId, + final List elements) { + if (cancelButton != null) { + cancelButton.active = taskId != null; + } + if (cancelAllButton != null) { + cancelAllButton.active = taskId != null; + } + for (final AutocraftingTaskButton taskButton : taskButtons) { + taskButton.active = taskButton.getTaskId() != taskId; + } + if (taskElementsScrollbar == null) { + return; + } + if (taskId == null) { + taskElementsScrollbar.setEnabled(false); + taskElementsScrollbar.setMaxOffset(0); + return; + } + final int items = elements.size(); + final int rows = Math.ceilDiv(items, COLUMNS) - ROWS_VISIBLE; + taskElementsScrollbar.setMaxOffset(taskElementsScrollbar.isSmoothScrolling() ? rows * ROW_HEIGHT : rows); + taskElementsScrollbar.setEnabled(rows > 0); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingTaskButton.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingTaskButton.java new file mode 100644 index 000000000..14574ff70 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingTaskButton.java @@ -0,0 +1,102 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; +import com.refinedmods.refinedstorage.api.resource.ResourceKey; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering; +import com.refinedmods.refinedstorage.common.support.tooltip.SmallText; +import com.refinedmods.refinedstorage.common.support.widget.TextMarquee; + +import java.util.function.Consumer; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.AbstractButton; +import net.minecraft.client.gui.components.Tooltip; +import net.minecraft.client.gui.narration.NarrationElementOutput; +import net.minecraft.network.chat.Component; + +import static com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorScreen.TASK_BUTTON_HEIGHT; +import static com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorScreen.TASK_BUTTON_WIDTH; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; + +class AutocraftingTaskButton extends AbstractButton { + private final AutocraftingTaskStatus.Id taskId; + private final TextMarquee text; + private final Consumer onPress; + + AutocraftingTaskButton(final int x, + final int y, + final AutocraftingTaskStatus.Id taskId, + final Consumer onPress) { + super(x, y, TASK_BUTTON_WIDTH, TASK_BUTTON_HEIGHT, Component.empty()); + this.taskId = taskId; + final ResourceKey resource = taskId.resource(); + final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(resource.getClass()); + this.text = new TextMarquee(Component.literal(rendering.formatAmount(taskId.amount(), true)) + .append(" ") + .append(rendering.getDisplayName(resource)), + TASK_BUTTON_WIDTH - 16 - 4 - 4 - 4, + 0xFFFFFF, + true, + true); + this.onPress = onPress; + } + + AutocraftingTaskStatus.Id getTaskId() { + return taskId; + } + + @Override + protected void renderWidget(final GuiGraphics graphics, + final int mouseX, + final int mouseY, + final float partialTick) { + super.renderWidget(graphics, mouseX, mouseY, partialTick); + final ResourceKey resource = taskId.resource(); + final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(resource.getClass()); + rendering.render(resource, graphics, getX() + 3, getY() + 4); + final int yOffset = SmallText.isSmall() ? 5 : 3; + final int textX = getX() + 3 + 16 + 3; + final int textY = getY() + yOffset; + text.render(graphics, textX, textY, Minecraft.getInstance().font, isHovered); + final int ySpacing = SmallText.isSmall() ? 7 : 8; + SmallText.render(graphics, Minecraft.getInstance().font, "69%", textX, textY + ySpacing, 0xFFFFFF, true); + updateTooltip(); + } + + private void updateTooltip() { + if (isHovered) { + final String runningTime = getRunningTimeText(); + setTooltip(Tooltip.create( + createTranslation("gui", "autocrafting_monitor.running_time", runningTime) + )); + } else { + setTooltip(null); + } + } + + private String getRunningTimeText() { + final int totalSecs = (int) (System.currentTimeMillis() - taskId.startTime()) / 1000; + final int hours = totalSecs / 3600; + final int minutes = (totalSecs % 3600) / 60; + final int seconds = totalSecs % 60; + final String runningTime; + if (hours > 0) { + runningTime = String.format("%02d:%02d:%02d", hours, minutes, seconds); + } else { + runningTime = String.format("%02d:%02d", minutes, seconds); + } + return runningTime; + } + + @Override + public void onPress() { + onPress.accept(taskId); + } + + @Override + protected void updateWidgetNarration(final NarrationElementOutput narrationElementOutput) { + // no op + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java index 59dbf5f7b..408b8b124 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage.common.autocrafting.autocrafter.AutocrafterContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.preview.AutocraftingPreviewContainerMenu; import com.refinedmods.refinedstorage.common.constructordestructor.ConstructorContainerMenu; @@ -98,6 +99,8 @@ public final class Menus { private Supplier> autocrafter; @Nullable private Supplier> autocrafterManager; + @Nullable + private Supplier> autocraftingMonitor; private Menus() { } @@ -337,4 +340,12 @@ public MenuType getAutocrafterManager() { public void setAutocrafterManager(final Supplier> autocrafterManager) { this.autocrafterManager = autocrafterManager; } + + public MenuType getAutocraftingMonitor() { + return requireNonNull(autocraftingMonitor).get(); + } + + public void setAutocraftingMonitor(final Supplier> autocraftingMonitor) { + this.autocraftingMonitor = autocraftingMonitor; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseBlock.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseBlock.java index 591b5f0fc..683069d67 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseBlock.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseBlock.java @@ -202,6 +202,7 @@ private boolean rotate(final BlockState state, return !state.equals(rotated); } + @SuppressWarnings("deprecation") // deprecated on NeoForge protected BlockState getRotatedBlockState(final BlockState state, final Level level, final BlockPos pos) { return state.rotate(Rotation.CLOCKWISE_90); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/Sprites.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/Sprites.java index 0acc1419b..a29fc360e 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/Sprites.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/Sprites.java @@ -13,6 +13,8 @@ public final class Sprites { public static final int WARNING_SIZE = 10; public static final ResourceLocation SEARCH = createIdentifier("search"); public static final int SEARCH_SIZE = 12; + public static final int ERROR_SIZE = 12; + public static final ResourceLocation ERROR = createIdentifier("error"); private Sprites() { } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/amount/AbstractAmountScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/amount/AbstractAmountScreen.java index a451b82b3..66b5c5e07 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/amount/AbstractAmountScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/amount/AbstractAmountScreen.java @@ -20,7 +20,7 @@ import org.joml.Vector3f; import org.lwjgl.glfw.GLFW; -import static com.refinedmods.refinedstorage.common.support.amount.ConfirmButton.ERROR_SIZE; +import static com.refinedmods.refinedstorage.common.support.Sprites.ERROR_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; public abstract class AbstractAmountScreen diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/amount/ConfirmButton.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/amount/ConfirmButton.java index b4998c387..8367c9c52 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/amount/ConfirmButton.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/amount/ConfirmButton.java @@ -4,15 +4,11 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; -import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; +import static com.refinedmods.refinedstorage.common.support.Sprites.ERROR; +import static com.refinedmods.refinedstorage.common.support.Sprites.ERROR_SIZE; public class ConfirmButton extends Button { - static final int ERROR_SIZE = 12; - - private static final ResourceLocation ERROR_ICON = createIdentifier("error"); - private boolean error; public ConfirmButton(final int x, @@ -31,7 +27,7 @@ protected void renderWidget(final GuiGraphics graphics, final float partialTick) { super.renderWidget(graphics, mouseX, mouseY, partialTick); if (error) { - graphics.blitSprite(ERROR_ICON, getX() + 4, getY() + 4, ERROR_SIZE, ERROR_SIZE); + graphics.blitSprite(ERROR, getX() + 4, getY() + 4, ERROR_SIZE, ERROR_SIZE); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/SmallText.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/SmallText.java index d84fcc952..a76adb722 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/SmallText.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/tooltip/SmallText.java @@ -65,4 +65,18 @@ public static void render(final GuiGraphics graphics, graphics.drawString(font, text, (int) (x / scale), (int) (y / scale) + 1, color, dropShadow); graphics.pose().popPose(); } + + public static void render(final GuiGraphics graphics, + final Font font, + final String text, + final int x, + final int y, + final int color, + final boolean dropShadow) { + final float scale = getScale(); + graphics.pose().pushPose(); + graphics.pose().scale(scale, scale, 1); + graphics.drawString(font, text, (int) (x / scale), (int) (y / scale) + 1, color, dropShadow); + graphics.pose().popPose(); + } } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json index 0b28df43c..099ce5617 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -235,6 +235,17 @@ "gui.refinedstorage.autocrafter_manager.view_type.not_full.help": "Show all autocrafters that are not full yet.", "gui.refinedstorage.autocrafter_manager.view_type.all": "All", "gui.refinedstorage.autocrafter_manager.view_type.all.help": "Show all autocrafters.", + "gui.refinedstorage.autocrafting_monitor.stored": "Stored: %s", + "gui.refinedstorage.autocrafting_monitor.missing": "Missing: %s", + "gui.refinedstorage.autocrafting_monitor.processing": "Processing: %s", + "gui.refinedstorage.autocrafting_monitor.scheduled": "Scheduled: %s", + "gui.refinedstorage.autocrafting_monitor.crafting": "Crafting: %s", + "gui.refinedstorage.autocrafting_monitor.machine_does_not_accept_resource": "Machine doesn't accept resource", + "gui.refinedstorage.autocrafting_monitor.no_machine_found": "No machine found", + "gui.refinedstorage.autocrafting_monitor.autocrafter_is_locked": "Autocrafter is locked", + "gui.refinedstorage.autocrafting_monitor.cancel": "Cancel", + "gui.refinedstorage.autocrafting_monitor.cancel_all": "Cancel all", + "gui.refinedstorage.autocrafting_monitor.running_time": "Running for %s", "item.refinedstorage.controller.help": "Provides the storage network with energy. Multiple are allowed in a single storage network.", "item.refinedstorage.creative_controller.help": "Provides the storage network with an infinite source of energy.", "item.refinedstorage.disk_drive.help": "Accepts storage disks to provide the storage network with storage space.", diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/autocrafting_monitor.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/autocrafting_monitor.png new file mode 100644 index 0000000000000000000000000000000000000000..76da13ff707f84121af77edcae088de969fd2598 GIT binary patch literal 605 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5D>38$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&eBzC?geh%1o(|NsB7W5+^6L(R?2ySuw@-@XkL{BrrbA&}xI3GxdDDgXh7 zd(C?zfnuBm9+AZi41DWBn6XgM`5n-rU7jwEAr*0NuLR~Dau9GiXxjJq_kD{umxMfb z94xa{%Vo15hrm)$JVdhrG6Ki-K(sCJ$vY97DN;jOjg)F7>c3(Zi%gTe~DWM4fJp`e~ literal 0 HcmV?d00001 diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/autocrafting_monitor/row.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/autocrafting_monitor/row.png new file mode 100644 index 0000000000000000000000000000000000000000..5a8dc29c6bb79217756590ba50680f2edd7f39f6 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^cY#=rg&9ajO=B|#QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`*#dk*TyNjL-PqXJW#{(;D8gCb5n0T@z;_sg8IR|$NC67!dAc};cpQIw z){vKhf#ZNd0mHwuNsY|~rQatVTV^x6>GVM%xNb!1@J z*w6hZkrl|72=EDU1=9cj|37x@n7O%mcX#*g+qXkQLxF;Q&7lH7ilZdRFBqr*1Q_l$ z?~MeCaTa()7BevL9R^{>HB|qWe(Pi(*>*< z%Qmk5+i3et=Jc7usMIyy@85ow>i?GgcUOFVeBZ6O;_bCt*0aymyFEKSINExP_ik#U z*Zj9{*ICsaNPoC@Z&O*X<+<&q&o Date: Fri, 15 Nov 2024 20:12:39 +0100 Subject: [PATCH 21/30] feat: autocrafting monitor from the server --- .../api/autocrafting/TaskId.java | 9 + ...{AutocraftingPreview.java => Preview.java} | 2 +- ...ftingPreviewItem.java => PreviewItem.java} | 2 +- ...viewProvider.java => PreviewProvider.java} | 4 +- ...ftingPreviewType.java => PreviewType.java} | 2 +- ...raftingTaskStatus.java => TaskStatus.java} | 12 +- .../status/TaskStatusListener.java | 14 + .../status/TaskStatusProvider.java | 20 ++ .../refinedstorage/common/api/grid/Grid.java | 4 +- .../common/AbstractModInitializer.java | 2 +- .../AutocraftingMonitorBlockEntity.java | 296 +----------------- .../AutocraftingMonitorContainerMenu.java | 148 +++++++-- .../monitor/AutocraftingMonitorData.java | 58 +--- .../monitor/AutocraftingMonitorListener.java | 12 +- .../monitor/AutocraftingMonitorScreen.java | 225 +++++++------ .../AutocraftingMonitorStreamCodecs.java | 72 +++++ .../monitor/AutocraftingTaskButton.java | 56 ++-- .../monitor/TaskStatusProviderImpl.java | 121 +++++++ .../AutocraftingPreviewContainerMenu.java | 4 +- .../preview/AutocraftingPreviewListener.java | 4 +- .../preview/AutocraftingPreviewScreen.java | 31 +- .../preview/AutocraftingRequest.java | 8 +- .../preview/AutocraftingRequestButton.java | 28 +- .../common/grid/AbstractGridBlockEntity.java | 4 +- .../grid/AbstractGridContainerMenu.java | 8 +- .../common/grid/WirelessGrid.java | 4 +- .../storage/portablegrid/PortableGrid.java | 4 +- ...tocraftingStorageMonitorContainerMenu.java | 8 +- .../StorageMonitorBlockEntity.java | 8 +- .../AutocraftingMonitorCancelAllPacket.java | 30 ++ .../c2s/AutocraftingMonitorCancelPacket.java | 34 ++ .../c2s/AutocraftingPreviewRequestPacket.java | 4 +- .../packet/c2s/AutocraftingRequestPacket.java | 17 +- .../common/support/packet/c2s/C2SPackets.java | 9 + .../AutocraftingMonitorTaskAddedPacket.java | 36 +++ .../AutocraftingMonitorTaskRemovedPacket.java | 36 +++ ...raftingMonitorTaskStatusChangedPacket.java | 36 +++ .../AutocraftingPreviewResponsePacket.java | 26 +- .../common/support/packet/s2c/S2CPackets.java | 19 +- .../common/util/ClientPlatformUtil.java | 4 +- .../fabric/ClientModInitializerImpl.java | 15 + .../fabric/ModInitializerImpl.java | 33 ++ .../neoforge/ModInitializer.java | 30 ++ .../AutocraftingNetworkComponent.java | 4 +- .../AutocraftingNetworkComponentImpl.java | 19 +- 45 files changed, 924 insertions(+), 598 deletions(-) create mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/TaskId.java rename refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/{AutocraftingPreview.java => Preview.java} (64%) rename refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/{AutocraftingPreviewItem.java => PreviewItem.java} (68%) rename refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/{AutocraftingPreviewProvider.java => PreviewProvider.java} (71%) rename refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/{AutocraftingPreviewType.java => PreviewType.java} (84%) rename refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/{AutocraftingTaskStatus.java => TaskStatus.java} (63%) create mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusListener.java create mode 100644 refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorStreamCodecs.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelAllPacket.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelPacket.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskAddedPacket.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskRemovedPacket.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskStatusChangedPacket.java diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/TaskId.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/TaskId.java new file mode 100644 index 000000000..878278358 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/TaskId.java @@ -0,0 +1,9 @@ +package com.refinedmods.refinedstorage.api.autocrafting; + +import java.util.UUID; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") +public record TaskId(UUID id) { +} diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreview.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/Preview.java similarity index 64% rename from refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreview.java rename to refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/Preview.java index ad5576ef7..1ca73b92b 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreview.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/Preview.java @@ -5,5 +5,5 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") -public record AutocraftingPreview(AutocraftingPreviewType type, List items) { +public record Preview(PreviewType type, List items) { } diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewItem.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewItem.java similarity index 68% rename from refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewItem.java rename to refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewItem.java index f1c71ada5..11891557d 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewItem.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewItem.java @@ -5,5 +5,5 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") -public record AutocraftingPreviewItem(ResourceKey resource, long available, long missing, long toCraft) { +public record PreviewItem(ResourceKey resource, long available, long missing, long toCraft) { } diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewProvider.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewProvider.java similarity index 71% rename from refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewProvider.java rename to refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewProvider.java index 7cb97463c..fd69071c9 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewProvider.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewProvider.java @@ -7,8 +7,8 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") -public interface AutocraftingPreviewProvider { - Optional getPreview(ResourceKey resource, long amount); +public interface PreviewProvider { + Optional getPreview(ResourceKey resource, long amount); boolean startTask(ResourceKey resource, long amount); } diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewType.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewType.java similarity index 84% rename from refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewType.java rename to refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewType.java index 47af2f527..d69ea48d5 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/AutocraftingPreviewType.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewType.java @@ -3,7 +3,7 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") -public enum AutocraftingPreviewType { +public enum PreviewType { SUCCESS, MISSING_RESOURCES } diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingTaskStatus.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatus.java similarity index 63% rename from refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingTaskStatus.java rename to refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatus.java index 540094c4c..1761d92eb 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/AutocraftingTaskStatus.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatus.java @@ -1,19 +1,19 @@ package com.refinedmods.refinedstorage.api.autocrafting.status; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import java.util.List; -import java.util.UUID; import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") -public record AutocraftingTaskStatus(Id id, List elements) { - public record Id(UUID id, ResourceKey resource, long amount, long startTime) { +public record TaskStatus(TaskInfo info, float percentageCompleted, List items) { + public record TaskInfo(TaskId id, ResourceKey resource, long amount, long startTime) { } - public record Element( - ElementType type, + public record Item( + ItemType type, ResourceKey resource, long stored, long missing, @@ -23,7 +23,7 @@ public record Element( ) { } - public enum ElementType { + public enum ItemType { NORMAL, MACHINE_DOES_NOT_ACCEPT_RESOURCE, NO_MACHINE_FOUND, diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusListener.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusListener.java new file mode 100644 index 000000000..666cf1fa8 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusListener.java @@ -0,0 +1,14 @@ +package com.refinedmods.refinedstorage.api.autocrafting.status; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") +public interface TaskStatusListener { + void taskStatusChanged(TaskStatus status); + + void taskRemoved(TaskId id); + + void taskAdded(TaskStatus status); +} diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.java new file mode 100644 index 000000000..a74424707 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.java @@ -0,0 +1,20 @@ +package com.refinedmods.refinedstorage.api.autocrafting.status; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; + +import java.util.List; + +import org.apiguardian.api.API; + +@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") +public interface TaskStatusProvider { + List getStatuses(); + + void addListener(TaskStatusListener listener); + + void removeListener(TaskStatusListener listener); + + void cancel(TaskId taskId); + + void cancelAll(); +} diff --git a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/grid/Grid.java b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/grid/Grid.java index 1e6a710e7..e7147ac36 100644 --- a/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/grid/Grid.java +++ b/refinedstorage-common-api/src/main/java/com/refinedmods/refinedstorage/common/api/grid/Grid.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.api.grid; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage.api.grid.watcher.GridWatcher; import com.refinedmods.refinedstorage.api.storage.Actor; @@ -16,7 +16,7 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.3.0") -public interface Grid extends AutocraftingPreviewProvider { +public interface Grid extends PreviewProvider { void addWatcher(GridWatcher watcher, Class actorType); void removeWatcher(GridWatcher watcher); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java index 20bcd3e82..454a34aa4 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java @@ -821,7 +821,7 @@ protected final void registerMenus(final RegistryCallback> callback, Menus.INSTANCE.setAutocraftingMonitor(callback.register( ContentIds.AUTOCRAFTING_MONITOR, () -> extendedMenuTypeFactory.create( - (syncId, player, data) -> new AutocraftingMonitorContainerMenu(syncId, data), + AutocraftingMonitorContainerMenu::new, AutocraftingMonitorData.STREAM_CODEC ) )); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java index 815c36c32..4a7273adb 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java @@ -1,6 +1,5 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; -import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; import com.refinedmods.refinedstorage.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage.common.Platform; import com.refinedmods.refinedstorage.common.content.BlockEntities; @@ -8,24 +7,15 @@ import com.refinedmods.refinedstorage.common.support.AbstractDirectionalBlock; import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; import com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity; -import com.refinedmods.refinedstorage.common.support.resource.FluidResource; -import com.refinedmods.refinedstorage.common.support.resource.ItemResource; - -import java.util.List; -import java.util.UUID; import net.minecraft.core.BlockPos; -import net.minecraft.core.component.DataComponentPatch; import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.network.codec.StreamEncoder; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.Fluids; public class AutocraftingMonitorBlockEntity extends AbstractBaseNetworkNodeContainerBlockEntity implements NetworkNodeExtendedMenuProvider { @@ -48,289 +38,7 @@ protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState @Override public AutocraftingMonitorData getMenuData() { - return new AutocraftingMonitorData(List.of( - new AutocraftingTaskStatus( - new AutocraftingTaskStatus.Id( - UUID.randomUUID(), - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 64, - System.currentTimeMillis() - ), - List.of( - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 1, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 1, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 1, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 1 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 1, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 1, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 1, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 1 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 5448748, - 1, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 1, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 1, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 1 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 10000, - 0, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 1, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 1, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 1 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 5448748, - 1, - 0, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 1, - 0, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 1, - 0 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 1, - 0, - 0, - 0, - 1 - ), - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.AUTOCRAFTER_IS_LOCKED, - ItemResource.ofItemStack(new ItemStack(Items.DIAMOND)), - 10000, - 0, - 0, - 0, - 0 - ) - ) - ), - new AutocraftingTaskStatus( - new AutocraftingTaskStatus.Id( - UUID.randomUUID(), - new FluidResource(Fluids.WATER, DataComponentPatch.EMPTY), - Platform.INSTANCE.getBucketAmount() * 2, - System.currentTimeMillis() - 3000 - ), - List.of( - new AutocraftingTaskStatus.Element( - AutocraftingTaskStatus.ElementType.NORMAL, - ItemResource.ofItemStack(new ItemStack(Items.DIRT)), - 6, - 7, - 8, - 9, - 10 - ) - ) - ) - )); + return new AutocraftingMonitorData(new TaskStatusProviderImpl().getStatuses()); } @Override @@ -340,6 +48,6 @@ public StreamEncoder getMenuCo @Override public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { - return new AutocraftingMonitorContainerMenu(syncId, this); + return new AutocraftingMonitorContainerMenu(syncId, player, new TaskStatusProviderImpl()); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java index 287f74a17..15cc28f8d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java @@ -1,8 +1,13 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; -import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; import com.refinedmods.refinedstorage.common.content.Menus; import com.refinedmods.refinedstorage.common.support.AbstractBaseContainerMenu; +import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; +import com.refinedmods.refinedstorage.common.support.packet.s2c.S2CPackets; import java.util.Collections; import java.util.List; @@ -10,67 +15,160 @@ import java.util.stream.Collectors; import javax.annotation.Nullable; -public class AutocraftingMonitorContainerMenu extends AbstractBaseContainerMenu { - private final Map> elementsByTaskId; - private final List tasks; - private final List tasksView; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; + +public class AutocraftingMonitorContainerMenu extends AbstractBaseContainerMenu implements TaskStatusListener { + private final Map statusByTaskId; + private final List tasks; + private final List tasksView; + @Nullable + private final TaskStatusProvider taskStatusProvider; + private final Player player; @Nullable private AutocraftingMonitorListener listener; @Nullable - private AutocraftingTaskStatus.Id currentTaskId; + private TaskId currentTaskId; - public AutocraftingMonitorContainerMenu(final int syncId, final AutocraftingMonitorData data) { + public AutocraftingMonitorContainerMenu(final int syncId, + final Inventory playerInventory, + final AutocraftingMonitorData data) { super(Menus.INSTANCE.getAutocraftingMonitor(), syncId); - this.elementsByTaskId = data.statuses().stream().collect(Collectors.toMap( - AutocraftingTaskStatus::id, - AutocraftingTaskStatus::elements + this.statusByTaskId = data.statuses().stream().collect(Collectors.toMap( + s -> s.info().id(), + s -> s )); - this.tasks = data.statuses().stream().map(AutocraftingTaskStatus::id).collect(Collectors.toList()); + this.tasks = data.statuses().stream().map(TaskStatus::info).collect(Collectors.toList()); this.tasksView = Collections.unmodifiableList(tasks); - this.currentTaskId = data.statuses().isEmpty() ? null : data.statuses().getFirst().id(); + this.currentTaskId = data.statuses().isEmpty() ? null : data.statuses().getFirst().info().id(); + this.taskStatusProvider = null; + this.player = playerInventory.player; } - AutocraftingMonitorContainerMenu(final int syncId, final AutocraftingMonitorBlockEntity autocraftingMonitor) { + AutocraftingMonitorContainerMenu(final int syncId, + final Player player, + final TaskStatusProvider taskStatusProvider) { super(Menus.INSTANCE.getAutocraftingMonitor(), syncId); - this.elementsByTaskId = Collections.emptyMap(); + this.statusByTaskId = Collections.emptyMap(); this.tasks = Collections.emptyList(); this.tasksView = Collections.emptyList(); this.currentTaskId = null; + this.taskStatusProvider = taskStatusProvider; + this.player = player; + taskStatusProvider.addListener(this); + } + + @Override + public void removed(final Player removedPlayer) { + super.removed(removedPlayer); + if (taskStatusProvider != null) { + taskStatusProvider.removeListener(this); + } + } + + @Override + public void broadcastChanges() { + super.broadcastChanges(); + if (taskStatusProvider instanceof TaskStatusProviderImpl taskStatusProviderImpl) { + taskStatusProviderImpl.testTick(); + } } void setListener(@Nullable final AutocraftingMonitorListener listener) { this.listener = listener; } - List getCurrentElements() { - return elementsByTaskId.getOrDefault(currentTaskId, Collections.emptyList()); + List getCurrentItems() { + final TaskStatus status = statusByTaskId.get(currentTaskId); + if (status == null) { + return Collections.emptyList(); + } + return status.items(); } - List getTasks() { + List getTasks() { return tasksView; } - void setCurrentTaskId(@Nullable final AutocraftingTaskStatus.Id taskId) { + float getPercentageCompleted(final TaskId taskId) { + final TaskStatus status = statusByTaskId.get(taskId); + return status == null ? 0 : status.percentageCompleted(); + } + + void setCurrentTaskId(@Nullable final TaskId taskId) { this.currentTaskId = taskId; loadCurrentTask(); } void loadCurrentTask() { if (listener != null) { - listener.taskChanged( - currentTaskId, - elementsByTaskId.getOrDefault(currentTaskId, Collections.emptyList()) - ); + listener.currentTaskChanged(currentTaskId == null ? null : statusByTaskId.get(currentTaskId)); + } + } + + @Override + public void taskStatusChanged(final TaskStatus status) { + if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + S2CPackets.sendAutocraftingMonitorTaskStatusChanged(serverPlayer, status); + return; + } + statusByTaskId.put(status.info().id(), status); + } + + @Override + public void taskRemoved(final TaskId id) { + if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + S2CPackets.sendAutocraftingMonitorTaskRemoved(serverPlayer, id); + return; + } + statusByTaskId.remove(id); + tasks.removeIf(task -> task.id().equals(id)); + if (listener != null) { + listener.taskRemoved(id); + } + if (id.equals(currentTaskId)) { + currentTaskId = tasks.isEmpty() ? null : tasks.getFirst().id(); + loadCurrentTask(); + } + } + + @Override + public void taskAdded(final TaskStatus status) { + if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + S2CPackets.sendAutocraftingMonitorTaskAdded(serverPlayer, status); + return; + } + statusByTaskId.put(status.info().id(), status); + tasks.add(status.info()); + if (listener != null) { + listener.taskAdded(status); + } + if (currentTaskId == null) { + currentTaskId = status.info().id(); + loadCurrentTask(); + } + } + + public void cancelTask(final TaskId taskId) { + if (taskStatusProvider != null) { + taskStatusProvider.cancel(taskId); } } void cancelCurrentTask() { - // todo + if (currentTaskId != null) { + C2SPackets.sendAutocraftingMonitorCancel(currentTaskId); + } } - void cancelAllTasks() { - // todo + public void cancelAllTasks() { + if (taskStatusProvider != null) { + taskStatusProvider.cancelAll(); + } else { + C2SPackets.sendAutocraftingMonitorCancelAll(); + } } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java index fecfa5793..24df0d6a0 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java @@ -1,69 +1,19 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; -import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; -import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.common.support.resource.ResourceCodecs; -import com.refinedmods.refinedstorage.common.util.PlatformUtil; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; import java.util.ArrayList; import java.util.List; -import io.netty.buffer.ByteBuf; -import net.minecraft.core.UUIDUtil; import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.codec.ByteBufCodecs; import net.minecraft.network.codec.StreamCodec; -public record AutocraftingMonitorData(List statuses) { - private static final StreamCodec - STATUS_ELEMENT_STREAM_CODEC = new StatusElementStreamCodec(); - private static final StreamCodec ID_STREAM_CODEC = - StreamCodec.composite( - UUIDUtil.STREAM_CODEC, AutocraftingTaskStatus.Id::id, - ResourceCodecs.STREAM_CODEC, s -> (PlatformResourceKey) s.resource(), - ByteBufCodecs.VAR_LONG, AutocraftingTaskStatus.Id::amount, - ByteBufCodecs.VAR_LONG, AutocraftingTaskStatus.Id::startTime, - AutocraftingTaskStatus.Id::new - ); - private static final StreamCodec STATUS_STREAM_CODEC = - StreamCodec.composite( - ID_STREAM_CODEC, AutocraftingTaskStatus::id, - ByteBufCodecs.collection(ArrayList::new, STATUS_ELEMENT_STREAM_CODEC), AutocraftingTaskStatus::elements, - AutocraftingTaskStatus::new - ); +public record AutocraftingMonitorData(List statuses) { public static final StreamCodec STREAM_CODEC = StreamCodec.composite( - ByteBufCodecs.collection(ArrayList::new, STATUS_STREAM_CODEC), AutocraftingMonitorData::statuses, + ByteBufCodecs.collection(ArrayList::new, AutocraftingMonitorStreamCodecs.STATUS_STREAM_CODEC), + AutocraftingMonitorData::statuses, AutocraftingMonitorData::new ); - - private static class StatusElementStreamCodec - implements StreamCodec { - private static final StreamCodec ELEMENT_TYPE_STREAM_CODEC - = PlatformUtil.enumStreamCodec(AutocraftingTaskStatus.ElementType.values()); - - @Override - public AutocraftingTaskStatus.Element decode(final RegistryFriendlyByteBuf buf) { - return new AutocraftingTaskStatus.Element( - ELEMENT_TYPE_STREAM_CODEC.decode(buf), - ResourceCodecs.STREAM_CODEC.decode(buf), - buf.readLong(), - buf.readLong(), - buf.readLong(), - buf.readLong(), - buf.readLong() - ); - } - - @Override - public void encode(final RegistryFriendlyByteBuf buf, final AutocraftingTaskStatus.Element element) { - ELEMENT_TYPE_STREAM_CODEC.encode(buf, element.type()); - ResourceCodecs.STREAM_CODEC.encode(buf, (PlatformResourceKey) element.resource()); - buf.writeLong(element.stored()); - buf.writeLong(element.missing()); - buf.writeLong(element.processing()); - buf.writeLong(element.scheduled()); - buf.writeLong(element.crafting()); - } - } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorListener.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorListener.java index ff7800eac..e5fc4f557 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorListener.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorListener.java @@ -1,12 +1,14 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; -import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; -import java.util.List; import javax.annotation.Nullable; -@FunctionalInterface interface AutocraftingMonitorListener { - void taskChanged(@Nullable AutocraftingTaskStatus.Id id, - List elements); + void currentTaskChanged(@Nullable TaskStatus taskStatus); + + void taskAdded(TaskStatus taskStatus); + + void taskRemoved(TaskId taskId); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java index fb1713441..5af4f1cb5 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; -import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; @@ -34,7 +35,7 @@ public class AutocraftingMonitorScreen extends AbstractBaseScreen { final int scrollOffset = taskButtonsScrollbar.isSmoothScrolling() @@ -141,13 +142,14 @@ private void initTaskButtons() { }); updateTaskButtonsScrollbar(); for (int i = 0; i < getMenu().getTasks().size(); ++i) { - final AutocraftingTaskStatus.Id taskId = getMenu().getTasks().get(i); + final TaskStatus.TaskInfo taskId = getMenu().getTasks().get(i); final int buttonY = getTaskButtonY(i); final AutocraftingTaskButton button = new AutocraftingTaskButton( getTaskButtonsInnerX(), buttonY, taskId, - menu::setCurrentTaskId + menu::setCurrentTaskId, + menu::getPercentageCompleted ); button.visible = isTaskButtonVisible(buttonY); taskButtons.add(addWidget(button)); @@ -166,8 +168,8 @@ private int getTaskButtonY(final int i) { @Override public void render(final GuiGraphics graphics, final int mouseX, final int mouseY, final float partialTicks) { super.render(graphics, mouseX, mouseY, partialTicks); - if (taskElementsScrollbar != null) { - taskElementsScrollbar.render(graphics, mouseX, mouseY, partialTicks); + if (taskItemsScrollbar != null) { + taskItemsScrollbar.render(graphics, mouseX, mouseY, partialTicks); } if (taskButtonsScrollbar != null) { taskButtonsScrollbar.render(graphics, mouseX, mouseY, partialTicks); @@ -191,20 +193,20 @@ public void render(final GuiGraphics graphics, final int mouseX, final int mouse protected void renderBg(final GuiGraphics graphics, final float delta, final int mouseX, final int mouseY) { super.renderBg(graphics, delta, mouseX, mouseY); graphics.blitSprite(TASKS, leftPos - TASKS_WIDTH + 4, topPos, TASKS_WIDTH, TASKS_HEIGHT); - final List elements = getMenu().getCurrentElements(); - if (elements.isEmpty() || taskElementsScrollbar == null) { + final List items = getMenu().getCurrentItems(); + if (items.isEmpty() || taskItemsScrollbar == null) { return; } final int x = leftPos + 8; final int y = topPos + 20; - graphics.enableScissor(x, y, x + 221, y + ELEMENTS_AREA_HEIGHT); - final int rows = Math.ceilDiv(elements.size(), COLUMNS); + graphics.enableScissor(x, y, x + 221, y + ITEMS_AREA_HEIGHT); + final int rows = Math.ceilDiv(items.size(), COLUMNS); for (int i = 0; i < rows; ++i) { - final int scrollOffset = taskElementsScrollbar.isSmoothScrolling() - ? (int) taskElementsScrollbar.getOffset() - : (int) taskElementsScrollbar.getOffset() * ROW_HEIGHT; + final int scrollOffset = taskItemsScrollbar.isSmoothScrolling() + ? (int) taskItemsScrollbar.getOffset() + : (int) taskItemsScrollbar.getOffset() * ROW_HEIGHT; final int yy = y + (i * ROW_HEIGHT) - scrollOffset; - renderRow(graphics, x, yy, i, elements, mouseX, mouseY); + renderRow(graphics, x, yy, i, items, mouseX, mouseY); } graphics.disableScissor(); } @@ -213,69 +215,69 @@ private void renderRow(final GuiGraphics graphics, final int x, final int y, final int i, - final List elements, + final List items, final double mouseX, final double mouseY) { - if (y <= topPos + 20 - ROW_HEIGHT || y > topPos + 20 + ELEMENTS_AREA_HEIGHT) { + if (y <= topPos + 20 - ROW_HEIGHT || y > topPos + 20 + ITEMS_AREA_HEIGHT) { return; } graphics.blitSprite(ROW, x, y, ROW_WIDTH, ROW_HEIGHT); - for (int column = i * COLUMNS; column < Math.min(i * COLUMNS + COLUMNS, elements.size()); ++column) { - final AutocraftingTaskStatus.Element element = elements.get(column); + for (int column = i * COLUMNS; column < Math.min(i * COLUMNS + COLUMNS, items.size()); ++column) { + final TaskStatus.Item item = items.get(column); final int xx = x + (column % COLUMNS) * 74; - renderElement(graphics, xx, y, element, mouseX, mouseY); + renderItem(graphics, xx, y, item, mouseX, mouseY); } } - private static int getElementColor(final AutocraftingTaskStatus.Element element) { - if (element.missing() > 0) { + private static int getItemColor(final TaskStatus.Item item) { + if (item.missing() > 0) { return MISSING_COLOR; } - return getElementColor2(element); + return getItemColor2(item); } - private static int getElementColor2(final AutocraftingTaskStatus.Element element) { - if (element.processing() > 0) { + private static int getItemColor2(final TaskStatus.Item item) { + if (item.processing() > 0) { return PROCESSING_COLOR; } - if (element.scheduled() > 0) { + if (item.scheduled() > 0) { return SCHEDULED_COLOR; } - if (element.crafting() > 0) { + if (item.crafting() > 0) { return CRAFTING_COLOR; } return 0; } - private void renderElement(final GuiGraphics graphics, - final int x, - final int y, - final AutocraftingTaskStatus.Element elem, - final double mouseX, - final double mouseY) { - final int color = getElementColor(elem); + private void renderItem(final GuiGraphics graphics, + final int x, + final int y, + final TaskStatus.Item item, + final double mouseX, + final double mouseY) { + final int color = getItemColor(item); if (color != 0) { graphics.fill(x, y, x + 73, y + 29, color); } - if (elem.type() != AutocraftingTaskStatus.ElementType.NORMAL) { - renderElementErrorIcon(graphics, x, y); + if (item.type() != TaskStatus.ItemType.NORMAL) { + renderItemErrorIcon(graphics, x, y); } int xx = x + 2; - final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(elem.resource().getClass()); + final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(item.resource().getClass()); int yy = y + 7; - rendering.render(elem.resource(), graphics, xx, yy); + rendering.render(item.resource(), graphics, xx, yy); if (isHovering(x - leftPos, y - topPos, 73, 29, mouseX, mouseY) - && isHoveringOverTaskElements(mouseX, mouseY)) { - setTooltipForNextRenderPass(getElementTooltip(elem, rendering)); + && isHoveringOverItems(mouseX, mouseY)) { + setTooltipForNextRenderPass(getItemTooltip(item, rendering)); } if (!SmallText.isSmall()) { yy -= 2; } xx += 16 + 3; - renderElementText(graphics, elem, rendering, xx, yy); + renderItemText(graphics, item, rendering, xx, yy); } - private static void renderElementErrorIcon(final GuiGraphics graphics, final int x, final int y) { + private static void renderItemErrorIcon(final GuiGraphics graphics, final int x, final int y) { graphics.blitSprite( ERROR, x + 73 - ERROR_SIZE - 3, @@ -285,18 +287,17 @@ private static void renderElementErrorIcon(final GuiGraphics graphics, final int ); } - private List getElementTooltip(final AutocraftingTaskStatus.Element element, - final ResourceRendering rendering) { - final List tooltip = rendering.getTooltip(element.resource()).stream() + private List getItemTooltip(final TaskStatus.Item item, final ResourceRendering rendering) { + final List tooltip = rendering.getTooltip(item.resource()).stream() .map(Component::getVisualOrderText) .collect(Collectors.toList()); - if (element.type() != AutocraftingTaskStatus.ElementType.NORMAL) { - tooltip.add(getErrorTooltip(element.type()).getVisualOrderText()); + if (item.type() != TaskStatus.ItemType.NORMAL) { + tooltip.add(getErrorTooltip(item.type()).getVisualOrderText()); } return tooltip; } - private Component getErrorTooltip(final AutocraftingTaskStatus.ElementType type) { + private Component getErrorTooltip(final TaskStatus.ItemType type) { return switch (type) { case MACHINE_DOES_NOT_ACCEPT_RESOURCE -> MACHINE_DOES_NOT_ACCEPT_RESOURCE; case NO_MACHINE_FOUND -> NO_MACHINE_FOUND; @@ -305,39 +306,39 @@ private Component getErrorTooltip(final AutocraftingTaskStatus.ElementType type) }; } - private void renderElementText(final GuiGraphics graphics, - final AutocraftingTaskStatus.Element element, - final ResourceRendering rendering, - final int x, - final int y) { + private void renderItemText(final GuiGraphics graphics, + final TaskStatus.Item item, + final ResourceRendering rendering, + final int x, + final int y) { int yy = y; - if (element.stored() > 0) { - renderElementText(graphics, "stored", rendering, x, yy, element.missing()); + if (item.stored() > 0) { + renderItemText(graphics, "stored", rendering, x, yy, item.missing()); yy += 7; } - if (element.missing() > 0) { - renderElementText(graphics, "missing", rendering, x, yy, element.missing()); + if (item.missing() > 0) { + renderItemText(graphics, "missing", rendering, x, yy, item.missing()); yy += 7; } - if (element.processing() > 0) { - renderElementText(graphics, "processing", rendering, x, yy, element.processing()); + if (item.processing() > 0) { + renderItemText(graphics, "processing", rendering, x, yy, item.processing()); yy += 7; } - if (element.scheduled() > 0) { - renderElementText(graphics, "scheduled", rendering, x, yy, element.scheduled()); + if (item.scheduled() > 0) { + renderItemText(graphics, "scheduled", rendering, x, yy, item.scheduled()); yy += 7; } - if (element.crafting() > 0) { - renderElementText(graphics, "crafting", rendering, x, yy, element.crafting()); + if (item.crafting() > 0) { + renderItemText(graphics, "crafting", rendering, x, yy, item.crafting()); } } - private void renderElementText(final GuiGraphics graphics, - final String type, - final ResourceRendering rendering, - final int x, - final int y, - final long amount) { + private void renderItemText(final GuiGraphics graphics, + final String type, + final ResourceRendering rendering, + final int x, + final int y, + final long amount) { SmallText.render( graphics, font, @@ -352,8 +353,8 @@ private void renderElementText(final GuiGraphics graphics, @Override public boolean mouseClicked(final double mouseX, final double mouseY, final int clickedButton) { - if (taskElementsScrollbar != null - && taskElementsScrollbar.mouseClicked(mouseX, mouseY, clickedButton)) { + if (taskItemsScrollbar != null + && taskItemsScrollbar.mouseClicked(mouseX, mouseY, clickedButton)) { return true; } if (taskButtonsScrollbar != null && taskButtonsScrollbar.mouseClicked(mouseX, mouseY, clickedButton)) { @@ -364,8 +365,8 @@ public boolean mouseClicked(final double mouseX, final double mouseY, final int @Override public void mouseMoved(final double mx, final double my) { - if (taskElementsScrollbar != null) { - taskElementsScrollbar.mouseMoved(mx, my); + if (taskItemsScrollbar != null) { + taskItemsScrollbar.mouseMoved(mx, my); } if (taskButtonsScrollbar != null) { taskButtonsScrollbar.mouseMoved(mx, my); @@ -375,7 +376,7 @@ public void mouseMoved(final double mx, final double my) { @Override public boolean mouseReleased(final double mx, final double my, final int button) { - if (taskElementsScrollbar != null && taskElementsScrollbar.mouseReleased(mx, my, button)) { + if (taskItemsScrollbar != null && taskItemsScrollbar.mouseReleased(mx, my, button)) { return true; } if (taskButtonsScrollbar != null && taskButtonsScrollbar.mouseReleased(mx, my, button)) { @@ -386,24 +387,24 @@ public boolean mouseReleased(final double mx, final double my, final int button) @Override public boolean mouseScrolled(final double x, final double y, final double z, final double delta) { - final boolean didTaskElementsScrollbar = taskElementsScrollbar != null - && isHoveringOverTaskElements(x, y) - && taskElementsScrollbar.mouseScrolled(x, y, z, delta); - final boolean didTaskButtonsScrollbar = !didTaskElementsScrollbar + final boolean didTaskItemsScrollbar = taskItemsScrollbar != null + && isHoveringOverItems(x, y) + && taskItemsScrollbar.mouseScrolled(x, y, z, delta); + final boolean didTaskButtonsScrollbar = !didTaskItemsScrollbar && taskButtonsScrollbar != null && isHoveringOverTaskButtons(x, y) && taskButtonsScrollbar.mouseScrolled(x, y, z, delta); - return didTaskElementsScrollbar || didTaskButtonsScrollbar || super.mouseScrolled(x, y, z, delta); + return didTaskItemsScrollbar || didTaskButtonsScrollbar || super.mouseScrolled(x, y, z, delta); } - private boolean isHoveringOverTaskElements(final double x, final double y) { - return isHovering(8, 20, 221, ELEMENTS_AREA_HEIGHT, x, y); + private boolean isHoveringOverItems(final double x, final double y) { + return isHovering(8, 20, 221, ITEMS_AREA_HEIGHT, x, y); } private boolean isHoveringOverTaskButtons(final double x, final double y) { final int tasksInnerX = getTaskButtonsInnerX() - 1; final int tasksInnerY = getTaskButtonsInnerY() - 1; - return isHovering(tasksInnerX - leftPos, tasksInnerY - topPos, 80, 98, x, y); + return isHovering(tasksInnerX - leftPos, tasksInnerY - topPos, 80, 170, x, y); } private int getTaskButtonsInnerY() { @@ -437,28 +438,56 @@ protected ResourceLocation getTexture() { } @Override - public void taskChanged(@Nullable final AutocraftingTaskStatus.Id taskId, - final List elements) { + public void currentTaskChanged(@Nullable final TaskStatus taskStatus) { if (cancelButton != null) { - cancelButton.active = taskId != null; + cancelButton.active = taskStatus != null; } if (cancelAllButton != null) { - cancelAllButton.active = taskId != null; + cancelAllButton.active = !menu.getTasks().isEmpty(); } for (final AutocraftingTaskButton taskButton : taskButtons) { - taskButton.active = taskButton.getTaskId() != taskId; + taskButton.active = taskStatus == null || !taskButton.getTaskId().equals(taskStatus.info().id()); } - if (taskElementsScrollbar == null) { + if (taskItemsScrollbar == null) { return; } - if (taskId == null) { - taskElementsScrollbar.setEnabled(false); - taskElementsScrollbar.setMaxOffset(0); + if (taskStatus == null) { + taskItemsScrollbar.setEnabled(false); + taskItemsScrollbar.setMaxOffset(0); return; } - final int items = elements.size(); + final int items = taskStatus.items().size(); final int rows = Math.ceilDiv(items, COLUMNS) - ROWS_VISIBLE; - taskElementsScrollbar.setMaxOffset(taskElementsScrollbar.isSmoothScrolling() ? rows * ROW_HEIGHT : rows); - taskElementsScrollbar.setEnabled(rows > 0); + taskItemsScrollbar.setMaxOffset(taskItemsScrollbar.isSmoothScrolling() ? rows * ROW_HEIGHT : rows); + taskItemsScrollbar.setEnabled(rows > 0); + } + + @Override + public void taskAdded(final TaskStatus taskStatus) { + updateTaskButtonsScrollbar(); + final int buttonY = getTaskButtonY(getMenu().getTasks().size() - 1); + final AutocraftingTaskButton button = new AutocraftingTaskButton( + getTaskButtonsInnerX(), + buttonY, + taskStatus.info(), + menu::setCurrentTaskId, + menu::getPercentageCompleted + ); + button.visible = isTaskButtonVisible(buttonY); + taskButtons.add(addWidget(button)); + } + + @Override + public void taskRemoved(final TaskId taskId) { + updateTaskButtonsScrollbar(); + taskButtons.stream().filter(b -> b.getTaskId().equals(taskId)).findFirst().ifPresent(button -> { + removeWidget(button); + taskButtons.remove(button); + }); + for (int i = 0; i < taskButtons.size(); i++) { + final AutocraftingTaskButton button = taskButtons.get(i); + button.setY(getTaskButtonY(i)); + button.visible = isTaskButtonVisible(button.getY()); + } } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorStreamCodecs.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorStreamCodecs.java new file mode 100644 index 000000000..24f2d8ce9 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorStreamCodecs.java @@ -0,0 +1,72 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.support.resource.ResourceCodecs; +import com.refinedmods.refinedstorage.common.util.PlatformUtil; + +import java.util.ArrayList; + +import io.netty.buffer.ByteBuf; +import net.minecraft.core.UUIDUtil; +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; + +public final class AutocraftingMonitorStreamCodecs { + public static final StreamCodec TASK_ID_STREAM_CODEC = StreamCodec.composite( + UUIDUtil.STREAM_CODEC, TaskId::id, + TaskId::new + ); + private static final StreamCodec STATUS_ITEM_STREAM_CODEC = + new StatusItemStreamCodec(); + private static final StreamCodec INFO_STREAM_CODEC = + StreamCodec.composite( + TASK_ID_STREAM_CODEC, TaskStatus.TaskInfo::id, + ResourceCodecs.STREAM_CODEC, s -> (PlatformResourceKey) s.resource(), + ByteBufCodecs.VAR_LONG, TaskStatus.TaskInfo::amount, + ByteBufCodecs.VAR_LONG, TaskStatus.TaskInfo::startTime, + TaskStatus.TaskInfo::new + ); + public static final StreamCodec STATUS_STREAM_CODEC = + StreamCodec.composite( + INFO_STREAM_CODEC, TaskStatus::info, + ByteBufCodecs.FLOAT, TaskStatus::percentageCompleted, + ByteBufCodecs.collection(ArrayList::new, STATUS_ITEM_STREAM_CODEC), TaskStatus::items, + TaskStatus::new + ); + + private AutocraftingMonitorStreamCodecs() { + } + + private static class StatusItemStreamCodec implements StreamCodec { + private static final StreamCodec TYPE_STREAM_CODEC = PlatformUtil.enumStreamCodec( + TaskStatus.ItemType.values() + ); + + @Override + public TaskStatus.Item decode(final RegistryFriendlyByteBuf buf) { + return new TaskStatus.Item( + TYPE_STREAM_CODEC.decode(buf), + ResourceCodecs.STREAM_CODEC.decode(buf), + buf.readLong(), + buf.readLong(), + buf.readLong(), + buf.readLong(), + buf.readLong() + ); + } + + @Override + public void encode(final RegistryFriendlyByteBuf buf, final TaskStatus.Item item) { + TYPE_STREAM_CODEC.encode(buf, item.type()); + ResourceCodecs.STREAM_CODEC.encode(buf, (PlatformResourceKey) item.resource()); + buf.writeLong(item.stored()); + buf.writeLong(item.missing()); + buf.writeLong(item.processing()); + buf.writeLong(item.scheduled()); + buf.writeLong(item.crafting()); + } + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingTaskButton.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingTaskButton.java index 14574ff70..cf6036ada 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingTaskButton.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingTaskButton.java @@ -1,9 +1,11 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; -import com.refinedmods.refinedstorage.api.autocrafting.status.AutocraftingTaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering; +import com.refinedmods.refinedstorage.common.support.ResourceSlotRendering; import com.refinedmods.refinedstorage.common.support.tooltip.SmallText; import com.refinedmods.refinedstorage.common.support.widget.TextMarquee; @@ -21,30 +23,33 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; class AutocraftingTaskButton extends AbstractButton { - private final AutocraftingTaskStatus.Id taskId; + private final TaskStatus.TaskInfo task; private final TextMarquee text; - private final Consumer onPress; + private final Consumer onPress; + private final PercentageCompletedProvider percentageCompletedProvider; AutocraftingTaskButton(final int x, final int y, - final AutocraftingTaskStatus.Id taskId, - final Consumer onPress) { + final TaskStatus.TaskInfo task, + final Consumer onPress, + final PercentageCompletedProvider percentageCompletedProvider) { super(x, y, TASK_BUTTON_WIDTH, TASK_BUTTON_HEIGHT, Component.empty()); - this.taskId = taskId; - final ResourceKey resource = taskId.resource(); + this.task = task; + final ResourceKey resource = task.resource(); final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(resource.getClass()); - this.text = new TextMarquee(Component.literal(rendering.formatAmount(taskId.amount(), true)) - .append(" ") - .append(rendering.getDisplayName(resource)), + this.text = new TextMarquee( + rendering.getDisplayName(resource), TASK_BUTTON_WIDTH - 16 - 4 - 4 - 4, 0xFFFFFF, true, - true); + true + ); this.onPress = onPress; + this.percentageCompletedProvider = percentageCompletedProvider; } - AutocraftingTaskStatus.Id getTaskId() { - return taskId; + TaskId getTaskId() { + return task.id(); } @Override @@ -53,18 +58,27 @@ protected void renderWidget(final GuiGraphics graphics, final int mouseY, final float partialTick) { super.renderWidget(graphics, mouseX, mouseY, partialTick); - final ResourceKey resource = taskId.resource(); - final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(resource.getClass()); - rendering.render(resource, graphics, getX() + 3, getY() + 4); + renderResourceIcon(graphics); final int yOffset = SmallText.isSmall() ? 5 : 3; final int textX = getX() + 3 + 16 + 3; final int textY = getY() + yOffset; text.render(graphics, textX, textY, Minecraft.getInstance().font, isHovered); final int ySpacing = SmallText.isSmall() ? 7 : 8; - SmallText.render(graphics, Minecraft.getInstance().font, "69%", textX, textY + ySpacing, 0xFFFFFF, true); + final int percentageCompleted = Math.round(percentageCompletedProvider.getPercentageCompleted(task.id()) * 100); + SmallText.render(graphics, Minecraft.getInstance().font, percentageCompleted + "%", textX, textY + ySpacing, + 0xFFFFFF, true); updateTooltip(); } + private void renderResourceIcon(final GuiGraphics graphics) { + final ResourceKey resource = task.resource(); + final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(resource.getClass()); + final int resourceX = getX() + 3; + final int resourceY = getY() + 4; + rendering.render(resource, graphics, resourceX, resourceY); + ResourceSlotRendering.renderAmount(graphics, resourceX, resourceY, task.amount(), rendering); + } + private void updateTooltip() { if (isHovered) { final String runningTime = getRunningTimeText(); @@ -77,7 +91,7 @@ private void updateTooltip() { } private String getRunningTimeText() { - final int totalSecs = (int) (System.currentTimeMillis() - taskId.startTime()) / 1000; + final int totalSecs = (int) (System.currentTimeMillis() - task.startTime()) / 1000; final int hours = totalSecs / 3600; final int minutes = (totalSecs % 3600) / 60; final int seconds = totalSecs % 60; @@ -92,11 +106,15 @@ private String getRunningTimeText() { @Override public void onPress() { - onPress.accept(taskId); + onPress.accept(task.id()); } @Override protected void updateWidgetNarration(final NarrationElementOutput narrationElementOutput) { // no op } + + interface PercentageCompletedProvider { + float getPercentageCompleted(TaskId taskId); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java new file mode 100644 index 000000000..23ff57450 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java @@ -0,0 +1,121 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Random; +import java.util.Set; +import java.util.UUID; + +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; + +class TaskStatusProviderImpl implements TaskStatusProvider { + private static final Item[] ITEM_SET = new Item[] { + Items.DIRT, + Items.DIAMOND, + Items.GOLD_INGOT, + Items.ACACIA_WOOD, + Items.BEEHIVE + }; + + private final List statuses = new ArrayList<>(); + private final Set listeners = new HashSet<>(); + private final Random r = new Random(); + private int ticks; + + @Override + public List getStatuses() { + return Collections.unmodifiableList(statuses); + } + + @Override + public void addListener(final TaskStatusListener listener) { + listeners.add(listener); + } + + @Override + public void removeListener(final TaskStatusListener listener) { + listeners.remove(listener); + } + + @Override + public void cancel(final TaskId taskId) { + final TaskStatus status = statuses.stream() + .filter(s -> s.info().id().equals(taskId)) + .findFirst() + .orElse(null); + if (status != null) { + statuses.remove(status); + listeners.forEach(l -> l.taskRemoved(taskId)); + } + } + + @Override + public void cancelAll() { + final List copy = new ArrayList<>(statuses); + statuses.clear(); + copy.forEach(s -> listeners.forEach(l -> l.taskRemoved(s.info().id()))); + } + + void testTick() { + if (ticks++ % 10 != 0) { + return; + } + final int chance = r.nextInt(100); + if (chance < 50) { + final TaskStatus status = generateTaskStatus(); + statuses.add(status); + listeners.forEach(l -> l.taskAdded(status)); + } else if (chance < 85 && !statuses.isEmpty()) { + final int idx = r.nextInt(statuses.size()); + final TaskStatus status = statuses.get(idx); + final TaskStatus updated = new TaskStatus( + status.info(), + r.nextFloat(), + generateTaskStatus().items() + ); + statuses.set(idx, updated); + listeners.forEach(l -> l.taskStatusChanged(updated)); + } else if (chance > 85 && !statuses.isEmpty()) { + final int idx = r.nextInt(statuses.size()); + final TaskStatus status = statuses.remove(idx); + listeners.forEach(l -> l.taskRemoved(status.info().id())); + } + } + + private TaskStatus generateTaskStatus() { + final TaskStatus.TaskInfo taskInfo = new TaskStatus.TaskInfo( + new TaskId(UUID.randomUUID()), + ItemResource.ofItemStack(new ItemStack(ITEM_SET[r.nextInt(ITEM_SET.length)])), + 5 + r.nextInt(32), + System.currentTimeMillis() + ); + final float pct = r.nextFloat(); + final List items = new ArrayList<>(); + for (int i = 0; i < 3 + r.nextInt(30); i++) { + final int typeIdx = r.nextInt(TaskStatus.ItemType.values().length); + final TaskStatus.ItemType type = TaskStatus.ItemType.values()[typeIdx]; + final int idx = r.nextInt(5); + final int amount = 2 + r.nextInt(20); + items.add(new TaskStatus.Item( + type, + ItemResource.ofItemStack(new ItemStack(ITEM_SET[r.nextInt(ITEM_SET.length)])), + idx == 0 ? amount : 0, + idx == 1 ? amount : 0, + idx == 2 ? amount : 0, + idx == 3 ? amount : 0, + idx == 4 ? amount : 0 + )); + } + return new TaskStatus(taskInfo, pct, items); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewContainerMenu.java index 761ef1ae1..5bc763e4b 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewContainerMenu.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.autocrafting.preview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceContainer; import com.refinedmods.refinedstorage.common.support.containermenu.AbstractResourceContainerMenu; @@ -70,7 +70,7 @@ void amountChanged(final double amount) { } } - public void previewResponseReceived(final UUID id, final AutocraftingPreview preview) { + public void previewResponseReceived(final UUID id, final Preview preview) { if (!currentRequest.getId().equals(id)) { return; } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java index 1d3fb99f7..f2c528fbb 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java @@ -1,13 +1,13 @@ package com.refinedmods.refinedstorage.common.autocrafting.preview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import javax.annotation.Nullable; interface AutocraftingPreviewListener { void requestChanged(AutocraftingRequest request); - void previewChanged(@Nullable AutocraftingPreview preview); + void previewChanged(@Nullable Preview preview); void requestRemoved(AutocraftingRequest request, boolean last); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewScreen.java index de474f0b6..80e1b91db 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewScreen.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.common.autocrafting.preview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewItem; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewType; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewItem; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewType; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage.common.support.amount.AbstractAmountScreen; @@ -192,7 +192,7 @@ private void setRequest(final AutocraftingRequest request) { setPreview(request.getPreview()); } - private void setPreview(@Nullable final AutocraftingPreview preview) { + private void setPreview(@Nullable final Preview preview) { if (previewItemsScrollbar == null || confirmButton == null) { return; } @@ -207,9 +207,9 @@ private void setPreview(@Nullable final AutocraftingPreview preview) { previewItemsScrollbar.setMaxOffset(previewItemsScrollbar.isSmoothScrolling() ? rows * ROW_HEIGHT : rows); previewItemsScrollbar.setEnabled(rows > 0); confirmButton.setMessage(START); - confirmButton.active = preview.type() == AutocraftingPreviewType.SUCCESS; - confirmButton.setError(preview.type() != AutocraftingPreviewType.SUCCESS); - confirmButton.setTooltip(preview.type() == AutocraftingPreviewType.MISSING_RESOURCES + confirmButton.active = preview.type() == PreviewType.SUCCESS; + confirmButton.setError(preview.type() != PreviewType.SUCCESS); + confirmButton.setTooltip(preview.type() == PreviewType.MISSING_RESOURCES ? Tooltip.create(MISSING_RESOURCES) : null); } @@ -247,14 +247,14 @@ protected void renderBg(final GuiGraphics graphics, final float delta, final int REQUESTS_HEIGHT); } final AutocraftingRequest request = getMenu().getCurrentRequest(); - final AutocraftingPreview preview = request.getPreview(); + final Preview preview = request.getPreview(); if (preview == null || previewItemsScrollbar == null) { return; } final int x = leftPos + 8; final int y = topPos + 98; graphics.enableScissor(x, y, x + 221, y + PREVIEW_AREA_HEIGHT); - final List items = preview.items(); + final List items = preview.items(); final int rows = Math.ceilDiv(items.size(), COLUMNS); for (int i = 0; i < rows; ++i) { final int scrollOffset = previewItemsScrollbar.isSmoothScrolling() @@ -270,7 +270,7 @@ private void renderRow(final GuiGraphics graphics, final int x, final int y, final int i, - final List items, + final List items, final double mouseX, final double mouseY) { if (y <= topPos + 98 - ROW_HEIGHT || y > topPos + 98 + PREVIEW_AREA_HEIGHT) { @@ -278,7 +278,7 @@ private void renderRow(final GuiGraphics graphics, } graphics.blitSprite(ROW, x, y, ROW_WIDTH, ROW_HEIGHT); for (int column = i * COLUMNS; column < Math.min(i * COLUMNS + COLUMNS, items.size()); ++column) { - final AutocraftingPreviewItem item = items.get(column); + final PreviewItem item = items.get(column); final int xx = x + (column % COLUMNS) * 74; renderCell(graphics, xx, y, item, mouseX, mouseY); } @@ -287,7 +287,7 @@ private void renderRow(final GuiGraphics graphics, private void renderCell(final GuiGraphics graphics, final int x, final int y, - final AutocraftingPreviewItem item, + final PreviewItem item, final double mouseX, final double mouseY) { if (item.missing() > 0) { @@ -462,7 +462,7 @@ public void requestChanged(final AutocraftingRequest request) { } @Override - public void previewChanged(@Nullable final AutocraftingPreview preview) { + public void previewChanged(@Nullable final Preview preview) { setPreview(preview); } @@ -472,7 +472,10 @@ public void requestRemoved(final AutocraftingRequest request, final boolean last close(); return; } - requestButtons.removeIf(requestButton -> requestButton.getRequest() == request); + requestButtons.stream().filter(btn -> btn.getRequest() == request).findFirst().ifPresent(btn -> { + removeWidget(btn); + requestButtons.remove(btn); + }); updateRequestsScrollbar(); for (int i = 0; i < requestButtons.size(); ++i) { final AutocraftingRequestButton requestButton = requestButtons.get(i); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java index 14c0db7d6..49cd311c1 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.autocrafting.preview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; @@ -14,7 +14,7 @@ public class AutocraftingRequest { private final ResourceKey resource; private final double amount; @Nullable - private AutocraftingPreview preview; + private Preview preview; private long pendingPreviewAmount; private AutocraftingRequest(final UUID id, final ResourceKey resource, final double amount) { @@ -44,7 +44,7 @@ boolean sendPreviewRequest(final double previewAmount) { return true; } - void previewResponseReceived(final AutocraftingPreview previewReceived) { + void previewResponseReceived(final Preview previewReceived) { this.pendingPreviewAmount = 0; this.preview = previewReceived; } @@ -70,7 +70,7 @@ ResourceKey getResource() { } @Nullable - AutocraftingPreview getPreview() { + Preview getPreview() { return preview; } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequestButton.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequestButton.java index 050bdc89a..dadb6d171 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequestButton.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequestButton.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering; +import com.refinedmods.refinedstorage.common.support.ResourceSlotRendering; import com.refinedmods.refinedstorage.common.support.tooltip.SmallText; import com.refinedmods.refinedstorage.common.support.widget.TextMarquee; @@ -30,17 +31,14 @@ class AutocraftingRequestButton extends AbstractButton { super(x, y, REQUEST_BUTTON_WIDTH, REQUEST_BUTTON_HEIGHT, Component.empty()); this.request = request; final ResourceKey resource = request.getResource(); - final long normalizedAmount = resource instanceof PlatformResourceKey platformResourceKey - ? platformResourceKey.getResourceType().normalizeAmount(request.getAmount()) - : 0; final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(resource.getClass()); - this.text = new TextMarquee(Component.literal(rendering.formatAmount(normalizedAmount, true)) - .append(" ") - .append(rendering.getDisplayName(resource)), + this.text = new TextMarquee( + rendering.getDisplayName(resource), REQUEST_BUTTON_WIDTH - 16 - 4 - 4 - 4, 0xFFFFFF, true, - true); + true + ); this.onPress = onPress; } @@ -54,13 +52,23 @@ protected void renderWidget(final GuiGraphics graphics, final int mouseY, final float partialTick) { super.renderWidget(graphics, mouseX, mouseY, partialTick); - final ResourceKey resource = request.getResource(); - final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(resource.getClass()); - rendering.render(resource, graphics, getX() + 3, getY() + 4); + renderResourceIcon(graphics); final int yOffset = SmallText.isSmall() ? 8 : 5; text.render(graphics, getX() + 3 + 16 + 3, getY() + yOffset, Minecraft.getInstance().font, isHovered); } + private void renderResourceIcon(final GuiGraphics graphics) { + final ResourceKey resource = request.getResource(); + final ResourceRendering rendering = RefinedStorageApi.INSTANCE.getResourceRendering(resource.getClass()); + final int resourceX = getX() + 3; + final int resourceY = getY() + 4; + rendering.render(resource, graphics, resourceX, resourceY); + final long normalizedAmount = resource instanceof PlatformResourceKey platformResourceKey + ? platformResourceKey.getResourceType().normalizeAmount(request.getAmount()) + : 0; + ResourceSlotRendering.renderAmount(graphics, resourceX, resourceY, normalizedAmount, rendering); + } + @Override public void onPress() { onPress.accept(request); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java index 534a09739..bb1180725 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridBlockEntity.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.grid; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage.api.grid.watcher.GridWatcher; import com.refinedmods.refinedstorage.api.network.Network; @@ -101,7 +101,7 @@ public void removeWatcher(final GridWatcher watcher) { } @Override - public Optional getPreview(final ResourceKey resource, final long amount) { + public Optional getPreview(final ResourceKey resource, final long amount) { return Optional.ofNullable(mainNetworkNode.getNetwork()) .map(network -> network.getComponent(AutocraftingNetworkComponent.class)) .flatMap(component -> component.getPreview(resource, amount)); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java index 63b35dcf8..2f9c52dfa 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.grid; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepository; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepositoryImpl; @@ -62,7 +62,7 @@ public abstract class AbstractGridContainerMenu extends AbstractResourceContainerMenu implements GridWatcher, GridInsertionStrategy, GridExtractionStrategy, GridScrollingStrategy, ScreenSizeListener, - AutocraftingPreviewProvider { + PreviewProvider { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractGridContainerMenu.class); private static final GridQueryParserImpl QUERY_PARSER = new GridQueryParserImpl( LexerTokenMappings.DEFAULT_MAPPINGS, @@ -489,7 +489,7 @@ protected ResourceKey getResourceForAutocraftableHint(final Slot slot) { } @Override - public Optional getPreview(final ResourceKey resource, final long amount) { + public Optional getPreview(final ResourceKey resource, final long amount) { return requireNonNull(grid).getPreview(resource, amount); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java index 37389c5a3..e824e73f2 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.grid; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage.api.grid.operations.NoopGridOperations; import com.refinedmods.refinedstorage.api.grid.watcher.GridWatcher; @@ -105,7 +105,7 @@ private GridOperations createGridOperations(final ResourceType resourceType, } @Override - public Optional getPreview(final ResourceKey resource, final long amount) { + public Optional getPreview(final ResourceKey resource, final long amount) { return context.resolveNetwork() .map(network -> network.getComponent(AutocraftingNetworkComponent.class)) .flatMap(component -> component.getPreview(resource, amount)); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/portablegrid/PortableGrid.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/portablegrid/PortableGrid.java index b9757d581..87df2e7ae 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/portablegrid/PortableGrid.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/portablegrid/PortableGrid.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.storage.portablegrid; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import com.refinedmods.refinedstorage.api.core.Action; import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; import com.refinedmods.refinedstorage.api.grid.operations.NoopGridOperations; @@ -131,7 +131,7 @@ public GridOperations createOperations(final ResourceType resourceType, final Se } @Override - public Optional getPreview(final ResourceKey resource, final long amount) { + public Optional getPreview(final ResourceKey resource, final long amount) { return Optional.empty(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/AutocraftingStorageMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/AutocraftingStorageMonitorContainerMenu.java index 976400998..edee1c301 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/AutocraftingStorageMonitorContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/AutocraftingStorageMonitorContainerMenu.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.storagemonitor; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; @@ -16,7 +16,7 @@ import static java.util.Objects.requireNonNull; public class AutocraftingStorageMonitorContainerMenu extends AutocraftingPreviewContainerMenu - implements AutocraftingPreviewProvider { + implements PreviewProvider { @Nullable private final StorageMonitorBlockEntity storageMonitor; @@ -39,7 +39,7 @@ private static List getRequests(final PlatformResourceKey r } @Override - public Optional getPreview(final ResourceKey resource, final long amount) { + public Optional getPreview(final ResourceKey resource, final long amount) { return requireNonNull(storageMonitor).getPreview(resource, amount); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/StorageMonitorBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/StorageMonitorBlockEntity.java index a13e72655..d3b078ab7 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/StorageMonitorBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storagemonitor/StorageMonitorBlockEntity.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.storagemonitor; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.api.network.Network; import com.refinedmods.refinedstorage.api.network.autocrafting.AutocraftingNetworkComponent; import com.refinedmods.refinedstorage.api.network.impl.node.SimpleNetworkNode; @@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory; public class StorageMonitorBlockEntity extends AbstractBaseNetworkNodeContainerBlockEntity - implements NetworkNodeExtendedMenuProvider, AutocraftingPreviewProvider { + implements NetworkNodeExtendedMenuProvider, PreviewProvider { private static final Logger LOGGER = LoggerFactory.getLogger(StorageMonitorBlockEntity.class); private static final String TAG_CLIENT_FILTER = "cf"; @@ -367,7 +367,7 @@ protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState } @Override - public Optional getPreview(final ResourceKey resource, final long amount) { + public Optional getPreview(final ResourceKey resource, final long amount) { return Optional.ofNullable(mainNetworkNode.getNetwork()) .map(network -> network.getComponent(AutocraftingNetworkComponent.class)) .flatMap(component -> component.getPreview(resource, amount)); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelAllPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelAllPacket.java new file mode 100644 index 000000000..94b07741e --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelAllPacket.java @@ -0,0 +1,30 @@ +package com.refinedmods.refinedstorage.common.support.packet.c2s; + +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.support.packet.PacketContext; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public record AutocraftingMonitorCancelAllPacket() implements CustomPacketPayload { + public static final Type PACKET_TYPE = new Type<>( + createIdentifier("autocrafting_monitor_cancel_all") + ); + public static final AutocraftingMonitorCancelAllPacket INSTANCE = new AutocraftingMonitorCancelAllPacket(); + public static final StreamCodec STREAM_CODEC = + StreamCodec.unit(INSTANCE); + + public static void handle(final PacketContext ctx) { + if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + containerMenu.cancelAllTasks(); + } + } + + @Override + public Type type() { + return PACKET_TYPE; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelPacket.java new file mode 100644 index 000000000..27f5dd090 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelPacket.java @@ -0,0 +1,34 @@ +package com.refinedmods.refinedstorage.common.support.packet.c2s; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorStreamCodecs; +import com.refinedmods.refinedstorage.common.support.packet.PacketContext; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public record AutocraftingMonitorCancelPacket(TaskId taskId) implements CustomPacketPayload { + public static final Type PACKET_TYPE = new Type<>( + createIdentifier("autocrafting_monitor_cancel") + ); + public static final StreamCodec STREAM_CODEC = + StreamCodec.composite( + AutocraftingMonitorStreamCodecs.TASK_ID_STREAM_CODEC, AutocraftingMonitorCancelPacket::taskId, + AutocraftingMonitorCancelPacket::new + ); + + public static void handle(final AutocraftingMonitorCancelPacket packet, final PacketContext ctx) { + if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + containerMenu.cancelTask(packet.taskId()); + } + } + + @Override + public Type type() { + return PACKET_TYPE; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingPreviewRequestPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingPreviewRequestPacket.java index b08a6c3b6..2da3a407e 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingPreviewRequestPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingPreviewRequestPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; import com.refinedmods.refinedstorage.common.support.packet.s2c.S2CPackets; @@ -34,7 +34,7 @@ public record AutocraftingPreviewRequestPacket(UUID id, ); public static void handle(final AutocraftingPreviewRequestPacket packet, final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof AutocraftingPreviewProvider provider) { + if (ctx.getPlayer().containerMenu instanceof PreviewProvider provider) { final ServerPlayer player = (ServerPlayer) ctx.getPlayer(); provider.getPreview(packet.resource(), packet.amount()).ifPresent( preview -> S2CPackets.sendAutocraftingPreviewResponse(player, packet.id, preview) diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingRequestPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingRequestPacket.java index 095a430ae..b8383f997 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingRequestPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingRequestPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; import com.refinedmods.refinedstorage.common.support.packet.s2c.S2CPackets; @@ -24,16 +24,15 @@ public record AutocraftingRequestPacket(UUID id, createIdentifier("autocrafting_request") ); public static final StreamCodec STREAM_CODEC = - StreamCodec - .composite( - UUIDUtil.STREAM_CODEC, AutocraftingRequestPacket::id, - ResourceCodecs.STREAM_CODEC, AutocraftingRequestPacket::resource, - ByteBufCodecs.VAR_LONG, AutocraftingRequestPacket::amount, - AutocraftingRequestPacket::new - ); + StreamCodec.composite( + UUIDUtil.STREAM_CODEC, AutocraftingRequestPacket::id, + ResourceCodecs.STREAM_CODEC, AutocraftingRequestPacket::resource, + ByteBufCodecs.VAR_LONG, AutocraftingRequestPacket::amount, + AutocraftingRequestPacket::new + ); public static void handle(final AutocraftingRequestPacket packet, final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof AutocraftingPreviewProvider provider) { + if (ctx.getPlayer().containerMenu instanceof PreviewProvider provider) { final boolean started = provider.startTask(packet.resource(), packet.amount()); S2CPackets.sendAutocraftingResponse((ServerPlayer) ctx.getPlayer(), packet.id, started); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/C2SPackets.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/C2SPackets.java index 9737e798b..96bb861b9 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/C2SPackets.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/C2SPackets.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; import com.refinedmods.refinedstorage.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; @@ -143,4 +144,12 @@ public static void sendAutocraftingRequest(final UUID id, final long amount) { Platform.INSTANCE.sendPacketToServer(new AutocraftingRequestPacket(id, resource, amount)); } + + public static void sendAutocraftingMonitorCancel(final TaskId taskId) { + Platform.INSTANCE.sendPacketToServer(new AutocraftingMonitorCancelPacket(taskId)); + } + + public static void sendAutocraftingMonitorCancelAll() { + Platform.INSTANCE.sendPacketToServer(AutocraftingMonitorCancelAllPacket.INSTANCE); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskAddedPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskAddedPacket.java new file mode 100644 index 000000000..508538305 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskAddedPacket.java @@ -0,0 +1,36 @@ +package com.refinedmods.refinedstorage.common.support.packet.s2c; + +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorStreamCodecs; +import com.refinedmods.refinedstorage.common.support.packet.PacketContext; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public record AutocraftingMonitorTaskAddedPacket(TaskStatus taskStatus) implements CustomPacketPayload { + public static final Type PACKET_TYPE = new Type<>( + createIdentifier("autocrafting_monitor_task_added") + ); + + public static final StreamCodec STREAM_CODEC = + StreamCodec.composite( + AutocraftingMonitorStreamCodecs.STATUS_STREAM_CODEC, AutocraftingMonitorTaskAddedPacket::taskStatus, + AutocraftingMonitorTaskAddedPacket::new + ); + + public static void handle(final AutocraftingMonitorTaskAddedPacket packet, final PacketContext ctx) { + if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + containerMenu.taskAdded(packet.taskStatus()); + } + } + + @Override + public Type type() { + return PACKET_TYPE; + } +} + diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskRemovedPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskRemovedPacket.java new file mode 100644 index 000000000..2363eecea --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskRemovedPacket.java @@ -0,0 +1,36 @@ +package com.refinedmods.refinedstorage.common.support.packet.s2c; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorStreamCodecs; +import com.refinedmods.refinedstorage.common.support.packet.PacketContext; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public record AutocraftingMonitorTaskRemovedPacket(TaskId taskId) implements CustomPacketPayload { + public static final Type PACKET_TYPE = new Type<>( + createIdentifier("autocrafting_monitor_task_removed") + ); + + public static final StreamCodec STREAM_CODEC = + StreamCodec.composite( + AutocraftingMonitorStreamCodecs.TASK_ID_STREAM_CODEC, AutocraftingMonitorTaskRemovedPacket::taskId, + AutocraftingMonitorTaskRemovedPacket::new + ); + + public static void handle(final AutocraftingMonitorTaskRemovedPacket packet, final PacketContext ctx) { + if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + containerMenu.taskRemoved(packet.taskId()); + } + } + + @Override + public Type type() { + return PACKET_TYPE; + } +} + diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskStatusChangedPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskStatusChangedPacket.java new file mode 100644 index 000000000..90e6684b3 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskStatusChangedPacket.java @@ -0,0 +1,36 @@ +package com.refinedmods.refinedstorage.common.support.packet.s2c; + +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorStreamCodecs; +import com.refinedmods.refinedstorage.common.support.packet.PacketContext; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public record AutocraftingMonitorTaskStatusChangedPacket(TaskStatus taskStatus) implements CustomPacketPayload { + public static final Type PACKET_TYPE = new Type<>( + createIdentifier("autocrafting_monitor_task_status_changed") + ); + + public static final StreamCodec STREAM_CODEC = + StreamCodec.composite( + AutocraftingMonitorStreamCodecs.STATUS_STREAM_CODEC, AutocraftingMonitorTaskStatusChangedPacket::taskStatus, + AutocraftingMonitorTaskStatusChangedPacket::new + ); + + public static void handle(final AutocraftingMonitorTaskStatusChangedPacket packet, final PacketContext ctx) { + if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + containerMenu.taskStatusChanged(packet.taskStatus()); + } + } + + @Override + public Type type() { + return PACKET_TYPE; + } +} + diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingPreviewResponsePacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingPreviewResponsePacket.java index f61c4df2d..d46a880d1 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingPreviewResponsePacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingPreviewResponsePacket.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.common.support.packet.s2c; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewItem; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewType; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewItem; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewType; import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.common.support.resource.ResourceCodecs; import com.refinedmods.refinedstorage.common.util.ClientPlatformUtil; @@ -19,23 +19,23 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; import static com.refinedmods.refinedstorage.common.util.PlatformUtil.enumStreamCodec; -public record AutocraftingPreviewResponsePacket(UUID id, AutocraftingPreview preview) implements CustomPacketPayload { +public record AutocraftingPreviewResponsePacket(UUID id, Preview preview) implements CustomPacketPayload { public static final Type PACKET_TYPE = new Type<>( createIdentifier("autocrafting_preview_response") ); - private static final StreamCodec PREVIEW_ITEM_STREAM_CODEC = + private static final StreamCodec PREVIEW_ITEM_STREAM_CODEC = StreamCodec.composite( ResourceCodecs.STREAM_CODEC, item -> (PlatformResourceKey) item.resource(), - ByteBufCodecs.VAR_LONG, AutocraftingPreviewItem::available, - ByteBufCodecs.VAR_LONG, AutocraftingPreviewItem::missing, - ByteBufCodecs.VAR_LONG, AutocraftingPreviewItem::toCraft, - AutocraftingPreviewItem::new + ByteBufCodecs.VAR_LONG, PreviewItem::available, + ByteBufCodecs.VAR_LONG, PreviewItem::missing, + ByteBufCodecs.VAR_LONG, PreviewItem::toCraft, + PreviewItem::new ); - private static final StreamCodec PREVIEW_STREAM_CODEC = + private static final StreamCodec PREVIEW_STREAM_CODEC = StreamCodec.composite( - enumStreamCodec(AutocraftingPreviewType.values()), AutocraftingPreview::type, - ByteBufCodecs.collection(ArrayList::new, PREVIEW_ITEM_STREAM_CODEC), AutocraftingPreview::items, - AutocraftingPreview::new + enumStreamCodec(PreviewType.values()), Preview::type, + ByteBufCodecs.collection(ArrayList::new, PREVIEW_ITEM_STREAM_CODEC), Preview::items, + Preview::new ); public static final StreamCodec STREAM_CODEC = StreamCodec.composite( diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java index d25475029..cc985ac1d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java @@ -1,6 +1,8 @@ package com.refinedmods.refinedstorage.common.support.packet.s2c; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.api.storage.tracked.TrackedResource; import com.refinedmods.refinedstorage.common.Platform; @@ -93,7 +95,7 @@ public static void sendAutocrafterNameUpdate(final ServerPlayer player, final Co public static void sendAutocraftingPreviewResponse(final ServerPlayer player, final UUID id, - final AutocraftingPreview preview) { + final Preview preview) { Platform.INSTANCE.sendPacketToClient(player, new AutocraftingPreviewResponsePacket(id, preview)); } @@ -102,4 +104,17 @@ public static void sendAutocraftingResponse(final ServerPlayer player, final boolean started) { Platform.INSTANCE.sendPacketToClient(player, new AutocraftingResponsePacket(id, started)); } + + public static void sendAutocraftingMonitorTaskAdded(final ServerPlayer player, final TaskStatus taskStatus) { + Platform.INSTANCE.sendPacketToClient(player, new AutocraftingMonitorTaskAddedPacket(taskStatus)); + } + + public static void sendAutocraftingMonitorTaskRemoved(final ServerPlayer player, final TaskId taskId) { + Platform.INSTANCE.sendPacketToClient(player, new AutocraftingMonitorTaskRemovedPacket(taskId)); + } + + public static void sendAutocraftingMonitorTaskStatusChanged(final ServerPlayer player, + final TaskStatus taskStatus) { + Platform.INSTANCE.sendPacketToClient(player, new AutocraftingMonitorTaskStatusChangedPacket(taskStatus)); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/ClientPlatformUtil.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/ClientPlatformUtil.java index 879bae875..12b37c339 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/ClientPlatformUtil.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/util/ClientPlatformUtil.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.util; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.common.autocrafting.preview.AutocraftingPreviewScreen; import com.refinedmods.refinedstorage.common.autocrafting.preview.AutocraftingRequest; @@ -40,7 +40,7 @@ public static void addNoPermissionToast(final Component message) { ); } - public static void autocraftingPreviewResponseReceived(final UUID id, final AutocraftingPreview preview) { + public static void autocraftingPreviewResponseReceived(final UUID id, final Preview preview) { if (Minecraft.getInstance().screen instanceof AutocraftingPreviewScreen screen) { screen.getMenu().previewResponseReceived(id, preview); } diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java index 10d49971e..0eb7ab4c9 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java @@ -21,6 +21,9 @@ import com.refinedmods.refinedstorage.common.support.packet.PacketHandler; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterManagerActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterNameUpdatePacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskAddedPacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskRemovedPacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskStatusChangedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingPreviewResponsePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingResponsePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.EnergyInfoPacket; @@ -309,6 +312,18 @@ private void registerPacketHandlers() { AutocraftingResponsePacket.PACKET_TYPE, wrapHandler((packet, ctx) -> AutocraftingResponsePacket.handle(packet)) ); + ClientPlayNetworking.registerGlobalReceiver( + AutocraftingMonitorTaskAddedPacket.PACKET_TYPE, + wrapHandler(AutocraftingMonitorTaskAddedPacket::handle) + ); + ClientPlayNetworking.registerGlobalReceiver( + AutocraftingMonitorTaskRemovedPacket.PACKET_TYPE, + wrapHandler(AutocraftingMonitorTaskRemovedPacket::handle) + ); + ClientPlayNetworking.registerGlobalReceiver( + AutocraftingMonitorTaskStatusChangedPacket.PACKET_TYPE, + wrapHandler(AutocraftingMonitorTaskStatusChangedPacket::handle) + ); } private static ClientPlayNetworking.PlayPayloadHandler wrapHandler( diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java index f04a78317..d085b482f 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java @@ -30,6 +30,8 @@ import com.refinedmods.refinedstorage.common.support.AbstractBaseBlock; import com.refinedmods.refinedstorage.common.support.packet.PacketHandler; import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocrafterNameChangePacket; +import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocraftingMonitorCancelAllPacket; +import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocraftingMonitorCancelPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocraftingPreviewRequestPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocraftingRequestPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.CraftingGridClearPacket; @@ -57,6 +59,9 @@ import com.refinedmods.refinedstorage.common.support.packet.c2s.UseSlotReferencedItemPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterManagerActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterNameUpdatePacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskAddedPacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskRemovedPacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskStatusChangedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingPreviewResponsePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingResponsePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.EnergyInfoPacket; @@ -460,6 +465,18 @@ private void registerServerToClientPackets() { AutocraftingResponsePacket.PACKET_TYPE, AutocraftingResponsePacket.STREAM_CODEC ); + PayloadTypeRegistry.playS2C().register( + AutocraftingMonitorTaskAddedPacket.PACKET_TYPE, + AutocraftingMonitorTaskAddedPacket.STREAM_CODEC + ); + PayloadTypeRegistry.playS2C().register( + AutocraftingMonitorTaskRemovedPacket.PACKET_TYPE, + AutocraftingMonitorTaskRemovedPacket.STREAM_CODEC + ); + PayloadTypeRegistry.playS2C().register( + AutocraftingMonitorTaskStatusChangedPacket.PACKET_TYPE, + AutocraftingMonitorTaskStatusChangedPacket.STREAM_CODEC + ); } private void registerClientToServerPackets() { @@ -555,6 +572,14 @@ private void registerClientToServerPackets() { AutocraftingRequestPacket.PACKET_TYPE, AutocraftingRequestPacket.STREAM_CODEC ); + PayloadTypeRegistry.playC2S().register( + AutocraftingMonitorCancelPacket.PACKET_TYPE, + AutocraftingMonitorCancelPacket.STREAM_CODEC + ); + PayloadTypeRegistry.playC2S().register( + AutocraftingMonitorCancelAllPacket.PACKET_TYPE, + AutocraftingMonitorCancelAllPacket.STREAM_CODEC + ); } private void registerPacketHandlers() { @@ -662,6 +687,14 @@ private void registerPacketHandlers() { AutocraftingRequestPacket.PACKET_TYPE, wrapHandler(AutocraftingRequestPacket::handle) ); + ServerPlayNetworking.registerGlobalReceiver( + AutocraftingMonitorCancelPacket.PACKET_TYPE, + wrapHandler(AutocraftingMonitorCancelPacket::handle) + ); + ServerPlayNetworking.registerGlobalReceiver( + AutocraftingMonitorCancelAllPacket.PACKET_TYPE, + wrapHandler((packet, ctx) -> AutocraftingMonitorCancelAllPacket.handle(ctx)) + ); } private static ServerPlayNetworking.PlayPayloadHandler wrapHandler( diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java index e2f7d174e..ac3431d8e 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java @@ -30,6 +30,8 @@ import com.refinedmods.refinedstorage.common.support.AbstractBaseBlock; import com.refinedmods.refinedstorage.common.support.packet.PacketHandler; import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocrafterNameChangePacket; +import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocraftingMonitorCancelAllPacket; +import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocraftingMonitorCancelPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocraftingPreviewRequestPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.AutocraftingRequestPacket; import com.refinedmods.refinedstorage.common.support.packet.c2s.CraftingGridClearPacket; @@ -57,6 +59,9 @@ import com.refinedmods.refinedstorage.common.support.packet.c2s.UseSlotReferencedItemPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterManagerActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterNameUpdatePacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskAddedPacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskRemovedPacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskStatusChangedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingPreviewResponsePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingResponsePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.EnergyInfoPacket; @@ -653,6 +658,21 @@ private static void registerServerToClientPackets(final PayloadRegistrar registr AutocraftingResponsePacket.STREAM_CODEC, wrapHandler((packet, ctx) -> AutocraftingResponsePacket.handle(packet)) ); + registrar.playToClient( + AutocraftingMonitorTaskAddedPacket.PACKET_TYPE, + AutocraftingMonitorTaskAddedPacket.STREAM_CODEC, + wrapHandler(AutocraftingMonitorTaskAddedPacket::handle) + ); + registrar.playToClient( + AutocraftingMonitorTaskRemovedPacket.PACKET_TYPE, + AutocraftingMonitorTaskRemovedPacket.STREAM_CODEC, + wrapHandler(AutocraftingMonitorTaskRemovedPacket::handle) + ); + registrar.playToClient( + AutocraftingMonitorTaskStatusChangedPacket.PACKET_TYPE, + AutocraftingMonitorTaskStatusChangedPacket.STREAM_CODEC, + wrapHandler(AutocraftingMonitorTaskStatusChangedPacket::handle) + ); } private static void registerClientToServerPackets(final PayloadRegistrar registrar) { @@ -786,6 +806,16 @@ private static void registerClientToServerPackets(final PayloadRegistrar registr AutocraftingRequestPacket.STREAM_CODEC, wrapHandler(AutocraftingRequestPacket::handle) ); + registrar.playToServer( + AutocraftingMonitorCancelPacket.PACKET_TYPE, + AutocraftingMonitorCancelPacket.STREAM_CODEC, + wrapHandler(AutocraftingMonitorCancelPacket::handle) + ); + registrar.playToServer( + AutocraftingMonitorCancelAllPacket.PACKET_TYPE, + AutocraftingMonitorCancelAllPacket.STREAM_CODEC, + wrapHandler((packet, ctx) -> AutocraftingMonitorCancelAllPacket.handle(ctx)) + ); } private static IPayloadHandler wrapHandler(final PacketHandler handler) { diff --git a/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java b/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java index 3d90a97da..072ba8151 100644 --- a/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java +++ b/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.api.network.autocrafting; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewProvider; import com.refinedmods.refinedstorage.api.autocrafting.Pattern; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.api.network.NetworkComponent; import com.refinedmods.refinedstorage.api.resource.ResourceKey; @@ -10,7 +10,7 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.4.8") -public interface AutocraftingNetworkComponent extends NetworkComponent, AutocraftingPreviewProvider { +public interface AutocraftingNetworkComponent extends NetworkComponent, PreviewProvider { void addListener(PatternListener listener); void removeListener(PatternListener listener); diff --git a/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java b/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java index 08017d748..c52adb449 100644 --- a/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java +++ b/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java @@ -1,10 +1,11 @@ package com.refinedmods.refinedstorage.api.network.impl.autocrafting; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewItem; -import com.refinedmods.refinedstorage.api.autocrafting.preview.AutocraftingPreviewType; import com.refinedmods.refinedstorage.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepositoryImpl; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewItem; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewType; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; import com.refinedmods.refinedstorage.api.network.autocrafting.AutocraftingNetworkComponent; import com.refinedmods.refinedstorage.api.network.autocrafting.ParentContainer; import com.refinedmods.refinedstorage.api.network.autocrafting.PatternListener; @@ -62,20 +63,20 @@ public boolean contains(final AutocraftingNetworkComponent component) { } @Override - public Optional getPreview(final ResourceKey resource, final long amount) { - final List items = new ArrayList<>(); + public Optional getPreview(final ResourceKey resource, final long amount) { + final List items = new ArrayList<>(); final boolean missing = amount == 404; for (int i = 0; i < 31; ++i) { - items.add(new AutocraftingPreviewItem( + items.add(new PreviewItem( resource, (i + 1), (i % 2 == 0 && missing) ? amount : 0, i % 2 == 0 ? 0 : amount )); } - return Optional.of(new AutocraftingPreview(missing - ? AutocraftingPreviewType.MISSING_RESOURCES - : AutocraftingPreviewType.SUCCESS, items)); + return Optional.of(new Preview(missing + ? PreviewType.MISSING_RESOURCES + : PreviewType.SUCCESS, items)); } @Override From b74c9482f2ff9023947dc027a9ea1a72f1ea2dd7 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 16 Nov 2024 20:18:15 +0100 Subject: [PATCH 22/30] feat: autocrafting monitor respects activeness --- gradle.properties | 1 - .../api/autocrafting/ResourceFixtures.java | 2 +- .../autocrafting/status/TaskStatusTest.java | 35 ++++ .../api/autocrafting/status/package-info.java | 7 + ...tractAutocraftingMonitorContainerMenu.java | 192 ++++++++++++++++++ .../AutocraftingMonitorBlockEntity.java | 23 ++- .../AutocraftingMonitorContainerMenu.java | 168 ++------------- .../monitor/AutocraftingMonitorData.java | 3 +- .../monitor/AutocraftingMonitorScreen.java | 90 ++++---- .../monitor/AutocraftingMonitorWatcher.java | 6 + .../grid/AbstractGridContainerMenu.java | 4 +- .../common/support/AbstractBaseScreen.java | 6 +- .../AutocraftingMonitorCancelAllPacket.java | 4 +- .../c2s/AutocraftingMonitorCancelPacket.java | 4 +- .../s2c/AutocraftingMonitorActivePacket.java | 35 ++++ .../AutocraftingMonitorTaskAddedPacket.java | 4 +- .../AutocraftingMonitorTaskRemovedPacket.java | 4 +- ...raftingMonitorTaskStatusChangedPacket.java | 4 +- .../common/support/packet/s2c/S2CPackets.java | 4 + .../widget/AbstractSideButtonWidget.java | 3 +- .../fabric/ClientModInitializerImpl.java | 5 + .../fabric/ModInitializerImpl.java | 5 + .../neoforge/ModInitializer.java | 6 + .../AutocraftingNetworkComponentImpl.java | 1 - 24 files changed, 414 insertions(+), 202 deletions(-) create mode 100644 refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.java create mode 100644 refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AbstractAutocraftingMonitorContainerMenu.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorWatcher.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorActivePacket.java diff --git a/gradle.properties b/gradle.properties index d77ada458..a1b566f8c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,3 @@ org.gradle.configureondemand=true org.gradle.caching=true org.gradle.configuration-cache=true org.gradle.configuration-cache.problems=warn -org.gradle.vfs.watch=false diff --git a/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/ResourceFixtures.java b/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/ResourceFixtures.java index 6ecf50222..715577458 100644 --- a/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/ResourceFixtures.java +++ b/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/ResourceFixtures.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage.api.resource.ResourceKey; -enum ResourceFixtures implements ResourceKey { +public enum ResourceFixtures implements ResourceKey { A, B, C diff --git a/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.java b/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.java new file mode 100644 index 000000000..a19282a9e --- /dev/null +++ b/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.java @@ -0,0 +1,35 @@ +package com.refinedmods.refinedstorage.api.autocrafting.status; + +import com.refinedmods.refinedstorage.api.autocrafting.ResourceFixtures; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; + +import java.util.List; +import java.util.UUID; + +import org.junit.jupiter.api.Test; + +public class TaskStatusTest { + @Test + void dummyTest() { + new TaskStatus( + new TaskStatus.TaskInfo( + new TaskId(UUID.randomUUID()), + ResourceFixtures.A, + 0, + 0 + ), + 0.69F, + List.of( + new TaskStatus.Item( + TaskStatus.ItemType.NORMAL, + ResourceFixtures.A, + 0, + 0, + 0, + 0, + 0 + ) + ) + ); + } +} diff --git a/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.java b/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.java new file mode 100644 index 000000000..d15a12e18 --- /dev/null +++ b/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault +package com.refinedmods.refinedstorage.api.autocrafting.status; + +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AbstractAutocraftingMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AbstractAutocraftingMonitorContainerMenu.java new file mode 100644 index 000000000..cf639c9d5 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AbstractAutocraftingMonitorContainerMenu.java @@ -0,0 +1,192 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; +import com.refinedmods.refinedstorage.common.support.AbstractBaseContainerMenu; +import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; +import com.refinedmods.refinedstorage.common.support.packet.s2c.S2CPackets; + +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.MenuType; + +public abstract class AbstractAutocraftingMonitorContainerMenu extends AbstractBaseContainerMenu + implements TaskStatusListener, AutocraftingMonitorWatcher { + private final Map statusByTaskId; + private final List tasks; + private final List tasksView; + @Nullable + private final TaskStatusProvider taskStatusProvider; + private final Player player; + + @Nullable + private AutocraftingMonitorListener listener; + @Nullable + private TaskId currentTaskId; + private boolean active; + + protected AbstractAutocraftingMonitorContainerMenu(final MenuType menuType, + final int syncId, + final Inventory playerInventory, + final AutocraftingMonitorData data) { + super(menuType, syncId); + this.statusByTaskId = data.statuses().stream().collect(Collectors.toMap( + s -> s.info().id(), + s -> s + )); + this.tasks = data.statuses().stream().map(TaskStatus::info).collect(Collectors.toList()); + this.tasksView = Collections.unmodifiableList(tasks); + this.currentTaskId = data.statuses().isEmpty() ? null : data.statuses().getFirst().info().id(); + this.taskStatusProvider = null; + this.active = data.active(); + this.player = playerInventory.player; + } + + protected AbstractAutocraftingMonitorContainerMenu(final MenuType menuType, + final int syncId, + final Player player, + final TaskStatusProvider taskStatusProvider) { + super(menuType, syncId); + this.statusByTaskId = Collections.emptyMap(); + this.tasks = Collections.emptyList(); + this.tasksView = Collections.emptyList(); + this.currentTaskId = null; + this.taskStatusProvider = taskStatusProvider; + this.player = player; + taskStatusProvider.addListener(this); + } + + @Override + public void removed(final Player removedPlayer) { + super.removed(removedPlayer); + if (taskStatusProvider != null) { + taskStatusProvider.removeListener(this); + } + } + + @Override + public void broadcastChanges() { + super.broadcastChanges(); + if (taskStatusProvider instanceof TaskStatusProviderImpl taskStatusProviderImpl) { + taskStatusProviderImpl.testTick(); + } + } + + void setListener(@Nullable final AutocraftingMonitorListener listener) { + this.listener = listener; + } + + List getCurrentItems() { + final TaskStatus status = statusByTaskId.get(currentTaskId); + if (status == null) { + return Collections.emptyList(); + } + return status.items(); + } + + List getTasksView() { + return tasksView; + } + + float getPercentageCompleted(final TaskId taskId) { + final TaskStatus status = statusByTaskId.get(taskId); + return status == null ? 0 : status.percentageCompleted(); + } + + void setCurrentTaskId(@Nullable final TaskId taskId) { + this.currentTaskId = taskId; + loadCurrentTask(); + } + + void loadCurrentTask() { + if (listener != null) { + listener.currentTaskChanged(currentTaskId == null ? null : statusByTaskId.get(currentTaskId)); + } + } + + @Override + public void taskStatusChanged(final TaskStatus status) { + if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + S2CPackets.sendAutocraftingMonitorTaskStatusChanged(serverPlayer, status); + return; + } + statusByTaskId.put(status.info().id(), status); + } + + @Override + public void taskRemoved(final TaskId id) { + if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + S2CPackets.sendAutocraftingMonitorTaskRemoved(serverPlayer, id); + return; + } + statusByTaskId.remove(id); + tasks.removeIf(task -> task.id().equals(id)); + if (listener != null) { + listener.taskRemoved(id); + } + if (id.equals(currentTaskId)) { + this.currentTaskId = tasks.isEmpty() ? null : tasks.getFirst().id(); + loadCurrentTask(); + } + } + + @Override + public void taskAdded(final TaskStatus status) { + if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + S2CPackets.sendAutocraftingMonitorTaskAdded(serverPlayer, status); + return; + } + statusByTaskId.put(status.info().id(), status); + tasks.add(status.info()); + if (listener != null) { + listener.taskAdded(status); + } + if (currentTaskId == null) { + this.currentTaskId = status.info().id(); + loadCurrentTask(); + } + } + + public void cancelTask(final TaskId taskId) { + if (taskStatusProvider != null) { + taskStatusProvider.cancel(taskId); + } + } + + void cancelCurrentTask() { + if (currentTaskId != null) { + C2SPackets.sendAutocraftingMonitorCancel(currentTaskId); + } + } + + public void cancelAllTasks() { + if (taskStatusProvider != null) { + taskStatusProvider.cancelAll(); + } else { + C2SPackets.sendAutocraftingMonitorCancelAll(); + } + } + + @Override + public void activeChanged(final boolean newActive) { + if (player instanceof ServerPlayer serverPlayer) { + S2CPackets.sendAutocraftingMonitorActive(serverPlayer, newActive); + } else { + this.active = newActive; + loadCurrentTask(); + } + } + + boolean isActive() { + return active; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java index 4a7273adb..b9759b6f6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java @@ -8,6 +8,9 @@ import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; import com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity; +import java.util.HashSet; +import java.util.Set; + import net.minecraft.core.BlockPos; import net.minecraft.network.RegistryFriendlyByteBuf; import net.minecraft.network.chat.Component; @@ -19,12 +22,28 @@ public class AutocraftingMonitorBlockEntity extends AbstractBaseNetworkNodeContainerBlockEntity implements NetworkNodeExtendedMenuProvider { + private final Set watchers = new HashSet<>(); + public AutocraftingMonitorBlockEntity(final BlockPos pos, final BlockState state) { super(BlockEntities.INSTANCE.getAutocraftingMonitor(), pos, state, new SimpleNetworkNode( Platform.INSTANCE.getConfig().getAutocraftingMonitor().getEnergyUsage() )); } + void addWatcher(final AutocraftingMonitorWatcher watcher) { + watchers.add(watcher); + } + + void removeWatcher(final AutocraftingMonitorWatcher watcher) { + watchers.remove(watcher); + } + + @Override + protected void activenessChanged(final boolean newActive) { + super.activenessChanged(newActive); + watchers.forEach(watcher -> watcher.activeChanged(newActive)); + } + @Override public Component getName() { return overrideName(ContentNames.AUTOCRAFTING_MONITOR); @@ -38,7 +57,7 @@ protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState @Override public AutocraftingMonitorData getMenuData() { - return new AutocraftingMonitorData(new TaskStatusProviderImpl().getStatuses()); + return new AutocraftingMonitorData(new TaskStatusProviderImpl().getStatuses(), mainNetworkNode.isActive()); } @Override @@ -48,6 +67,6 @@ public StreamEncoder getMenuCo @Override public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { - return new AutocraftingMonitorContainerMenu(syncId, player, new TaskStatusProviderImpl()); + return new AutocraftingMonitorContainerMenu(syncId, player, new TaskStatusProviderImpl(), this); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java index 15cc28f8d..e6d29160f 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java @@ -1,174 +1,48 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; -import com.refinedmods.refinedstorage.api.autocrafting.TaskId; -import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; -import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; import com.refinedmods.refinedstorage.common.content.Menus; -import com.refinedmods.refinedstorage.common.support.AbstractBaseContainerMenu; -import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; -import com.refinedmods.refinedstorage.common.support.packet.s2c.S2CPackets; +import com.refinedmods.refinedstorage.common.support.RedstoneMode; +import com.refinedmods.refinedstorage.common.support.containermenu.ClientProperty; +import com.refinedmods.refinedstorage.common.support.containermenu.PropertyTypes; +import com.refinedmods.refinedstorage.common.support.containermenu.ServerProperty; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; import javax.annotation.Nullable; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; -public class AutocraftingMonitorContainerMenu extends AbstractBaseContainerMenu implements TaskStatusListener { - private final Map statusByTaskId; - private final List tasks; - private final List tasksView; +public class AutocraftingMonitorContainerMenu extends AbstractAutocraftingMonitorContainerMenu { @Nullable - private final TaskStatusProvider taskStatusProvider; - private final Player player; - - @Nullable - private AutocraftingMonitorListener listener; - - @Nullable - private TaskId currentTaskId; + private final AutocraftingMonitorBlockEntity autocraftingMonitor; public AutocraftingMonitorContainerMenu(final int syncId, final Inventory playerInventory, final AutocraftingMonitorData data) { - super(Menus.INSTANCE.getAutocraftingMonitor(), syncId); - this.statusByTaskId = data.statuses().stream().collect(Collectors.toMap( - s -> s.info().id(), - s -> s - )); - this.tasks = data.statuses().stream().map(TaskStatus::info).collect(Collectors.toList()); - this.tasksView = Collections.unmodifiableList(tasks); - this.currentTaskId = data.statuses().isEmpty() ? null : data.statuses().getFirst().info().id(); - this.taskStatusProvider = null; - this.player = playerInventory.player; + super(Menus.INSTANCE.getAutocraftingMonitor(), syncId, playerInventory, data); + registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); + this.autocraftingMonitor = null; } AutocraftingMonitorContainerMenu(final int syncId, final Player player, - final TaskStatusProvider taskStatusProvider) { - super(Menus.INSTANCE.getAutocraftingMonitor(), syncId); - this.statusByTaskId = Collections.emptyMap(); - this.tasks = Collections.emptyList(); - this.tasksView = Collections.emptyList(); - this.currentTaskId = null; - this.taskStatusProvider = taskStatusProvider; - this.player = player; - taskStatusProvider.addListener(this); + final TaskStatusProvider taskStatusProvider, + final AutocraftingMonitorBlockEntity autocraftingMonitor) { + super(Menus.INSTANCE.getAutocraftingMonitor(), syncId, player, taskStatusProvider); + registerProperty(new ServerProperty<>( + PropertyTypes.REDSTONE_MODE, + autocraftingMonitor::getRedstoneMode, + autocraftingMonitor::setRedstoneMode + )); + this.autocraftingMonitor = autocraftingMonitor; + autocraftingMonitor.addWatcher(this); } @Override public void removed(final Player removedPlayer) { super.removed(removedPlayer); - if (taskStatusProvider != null) { - taskStatusProvider.removeListener(this); - } - } - - @Override - public void broadcastChanges() { - super.broadcastChanges(); - if (taskStatusProvider instanceof TaskStatusProviderImpl taskStatusProviderImpl) { - taskStatusProviderImpl.testTick(); - } - } - - void setListener(@Nullable final AutocraftingMonitorListener listener) { - this.listener = listener; - } - - List getCurrentItems() { - final TaskStatus status = statusByTaskId.get(currentTaskId); - if (status == null) { - return Collections.emptyList(); - } - return status.items(); - } - - List getTasks() { - return tasksView; - } - - float getPercentageCompleted(final TaskId taskId) { - final TaskStatus status = statusByTaskId.get(taskId); - return status == null ? 0 : status.percentageCompleted(); - } - - void setCurrentTaskId(@Nullable final TaskId taskId) { - this.currentTaskId = taskId; - loadCurrentTask(); - } - - void loadCurrentTask() { - if (listener != null) { - listener.currentTaskChanged(currentTaskId == null ? null : statusByTaskId.get(currentTaskId)); - } - } - - @Override - public void taskStatusChanged(final TaskStatus status) { - if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { - S2CPackets.sendAutocraftingMonitorTaskStatusChanged(serverPlayer, status); - return; - } - statusByTaskId.put(status.info().id(), status); - } - - @Override - public void taskRemoved(final TaskId id) { - if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { - S2CPackets.sendAutocraftingMonitorTaskRemoved(serverPlayer, id); - return; - } - statusByTaskId.remove(id); - tasks.removeIf(task -> task.id().equals(id)); - if (listener != null) { - listener.taskRemoved(id); - } - if (id.equals(currentTaskId)) { - currentTaskId = tasks.isEmpty() ? null : tasks.getFirst().id(); - loadCurrentTask(); - } - } - - @Override - public void taskAdded(final TaskStatus status) { - if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { - S2CPackets.sendAutocraftingMonitorTaskAdded(serverPlayer, status); - return; - } - statusByTaskId.put(status.info().id(), status); - tasks.add(status.info()); - if (listener != null) { - listener.taskAdded(status); - } - if (currentTaskId == null) { - currentTaskId = status.info().id(); - loadCurrentTask(); - } - } - - public void cancelTask(final TaskId taskId) { - if (taskStatusProvider != null) { - taskStatusProvider.cancel(taskId); - } - } - - void cancelCurrentTask() { - if (currentTaskId != null) { - C2SPackets.sendAutocraftingMonitorCancel(currentTaskId); - } - } - - public void cancelAllTasks() { - if (taskStatusProvider != null) { - taskStatusProvider.cancelAll(); - } else { - C2SPackets.sendAutocraftingMonitorCancelAll(); + if (autocraftingMonitor != null) { + autocraftingMonitor.removeWatcher(this); } } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java index 24df0d6a0..9d5b8c9b6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorData.java @@ -9,11 +9,12 @@ import net.minecraft.network.codec.ByteBufCodecs; import net.minecraft.network.codec.StreamCodec; -public record AutocraftingMonitorData(List statuses) { +public record AutocraftingMonitorData(List statuses, boolean active) { public static final StreamCodec STREAM_CODEC = StreamCodec.composite( ByteBufCodecs.collection(ArrayList::new, AutocraftingMonitorStreamCodecs.STATUS_STREAM_CODEC), AutocraftingMonitorData::statuses, + ByteBufCodecs.BOOL, AutocraftingMonitorData::active, AutocraftingMonitorData::new ); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java index 5af4f1cb5..d7341a5cc 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java @@ -5,7 +5,9 @@ import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering; import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.support.containermenu.PropertyTypes; import com.refinedmods.refinedstorage.common.support.tooltip.SmallText; +import com.refinedmods.refinedstorage.common.support.widget.RedstoneModeSideButtonWidget; import com.refinedmods.refinedstorage.common.support.widget.ScrollbarWidget; import java.util.ArrayList; @@ -28,7 +30,7 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; -public class AutocraftingMonitorScreen extends AbstractBaseScreen +public class AutocraftingMonitorScreen extends AbstractBaseScreen implements AutocraftingMonitorListener { static final int TASK_BUTTON_HEIGHT = 168 / 7; static final int TASK_BUTTON_WIDTH = 64; @@ -83,7 +85,7 @@ public class AutocraftingMonitorScreen extends AbstractBaseScreen taskButtons = new ArrayList<>(); - public AutocraftingMonitorScreen(final AutocraftingMonitorContainerMenu menu, + public AutocraftingMonitorScreen(final AbstractAutocraftingMonitorContainerMenu menu, final Inventory playerInventory, final Component title) { super(menu, playerInventory, title); @@ -119,6 +121,14 @@ protected void init() { .size(font.width(CANCEL_ALL) + 14, 20).build()); cancelAllButton.active = false; getMenu().loadCurrentTask(); + if (getMenu().hasProperty(PropertyTypes.REDSTONE_MODE)) { + addSideButton(new RedstoneModeSideButtonWidget(getMenu().getProperty(PropertyTypes.REDSTONE_MODE))); + } + } + + @Override + protected int getSideButtonX() { + return leftPos + imageWidth + 2; } private void initTaskButtons() { @@ -141,8 +151,8 @@ private void initTaskButtons() { } }); updateTaskButtonsScrollbar(); - for (int i = 0; i < getMenu().getTasks().size(); ++i) { - final TaskStatus.TaskInfo taskId = getMenu().getTasks().get(i); + for (int i = 0; i < getMenu().getTasksView().size(); ++i) { + final TaskStatus.TaskInfo taskId = getMenu().getTasksView().get(i); final int buttonY = getTaskButtonY(i); final AutocraftingTaskButton button = new AutocraftingTaskButton( getTaskButtonsInnerX(), @@ -157,6 +167,9 @@ private void initTaskButtons() { } private boolean isTaskButtonVisible(final int y) { + if (!getMenu().isActive()) { + return false; + } final int innerY = getTaskButtonsInnerY(); return y >= innerY - TASK_BUTTON_HEIGHT && y <= innerY + TASKS_INNER_HEIGHT; } @@ -174,19 +187,6 @@ public void render(final GuiGraphics graphics, final int mouseX, final int mouse if (taskButtonsScrollbar != null) { taskButtonsScrollbar.render(graphics, mouseX, mouseY, partialTicks); } - - final int tasksInnerX = getTaskButtonsInnerX(); - final int tasksInnerY = getTaskButtonsInnerY(); - graphics.enableScissor( - tasksInnerX, - tasksInnerY, - tasksInnerX + TASKS_INNER_WIDTH, - tasksInnerY + TASKS_INNER_HEIGHT - ); - for (final AutocraftingTaskButton taskButton : taskButtons) { - taskButton.render(graphics, mouseX, mouseY, partialTicks); - } - graphics.disableScissor(); } @Override @@ -194,7 +194,7 @@ protected void renderBg(final GuiGraphics graphics, final float delta, final int super.renderBg(graphics, delta, mouseX, mouseY); graphics.blitSprite(TASKS, leftPos - TASKS_WIDTH + 4, topPos, TASKS_WIDTH, TASKS_HEIGHT); final List items = getMenu().getCurrentItems(); - if (items.isEmpty() || taskItemsScrollbar == null) { + if (items.isEmpty() || taskItemsScrollbar == null || !getMenu().isActive()) { return; } final int x = leftPos + 8; @@ -209,6 +209,19 @@ protected void renderBg(final GuiGraphics graphics, final float delta, final int renderRow(graphics, x, yy, i, items, mouseX, mouseY); } graphics.disableScissor(); + + final int tasksInnerX = getTaskButtonsInnerX(); + final int tasksInnerY = getTaskButtonsInnerY(); + graphics.enableScissor( + tasksInnerX, + tasksInnerY, + tasksInnerX + TASKS_INNER_WIDTH, + tasksInnerY + TASKS_INNER_HEIGHT + ); + for (final AutocraftingTaskButton taskButton : taskButtons) { + taskButton.render(graphics, mouseX, mouseY, delta); + } + graphics.disableScissor(); } private void renderRow(final GuiGraphics graphics, @@ -415,18 +428,6 @@ private int getTaskButtonsInnerX() { return leftPos - 83 + 4; } - private void updateTaskButtonsScrollbar() { - if (taskButtonsScrollbar == null) { - return; - } - final int totalTaskButtons = getMenu().getTasks().size() - TASKS_VISIBLE; - final int maxOffset = taskButtonsScrollbar.isSmoothScrolling() - ? totalTaskButtons * TASK_BUTTON_HEIGHT - : totalTaskButtons; - taskButtonsScrollbar.setEnabled(maxOffset > 0); - taskButtonsScrollbar.setMaxOffset(maxOffset); - } - @Override public void renderLabels(final GuiGraphics graphics, final int mouseX, final int mouseY) { graphics.drawString(font, title, titleLabelX, titleLabelY, 4210752, false); @@ -439,19 +440,38 @@ protected ResourceLocation getTexture() { @Override public void currentTaskChanged(@Nullable final TaskStatus taskStatus) { + updateTaskItemsScrollbar(taskStatus); + updateTaskButtonsScrollbar(); if (cancelButton != null) { - cancelButton.active = taskStatus != null; + cancelButton.active = getMenu().isActive() && taskStatus != null; } if (cancelAllButton != null) { - cancelAllButton.active = !menu.getTasks().isEmpty(); + cancelAllButton.active = getMenu().isActive() && !menu.getTasksView().isEmpty(); } for (final AutocraftingTaskButton taskButton : taskButtons) { - taskButton.active = taskStatus == null || !taskButton.getTaskId().equals(taskStatus.info().id()); + taskButton.active = taskStatus == null + || !taskButton.getTaskId().equals(taskStatus.info().id()); + taskButton.visible = getMenu().isActive(); } + } + + private void updateTaskButtonsScrollbar() { + if (taskButtonsScrollbar == null) { + return; + } + final int totalTaskButtons = getMenu().isActive() ? getMenu().getTasksView().size() - TASKS_VISIBLE : 0; + final int maxOffset = taskButtonsScrollbar.isSmoothScrolling() + ? totalTaskButtons * TASK_BUTTON_HEIGHT + : totalTaskButtons; + taskButtonsScrollbar.setEnabled(maxOffset > 0); + taskButtonsScrollbar.setMaxOffset(maxOffset); + } + + private void updateTaskItemsScrollbar(@Nullable final TaskStatus taskStatus) { if (taskItemsScrollbar == null) { return; } - if (taskStatus == null) { + if (taskStatus == null || !getMenu().isActive()) { taskItemsScrollbar.setEnabled(false); taskItemsScrollbar.setMaxOffset(0); return; @@ -465,7 +485,7 @@ public void currentTaskChanged(@Nullable final TaskStatus taskStatus) { @Override public void taskAdded(final TaskStatus taskStatus) { updateTaskButtonsScrollbar(); - final int buttonY = getTaskButtonY(getMenu().getTasks().size() - 1); + final int buttonY = getTaskButtonY(getMenu().getTasksView().size() - 1); final AutocraftingTaskButton button = new AutocraftingTaskButton( getTaskButtonsInnerX(), buttonY, diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorWatcher.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorWatcher.java new file mode 100644 index 000000000..7ee80632c --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorWatcher.java @@ -0,0 +1,6 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +@FunctionalInterface +interface AutocraftingMonitorWatcher { + void activeChanged(boolean active); +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java index 2f9c52dfa..4c1316862 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java @@ -1,10 +1,10 @@ package com.refinedmods.refinedstorage.common.grid; -import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; -import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepository; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepositoryImpl; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; import com.refinedmods.refinedstorage.api.grid.operations.GridExtractMode; import com.refinedmods.refinedstorage.api.grid.operations.GridInsertMode; import com.refinedmods.refinedstorage.api.grid.query.GridQueryParserException; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseScreen.java index 57ef1c420..72e200b35 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/AbstractBaseScreen.java @@ -84,6 +84,10 @@ protected int getSideButtonY() { return 6; } + protected int getSideButtonX() { + return leftPos - AbstractSideButtonWidget.SIZE - 2; + } + @Override protected void init() { clearWidgets(); @@ -144,7 +148,7 @@ protected void renderResourceSlots(final GuiGraphics graphics) { } public void addSideButton(final AbstractSideButtonWidget button) { - button.setX(leftPos - button.getWidth() - 2); + button.setX(getSideButtonX()); button.setY(topPos + sideButtonY); exclusionZones.add(new Rect2i(button.getX(), button.getY(), button.getWidth(), button.getHeight())); sideButtonY += button.getHeight() + 2; diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelAllPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelAllPacket.java index 94b07741e..891a7c38d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelAllPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelAllPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; -import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AbstractAutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; import net.minecraft.network.RegistryFriendlyByteBuf; @@ -18,7 +18,7 @@ public record AutocraftingMonitorCancelAllPacket() implements CustomPacketPayloa StreamCodec.unit(INSTANCE); public static void handle(final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + if (ctx.getPlayer().containerMenu instanceof AbstractAutocraftingMonitorContainerMenu containerMenu) { containerMenu.cancelAllTasks(); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelPacket.java index 27f5dd090..c7ffa45b6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/AutocraftingMonitorCancelPacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; import com.refinedmods.refinedstorage.api.autocrafting.TaskId; -import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AbstractAutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorStreamCodecs; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; @@ -22,7 +22,7 @@ public record AutocraftingMonitorCancelPacket(TaskId taskId) implements CustomPa ); public static void handle(final AutocraftingMonitorCancelPacket packet, final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + if (ctx.getPlayer().containerMenu instanceof AbstractAutocraftingMonitorContainerMenu containerMenu) { containerMenu.cancelTask(packet.taskId()); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorActivePacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorActivePacket.java new file mode 100644 index 000000000..10a3cfe2a --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorActivePacket.java @@ -0,0 +1,35 @@ +package com.refinedmods.refinedstorage.common.support.packet.s2c; + +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AbstractAutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.support.packet.PacketContext; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.codec.ByteBufCodecs; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.world.inventory.AbstractContainerMenu; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public record AutocraftingMonitorActivePacket(boolean active) implements CustomPacketPayload { + public static final Type PACKET_TYPE = new Type<>( + createIdentifier("autocrafting_monitor") + ); + public static final StreamCodec STREAM_CODEC = + StreamCodec.composite( + ByteBufCodecs.BOOL, AutocraftingMonitorActivePacket::active, + AutocraftingMonitorActivePacket::new + ); + + public static void handle(final AutocraftingMonitorActivePacket packet, final PacketContext ctx) { + final AbstractContainerMenu menu = ctx.getPlayer().containerMenu; + if (menu instanceof AbstractAutocraftingMonitorContainerMenu containerMenu) { + containerMenu.activeChanged(packet.active); + } + } + + @Override + public Type type() { + return PACKET_TYPE; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskAddedPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskAddedPacket.java index 508538305..5c09872ee 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskAddedPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskAddedPacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.support.packet.s2c; import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; -import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AbstractAutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorStreamCodecs; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; @@ -23,7 +23,7 @@ public record AutocraftingMonitorTaskAddedPacket(TaskStatus taskStatus) implemen ); public static void handle(final AutocraftingMonitorTaskAddedPacket packet, final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + if (ctx.getPlayer().containerMenu instanceof AbstractAutocraftingMonitorContainerMenu containerMenu) { containerMenu.taskAdded(packet.taskStatus()); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskRemovedPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskRemovedPacket.java index 2363eecea..b7f6f220d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskRemovedPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskRemovedPacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.support.packet.s2c; import com.refinedmods.refinedstorage.api.autocrafting.TaskId; -import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AbstractAutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorStreamCodecs; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; @@ -23,7 +23,7 @@ public record AutocraftingMonitorTaskRemovedPacket(TaskId taskId) implements Cus ); public static void handle(final AutocraftingMonitorTaskRemovedPacket packet, final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + if (ctx.getPlayer().containerMenu instanceof AbstractAutocraftingMonitorContainerMenu containerMenu) { containerMenu.taskRemoved(packet.taskId()); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskStatusChangedPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskStatusChangedPacket.java index 90e6684b3..bae8a82a6 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskStatusChangedPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/AutocraftingMonitorTaskStatusChangedPacket.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.common.support.packet.s2c; import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; -import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.AbstractAutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorStreamCodecs; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; @@ -23,7 +23,7 @@ public record AutocraftingMonitorTaskStatusChangedPacket(TaskStatus taskStatus) ); public static void handle(final AutocraftingMonitorTaskStatusChangedPacket packet, final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof AutocraftingMonitorContainerMenu containerMenu) { + if (ctx.getPlayer().containerMenu instanceof AbstractAutocraftingMonitorContainerMenu containerMenu) { containerMenu.taskStatusChanged(packet.taskStatus()); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java index cc985ac1d..d114b3a9c 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/s2c/S2CPackets.java @@ -117,4 +117,8 @@ public static void sendAutocraftingMonitorTaskStatusChanged(final ServerPlayer p final TaskStatus taskStatus) { Platform.INSTANCE.sendPacketToClient(player, new AutocraftingMonitorTaskStatusChangedPacket(taskStatus)); } + + public static void sendAutocraftingMonitorActive(final ServerPlayer player, final boolean active) { + Platform.INSTANCE.sendPacketToClient(player, new AutocraftingMonitorActivePacket(active)); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java index 55b159c29..0a5630782 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AbstractSideButtonWidget.java @@ -25,11 +25,12 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; public abstract class AbstractSideButtonWidget extends Button { + public static final int SIZE = 18; + private static final ResourceLocation SPRITE = createIdentifier("widget/side_button/base"); private static final ResourceLocation HOVERED_SPRITE = createIdentifier("widget/side_button/hovered"); private static final ResourceLocation HOVER_OVERLAY_SPRITE = createIdentifier("widget/side_button/hover_overlay"); - private static final int SIZE = 18; private static final int ICON_SIZE = 16; @Nullable diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java index 0eb7ab4c9..68df1c279 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java @@ -21,6 +21,7 @@ import com.refinedmods.refinedstorage.common.support.packet.PacketHandler; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterManagerActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterNameUpdatePacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskAddedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskRemovedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskStatusChangedPacket; @@ -324,6 +325,10 @@ private void registerPacketHandlers() { AutocraftingMonitorTaskStatusChangedPacket.PACKET_TYPE, wrapHandler(AutocraftingMonitorTaskStatusChangedPacket::handle) ); + ClientPlayNetworking.registerGlobalReceiver( + AutocraftingMonitorActivePacket.PACKET_TYPE, + wrapHandler(AutocraftingMonitorActivePacket::handle) + ); } private static ClientPlayNetworking.PlayPayloadHandler wrapHandler( diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java index d085b482f..35763ef00 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java @@ -59,6 +59,7 @@ import com.refinedmods.refinedstorage.common.support.packet.c2s.UseSlotReferencedItemPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterManagerActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterNameUpdatePacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskAddedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskRemovedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskStatusChangedPacket; @@ -477,6 +478,10 @@ private void registerServerToClientPackets() { AutocraftingMonitorTaskStatusChangedPacket.PACKET_TYPE, AutocraftingMonitorTaskStatusChangedPacket.STREAM_CODEC ); + PayloadTypeRegistry.playS2C().register( + AutocraftingMonitorActivePacket.PACKET_TYPE, + AutocraftingMonitorActivePacket.STREAM_CODEC + ); } private void registerClientToServerPackets() { diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java index ac3431d8e..785edbcc4 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java @@ -59,6 +59,7 @@ import com.refinedmods.refinedstorage.common.support.packet.c2s.UseSlotReferencedItemPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterManagerActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocrafterNameUpdatePacket; +import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorActivePacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskAddedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskRemovedPacket; import com.refinedmods.refinedstorage.common.support.packet.s2c.AutocraftingMonitorTaskStatusChangedPacket; @@ -673,6 +674,11 @@ private static void registerServerToClientPackets(final PayloadRegistrar registr AutocraftingMonitorTaskStatusChangedPacket.STREAM_CODEC, wrapHandler(AutocraftingMonitorTaskStatusChangedPacket::handle) ); + registrar.playToClient( + AutocraftingMonitorActivePacket.PACKET_TYPE, + AutocraftingMonitorActivePacket.STREAM_CODEC, + wrapHandler(AutocraftingMonitorActivePacket::handle) + ); } private static void registerClientToServerPackets(final PayloadRegistrar registrar) { diff --git a/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java b/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java index c52adb449..e3407c8f3 100644 --- a/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java +++ b/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java @@ -5,7 +5,6 @@ import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewItem; import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewType; -import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; import com.refinedmods.refinedstorage.api.network.autocrafting.AutocraftingNetworkComponent; import com.refinedmods.refinedstorage.api.network.autocrafting.ParentContainer; import com.refinedmods.refinedstorage.api.network.autocrafting.PatternListener; From 615d2a24adb51fce94455fa1d6e9d14e184caa6a Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 16 Nov 2024 21:25:47 +0100 Subject: [PATCH 23/30] chore: sonar issues --- .../api/autocrafting/status/TaskStatusTest.java | 2 +- .../AutocrafterManagerScreen.java | 1 - .../monitor/TaskStatusProviderImpl.java | 2 +- .../importer/FabricStorageImporterSource.java | 2 +- .../neoforge/datagen/BlockStateProviderImpl.java | 13 +++++++------ 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.java b/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.java index a19282a9e..65e933afb 100644 --- a/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.java +++ b/refinedstorage-autocrafting-api/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.java @@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test; -public class TaskStatusTest { +class TaskStatusTest { @Test void dummyTest() { new TaskStatus( diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java index e595859a0..d48b5989a 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java @@ -23,7 +23,6 @@ import static com.refinedmods.refinedstorage.common.support.Sprites.SEARCH_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; -// TODO: fix sonar issues // TODO: search box autoselected mode make generic. // TODO: tooltip on search icon public class AutocrafterManagerScreen extends AbstractStretchingScreen { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java index 23ff57450..fc96c9b99 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java @@ -96,7 +96,7 @@ private TaskStatus generateTaskStatus() { final TaskStatus.TaskInfo taskInfo = new TaskStatus.TaskInfo( new TaskId(UUID.randomUUID()), ItemResource.ofItemStack(new ItemStack(ITEM_SET[r.nextInt(ITEM_SET.length)])), - 5 + r.nextInt(32), + 5 + r.nextLong(32), System.currentTimeMillis() ); final float pct = r.nextFloat(); diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/importer/FabricStorageImporterSource.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/importer/FabricStorageImporterSource.java index 9a285606c..d022db664 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/importer/FabricStorageImporterSource.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/importer/FabricStorageImporterSource.java @@ -33,7 +33,7 @@ class FabricStorageImporterSource implements ImporterSource { FabricStorageImporterSource(final BlockApiLookup, Direction> lookup, final Function fromPlatformMapper, - @NullableType final Function toPlatformMapper, + final Function toPlatformMapper, final ServerLevel serverLevel, final BlockPos pos, final Direction direction, diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java index 61468a71d..cb15a6510 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/datagen/BlockStateProviderImpl.java @@ -68,8 +68,7 @@ private void registerCables() { final var builder = getVariantBuilder(block.get()); builder.addModels( builder.partialState(), - ConfiguredModel.builder().modelFile(modelFile(createIdentifier("block/cable/" + color.getName()))) - .build() + ConfiguredModel.builder().modelFile(getCableModel(color)).build() ); }); } @@ -79,8 +78,7 @@ private void registerCableLike(final BlockColorMap blockMap, final String blockMap.forEach((color, id, block) -> { final MultiPartBlockStateBuilder builder = getMultipartBuilder(block.get()); final var cablePart = builder.part(); - cablePart.modelFile(modelFile(createIdentifier("block/cable/" + color.getName()))) - .addModel(); + cablePart.modelFile(getCableModel(color)).addModel(); for (final Direction direction : Direction.values()) { final var part = builder.part(); addDirectionalRotation(direction, part); @@ -188,8 +186,7 @@ private void registerConstructorDestructor(final BlockColorMap blockMap, f blockMap.forEach((color, id, block) -> { final MultiPartBlockStateBuilder builder = getMultipartBuilder(block.get()); final var cablePart = builder.part(); - cablePart.modelFile(modelFile(createIdentifier("block/cable/" + color.getName()))) - .addModel(); + cablePart.modelFile(getCableModel(color)).addModel(); for (final Direction direction : Direction.values()) { final var part = builder.part(); addDirectionalRotation(direction, part); @@ -207,6 +204,10 @@ private void registerConstructorDestructor(final BlockColorMap blockMap, f }); } + private ModelFile getCableModel(final DyeColor color) { + return modelFile(createIdentifier("block/cable/" + color.getName())); + } + private ConfiguredModel[] registerDetector(final ModelFile unpowered, final DetectorBlock block, final BlockState blockState) { From d026dce835413e799bb3db4036053497cc7b726b Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 16 Nov 2024 21:49:48 +0100 Subject: [PATCH 24/30] feat: auto selected mode is now generic So we can reuse it in the Autocrafter Manager. --- CHANGELOG.md | 1 + .../refinedstorage/common/Config.java | 8 +-- .../AutocrafterManagerScreen.java | 3 +- .../grid/AbstractGridContainerMenu.java | 22 -------- .../common/grid/GridSearchBox.java | 2 - .../grid/screen/AbstractGridScreen.java | 3 +- .../screen/AutoSelectedSideButtonWidget.java | 50 ------------------ .../grid/screen/GridSearchBoxWidget.java | 6 --- .../widget/AutoSelectedSideButtonWidget.java | 50 ++++++++++++++++++ .../support/widget/SearchFieldWidget.java | 10 +++- .../assets/refinedstorage/lang/en_us.json | 8 +-- .../no.png | Bin .../yes.png | Bin .../refinedstorage/fabric/ConfigImpl.java | 26 ++++----- .../refinedstorage/neoforge/ConfigImpl.java | 34 ++++++------ 15 files changed, 101 insertions(+), 122 deletions(-) delete mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AutoSelectedSideButtonWidget.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AutoSelectedSideButtonWidget.java rename refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/{grid/autoselected => search_box_auto_selected}/no.png (100%) rename refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/{grid/autoselected => search_box_auto_selected}/yes.png (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cafaeabd..01c39d647 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Changed - The Autocrafting Monitor now has a sidebar with all tasks instead of using tabs. +- The auto-selected search box mode is now a global option used in the Autocrafter Manager as well. ## [2.0.0-milestone.4.9] - 2024-11-01 diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java index 44bf24616..9482cbb74 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java @@ -19,6 +19,10 @@ public interface Config { boolean isSmoothScrolling(); + boolean isSearchBoxAutoSelected(); + + void setSearchBoxAutoSelected(boolean searchBoxAutoSelected); + int getMaxRowsStretch(); GridEntry getGrid(); @@ -94,10 +98,6 @@ interface GridEntry extends SimpleEnergyUsageEntry { boolean isRememberSearchQuery(); - boolean isAutoSelected(); - - void setAutoSelected(boolean autoSelected); - Optional getSynchronizer(); void setSynchronizer(ResourceLocation synchronizerId); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java index d48b5989a..ae85c9e4e 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage.common.support.Sprites; import com.refinedmods.refinedstorage.common.support.containermenu.PropertyTypes; import com.refinedmods.refinedstorage.common.support.stretching.AbstractStretchingScreen; +import com.refinedmods.refinedstorage.common.support.widget.AutoSelectedSideButtonWidget; import com.refinedmods.refinedstorage.common.support.widget.History; import com.refinedmods.refinedstorage.common.support.widget.RedstoneModeSideButtonWidget; import com.refinedmods.refinedstorage.common.support.widget.SearchFieldWidget; @@ -23,7 +24,6 @@ import static com.refinedmods.refinedstorage.common.support.Sprites.SEARCH_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; -// TODO: search box autoselected mode make generic. // TODO: tooltip on search icon public class AutocrafterManagerScreen extends AbstractStretchingScreen { private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/autocrafter_manager.png"); @@ -72,6 +72,7 @@ protected void init(final int rows) { addSideButton(new RedstoneModeSideButtonWidget(getMenu().getProperty(PropertyTypes.REDSTONE_MODE))); addSideButton(new ViewTypeSideButtonWidget(getMenu())); addSideButton(new SearchModeSideButtonWidget(getMenu())); + addSideButton(new AutoSelectedSideButtonWidget(searchField)); } private void updateScrollbar() { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java index 4c1316862..47ea13859 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java @@ -91,10 +91,7 @@ public abstract class AbstractGridContainerMenu extends AbstractResourceContaine private GridSynchronizer synchronizer; @Nullable private ResourceType resourceTypeFilter; - private boolean autoSelected; private boolean active; - @Nullable - private GridSearchBox searchBox; protected AbstractGridContainerMenu( final MenuType menuType, @@ -126,7 +123,6 @@ protected AbstractGridContainerMenu( this.insertionStrategy = new ClientGridInsertionStrategy(); this.extractionStrategy = new ClientGridExtractionStrategy(); this.scrollingStrategy = new ClientGridScrollingStrategy(); - this.autoSelected = loadAutoSelected(); } protected AbstractGridContainerMenu( @@ -211,7 +207,6 @@ public void setViewType(final GridViewType viewType) { } public void setSearchBox(final GridSearchBox searchBox) { - this.searchBox = searchBox; registerViewUpdatingListener(searchBox); configureSearchBox(searchBox); } @@ -234,7 +229,6 @@ private boolean onSearchTextChanged(final String text) { } private void configureSearchBox(final GridSearchBox theSearchBox) { - theSearchBox.setAutoSelected(isAutoSelected()); if (Platform.INSTANCE.getConfig().getGrid().isRememberSearchQuery()) { theSearchBox.setValue(lastSearchQuery); theSearchBox.addListener(AbstractGridContainerMenu::updateLastSearchQuery); @@ -330,22 +324,6 @@ public boolean isActive() { return active; } - public void setAutoSelected(final boolean autoSelected) { - this.autoSelected = autoSelected; - Platform.INSTANCE.getConfig().getGrid().setAutoSelected(autoSelected); - if (searchBox != null) { - searchBox.setAutoSelected(autoSelected); - } - } - - private boolean loadAutoSelected() { - return Platform.INSTANCE.getConfig().getGrid().isAutoSelected(); - } - - public boolean isAutoSelected() { - return autoSelected; - } - private GridSynchronizer loadSynchronizer() { return Platform.INSTANCE .getConfig() diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/GridSearchBox.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/GridSearchBox.java index be4620b64..4bb9d4123 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/GridSearchBox.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/GridSearchBox.java @@ -3,8 +3,6 @@ import java.util.function.Consumer; public interface GridSearchBox { - void setAutoSelected(boolean autoSelected); - void setValue(String value); void setValid(boolean valid); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java index de723ef18..cfa88b4b9 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java @@ -23,6 +23,7 @@ import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import com.refinedmods.refinedstorage.common.support.stretching.AbstractStretchingScreen; import com.refinedmods.refinedstorage.common.support.tooltip.SmallTextClientTooltipComponent; +import com.refinedmods.refinedstorage.common.support.widget.AutoSelectedSideButtonWidget; import com.refinedmods.refinedstorage.common.support.widget.History; import com.refinedmods.refinedstorage.common.support.widget.RedstoneModeSideButtonWidget; import com.refinedmods.refinedstorage.common.support.widget.TextMarquee; @@ -113,7 +114,7 @@ protected void init(final int rows) { addSideButton(new ResourceTypeSideButtonWidget(getMenu())); addSideButton(new SortingDirectionSideButtonWidget(getMenu())); addSideButton(new SortingTypeSideButtonWidget(getMenu())); - addSideButton(new AutoSelectedSideButtonWidget(getMenu())); + addSideButton(new AutoSelectedSideButtonWidget(searchField)); final boolean onlyHasNoopSynchronizer = RefinedStorageApi.INSTANCE.getGridSynchronizerRegistry() .getAll() diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AutoSelectedSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AutoSelectedSideButtonWidget.java deleted file mode 100644 index 43796c69a..000000000 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AutoSelectedSideButtonWidget.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.refinedmods.refinedstorage.common.grid.screen; - -import com.refinedmods.refinedstorage.common.grid.AbstractGridContainerMenu; -import com.refinedmods.refinedstorage.common.support.widget.AbstractSideButtonWidget; -import com.refinedmods.refinedstorage.common.util.IdentifierUtil; - -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.MutableComponent; -import net.minecraft.resources.ResourceLocation; - -import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; -import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; - -class AutoSelectedSideButtonWidget extends AbstractSideButtonWidget { - private static final MutableComponent TITLE = createTranslation("gui", "grid.auto_selected"); - private static final ResourceLocation YES = createIdentifier("widget/side_button/grid/autoselected/yes"); - private static final ResourceLocation NO = createIdentifier("widget/side_button/grid/autoselected/no"); - private static final Component HELP = createTranslation("gui", "grid.auto_selected.help"); - - private final AbstractGridContainerMenu menu; - - AutoSelectedSideButtonWidget(final AbstractGridContainerMenu menu) { - super(createPressAction(menu)); - this.menu = menu; - } - - private static OnPress createPressAction(final AbstractGridContainerMenu menu) { - return btn -> menu.setAutoSelected(!menu.isAutoSelected()); - } - - @Override - protected ResourceLocation getSprite() { - return menu.isAutoSelected() ? YES : NO; - } - - @Override - protected MutableComponent getTitle() { - return TITLE; - } - - @Override - protected MutableComponent getSubText() { - return menu.isAutoSelected() ? IdentifierUtil.YES : IdentifierUtil.NO; - } - - @Override - protected Component getHelpText() { - return HELP; - } -} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/GridSearchBoxWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/GridSearchBoxWidget.java index 46f461841..f68d07ea9 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/GridSearchBoxWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/GridSearchBoxWidget.java @@ -70,12 +70,6 @@ private Lexer createLexer(final String text) { return new Lexer(new Source("Grid search box syntax highlighting", text), LexerTokenMappings.DEFAULT_MAPPINGS); } - @Override - public void setAutoSelected(final boolean autoSelected) { - setFocused(autoSelected); - setCanLoseFocus(!autoSelected); - } - @Override public void addListener(final Consumer listener) { this.listeners.add(listener); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AutoSelectedSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AutoSelectedSideButtonWidget.java new file mode 100644 index 000000000..7a0c8dec2 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/AutoSelectedSideButtonWidget.java @@ -0,0 +1,50 @@ +package com.refinedmods.refinedstorage.common.support.widget; + +import com.refinedmods.refinedstorage.common.Platform; +import com.refinedmods.refinedstorage.common.util.IdentifierUtil; + +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.resources.ResourceLocation; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; + +public class AutoSelectedSideButtonWidget extends AbstractSideButtonWidget { + private static final MutableComponent TITLE = createTranslation("gui", "search_box_auto_selected"); + private static final ResourceLocation YES = createIdentifier("widget/side_button/search_box_auto_selected/yes"); + private static final ResourceLocation NO = createIdentifier("widget/side_button/search_box_auto_selected/no"); + private static final Component HELP = createTranslation("gui", "search_box_auto_selected.help"); + + public AutoSelectedSideButtonWidget(final SearchFieldWidget searchFieldWidget) { + super(createPressAction(searchFieldWidget)); + } + + private static OnPress createPressAction(final SearchFieldWidget searchFieldWidget) { + return btn -> { + final boolean autoSelected = !Platform.INSTANCE.getConfig().isSearchBoxAutoSelected(); + Platform.INSTANCE.getConfig().setSearchBoxAutoSelected(autoSelected); + searchFieldWidget.setAutoSelected(autoSelected); + }; + } + + @Override + protected ResourceLocation getSprite() { + return Platform.INSTANCE.getConfig().isSearchBoxAutoSelected() ? YES : NO; + } + + @Override + protected MutableComponent getTitle() { + return TITLE; + } + + @Override + protected MutableComponent getSubText() { + return Platform.INSTANCE.getConfig().isSearchBoxAutoSelected() ? IdentifierUtil.YES : IdentifierUtil.NO; + } + + @Override + protected Component getHelpText() { + return HELP; + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/SearchFieldWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/SearchFieldWidget.java index 4d7c9603b..3646931d8 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/SearchFieldWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/SearchFieldWidget.java @@ -18,8 +18,9 @@ public SearchFieldWidget(final Font font, final History history) { super(font, x, y, width, font.lineHeight, Component.empty()); this.history = history; - this.setBordered(false); - this.setMaxLength(256); + setBordered(false); + setMaxLength(256); + setAutoSelected(Platform.INSTANCE.getConfig().isSearchBoxAutoSelected()); } @Override @@ -83,6 +84,11 @@ private void toggleFocus() { saveHistory(); } + public void setAutoSelected(final boolean autoSelected) { + setFocused(autoSelected); + setCanLoseFocus(!autoSelected); + } + private void saveHistory() { history.save(getValue()); } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json index 099ce5617..82ad7507f 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -59,8 +59,6 @@ "gui.refinedstorage.grid.sorting.type.name": "Name", "gui.refinedstorage.grid.sorting.type.id": "ID", "gui.refinedstorage.grid.sorting.type.last_modified": "Last modified", - "gui.refinedstorage.grid.auto_selected": "Auto-selected", - "gui.refinedstorage.grid.auto_selected.help": "Whether to auto-select the search box when opening the Grid.", "gui.refinedstorage.grid.synchronization_mode": "Synchronization mode", "gui.refinedstorage.grid.synchronization_mode.off": "Off", "gui.refinedstorage.grid.synchronization_mode.off.help": "Don't sync the search box text.", @@ -93,6 +91,8 @@ "gui.refinedstorage.screen_size.medium": "Medium", "gui.refinedstorage.screen_size.large": "Large", "gui.refinedstorage.screen_size.extra_large": "Extra large", + "gui.refinedstorage.search_box_auto_selected": "Search box auto-selected", + "gui.refinedstorage.search_box_auto_selected.help": "Whether to auto-select the search box.", "gui.refinedstorage.detector.mode": "Mode", "gui.refinedstorage.detector.mode.under": "Emit redstone signal when under the amount", "gui.refinedstorage.detector.mode.equal": "Emit redstone signal when on the amount", @@ -442,6 +442,8 @@ "text.autoconfig.refinedstorage.option.screenSize.tooltip": "The screen size.", "text.autoconfig.refinedstorage.option.maxRowsStretch": "Maximum amount of rows when screen size is stretched", "text.autoconfig.refinedstorage.option.maxRowsStretch.tooltip": "The maximum amount of rows that can be displayed when the screen size is stretched.", + "text.autoconfig.refinedstorage.option.searchBoxAutoSelected": "Auto-selected search box", + "text.autoconfig.refinedstorage.option.searchBoxAutoSelected.tooltip": "Whether the search box should be auto-selected.", "text.autoconfig.refinedstorage.option.grid": "Grid", "text.autoconfig.refinedstorage.option.grid.tooltip": "Configuration for the Grid.", "text.autoconfig.refinedstorage.option.grid.largeFont": "Large font", @@ -454,8 +456,6 @@ "text.autoconfig.refinedstorage.option.grid.rememberSearchQuery.tooltip": "Whether the search query should persist when closing and re-opening the Grid.", "text.autoconfig.refinedstorage.option.grid.energyUsage": "Energy usage", "text.autoconfig.refinedstorage.option.grid.energyUsage.tooltip": "The energy used by the Grid.", - "text.autoconfig.refinedstorage.option.grid.autoSelected": "Auto selected search box", - "text.autoconfig.refinedstorage.option.grid.autoSelected.tooltip": "Whether the search box should be auto-selected when opening the Grid.", "text.autoconfig.refinedstorage.option.grid.synchronizer": "Synchronizer", "text.autoconfig.refinedstorage.option.grid.synchronizer.tooltip": "The synchronization type of the Grid search box.", "text.autoconfig.refinedstorage.option.grid.resourceType": "Resource type", diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/grid/autoselected/no.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/search_box_auto_selected/no.png similarity index 100% rename from refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/grid/autoselected/no.png rename to refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/search_box_auto_selected/no.png diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/grid/autoselected/yes.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/search_box_auto_selected/yes.png similarity index 100% rename from refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/grid/autoselected/yes.png rename to refinedstorage-common/src/main/resources/assets/refinedstorage/textures/gui/sprites/widget/side_button/search_box_auto_selected/yes.png diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java index 1f5b809c7..1f790e368 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java @@ -25,6 +25,8 @@ public class ConfigImpl implements ConfigData, com.refinedmods.refinedstorage.co private boolean smoothScrolling = true; + private boolean searchBoxAutoSelected = false; + @ConfigEntry.BoundedDiscrete(min = 3L, max = 256) private int maxRowsStretch = 256; @@ -152,6 +154,17 @@ public boolean isSmoothScrolling() { return smoothScrolling; } + @Override + public boolean isSearchBoxAutoSelected() { + return searchBoxAutoSelected; + } + + @Override + public void setSearchBoxAutoSelected(final boolean searchBoxAutoSelected) { + this.searchBoxAutoSelected = searchBoxAutoSelected; + AutoConfig.getConfigHolder(ConfigImpl.class).save(); + } + @Override public int getMaxRowsStretch() { return maxRowsStretch; @@ -318,8 +331,6 @@ private static class GridEntryImpl implements GridEntry { private boolean rememberSearchQuery = false; - private boolean autoSelected = false; - private String synchronizer = ""; private String resourceType = ""; @@ -355,17 +366,6 @@ public long getEnergyUsage() { return energyUsage; } - @Override - public boolean isAutoSelected() { - return autoSelected; - } - - @Override - public void setAutoSelected(final boolean autoSelected) { - this.autoSelected = autoSelected; - save(); - } - @Override public Optional getSynchronizer() { if (synchronizer.trim().isBlank()) { diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java index e0a678423..d3e6dd7c2 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java @@ -27,6 +27,7 @@ public class ConfigImpl implements Config { private final ModConfigSpec.EnumValue screenSize; private final ModConfigSpec.BooleanValue smoothScrolling; private final ModConfigSpec.IntValue maxRowsStretch; + private final ModConfigSpec.BooleanValue searchBoxAutoSelected; private final SimpleEnergyUsageEntry cable; private final ControllerEntry controller; private final DiskDriveEntry diskDrive; @@ -68,6 +69,9 @@ public ConfigImpl() { maxRowsStretch = builder .translation(translationKey("maxRowsStretch")) .defineInRange("maxRowsStretch", 256, 3, 256); + searchBoxAutoSelected = builder + .translation(translationKey("searchBoxAutoSelected")) + .define("searchBoxAutoSelected", false); cable = new SimpleEnergyUsageEntryImpl("cable", DefaultEnergyUsage.CABLE); controller = new ControllerEntryImpl(); diskDrive = new DiskDriveEntryImpl(); @@ -137,6 +141,19 @@ public void setScreenSize(final ScreenSize screenSize) { } } + @Override + public boolean isSearchBoxAutoSelected() { + return searchBoxAutoSelected.get(); + } + + @Override + public void setSearchBoxAutoSelected(final boolean searchBoxAutoSelected) { + if (searchBoxAutoSelected != Boolean.TRUE.equals(this.searchBoxAutoSelected.get())) { + this.searchBoxAutoSelected.set(searchBoxAutoSelected); + ConfigImpl.this.spec.save(); + } + } + @Override public GridEntry getGrid() { return grid; @@ -384,7 +401,6 @@ private class GridEntryImpl implements GridEntry { private final ModConfigSpec.BooleanValue detailedTooltip; private final ModConfigSpec.BooleanValue rememberSearchQuery; private final ModConfigSpec.LongValue energyUsage; - private final ModConfigSpec.BooleanValue autoSelected; private final ModConfigSpec.ConfigValue synchronizer; private final ModConfigSpec.ConfigValue resourceType; private final ModConfigSpec.EnumValue sortingDirection; @@ -408,9 +424,6 @@ private class GridEntryImpl implements GridEntry { energyUsage = builder .translation(translationKey("grid." + ENERGY_USAGE)) .defineInRange(ENERGY_USAGE, DefaultEnergyUsage.GRID, 0, Long.MAX_VALUE); - autoSelected = builder - .translation(translationKey("grid.autoSelected")) - .define("autoSelected", false); synchronizer = builder .translation(translationKey("grid.synchronizer")) .define("synchronizer", ""); @@ -454,19 +467,6 @@ public long getEnergyUsage() { return energyUsage.get(); } - @Override - public boolean isAutoSelected() { - return autoSelected.get(); - } - - @Override - public void setAutoSelected(final boolean autoSelected) { - if (autoSelected != Boolean.TRUE.equals(this.autoSelected.get())) { - this.autoSelected.set(autoSelected); - ConfigImpl.this.spec.save(); - } - } - @Override public Optional getSynchronizer() { if (synchronizer.get().trim().isBlank()) { From a786a35056631a98074bf0150f6ddf80fe4e649e Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 16 Nov 2024 22:13:26 +0100 Subject: [PATCH 25/30] feat: the search icon now displays a tooltip On how search behaves for that specific UI. --- .../AutocrafterManagerScreen.java | 39 ++++++++++--- .../SearchModeSideButtonWidget.java | 22 +++---- .../patterngrid/AlternativesScreen.java | 13 ++++- .../grid/screen/AbstractGridScreen.java | 23 +++++--- .../common/support/Sprites.java | 2 - .../support/widget/SearchIconWidget.java | 57 +++++++++++++++++++ .../assets/refinedstorage/lang/en_us.json | 5 ++ 7 files changed, 125 insertions(+), 36 deletions(-) create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/SearchIconWidget.java diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java index ae85c9e4e..9d4e345ce 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/AutocrafterManagerScreen.java @@ -8,23 +8,25 @@ import com.refinedmods.refinedstorage.common.support.widget.History; import com.refinedmods.refinedstorage.common.support.widget.RedstoneModeSideButtonWidget; import com.refinedmods.refinedstorage.common.support.widget.SearchFieldWidget; +import com.refinedmods.refinedstorage.common.support.widget.SearchIconWidget; import com.refinedmods.refinedstorage.common.support.widget.TextMarquee; import java.util.ArrayList; import java.util.List; import javax.annotation.Nullable; +import net.minecraft.ChatFormatting; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.inventory.Slot; -import static com.refinedmods.refinedstorage.common.support.Sprites.SEARCH_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; -// TODO: tooltip on search icon public class AutocrafterManagerScreen extends AbstractStretchingScreen { private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/autocrafter_manager.png"); private static final List SEARCH_FIELD_HISTORY = new ArrayList<>(); @@ -32,6 +34,15 @@ public class AutocrafterManagerScreen extends AbstractStretchingScreen getMenu().setQuery(value)); + addRenderableWidget(new SearchIconWidget( + leftPos + 79, + topPos + 5, + () -> getSearchModeHelp().copy().withStyle(ChatFormatting.GRAY), + searchField + )); + addSideButton(new RedstoneModeSideButtonWidget(getMenu().getProperty(PropertyTypes.REDSTONE_MODE))); addSideButton(new ViewTypeSideButtonWidget(getMenu())); - addSideButton(new SearchModeSideButtonWidget(getMenu())); + addSideButton(new SearchModeSideButtonWidget(getMenu(), this::getSearchModeHelp)); addSideButton(new AutoSelectedSideButtonWidget(searchField)); } + private Component getSearchModeHelp() { + return switch (menu.getSearchMode()) { + case ALL -> HELP_ALL; + case PATTERN_INPUTS -> HELP_PATTERN_INPUTS; + case PATTERN_OUTPUTS -> HELP_PATTERN_OUTPUTS; + case AUTOCRAFTER_NAMES -> HELP_AUTOCRAFTER_NAMES; + }; + } + private void updateScrollbar() { final int totalRows = menu.getGroups() .stream() @@ -93,12 +120,6 @@ protected void scrollbarChanged(final int rows) { } } - @Override - protected void renderBg(final GuiGraphics graphics, final float delta, final int mouseX, final int mouseY) { - super.renderBg(graphics, delta, mouseX, mouseY); - graphics.blitSprite(Sprites.SEARCH, leftPos + 79, topPos + 5, SEARCH_SIZE, SEARCH_SIZE); - } - @Override public void render(final GuiGraphics graphics, final int mouseX, final int mouseY, final float partialTicks) { super.render(graphics, mouseX, mouseY, partialTicks); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/SearchModeSideButtonWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/SearchModeSideButtonWidget.java index 346f56af7..2cdef6a5d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/SearchModeSideButtonWidget.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/autocraftermanager/SearchModeSideButtonWidget.java @@ -2,6 +2,8 @@ import com.refinedmods.refinedstorage.common.support.widget.AbstractSideButtonWidget; +import java.util.function.Supplier; + import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; @@ -12,20 +14,12 @@ class SearchModeSideButtonWidget extends AbstractSideButtonWidget { private static final MutableComponent TITLE = createTranslation("gui", "autocrafter_manager.search_mode"); private static final MutableComponent SUBTEXT_ALL = createTranslation("gui", "autocrafter_manager.search_mode.all"); - private static final MutableComponent HELP_ALL = - createTranslation("gui", "autocrafter_manager.search_mode.all.help"); private static final MutableComponent SUBTEXT_PATTERN_INPUTS = createTranslation("gui", "autocrafter_manager.search_mode.pattern_inputs"); - private static final MutableComponent HELP_PATTERN_INPUTS = - createTranslation("gui", "autocrafter_manager.search_mode.pattern_inputs.help"); private static final MutableComponent SUBTEXT_PATTERN_OUTPUTS = createTranslation("gui", "autocrafter_manager.search_mode.pattern_outputs"); - private static final MutableComponent HELP_PATTERN_OUTPUTS = - createTranslation("gui", "autocrafter_manager.search_mode.pattern_outputs.help"); private static final MutableComponent SUBTEXT_AUTOCRAFTER_NAMES = createTranslation("gui", "autocrafter_manager.search_mode.autocrafter_names"); - private static final MutableComponent HELP_AUTOCRAFTER_NAMES = - createTranslation("gui", "autocrafter_manager.search_mode.autocrafter_names.help"); private static final ResourceLocation SPRITE_ALL = createIdentifier("widget/side_button/autocrafter_manager/search_mode/all"); private static final ResourceLocation SPRITE_PATTERN_INPUTS = @@ -36,10 +30,13 @@ class SearchModeSideButtonWidget extends AbstractSideButtonWidget { createIdentifier("widget/side_button/autocrafter_manager/search_mode/autocrafter_names"); private final AutocrafterManagerContainerMenu containerMenu; + private final Supplier helpTextSupplier; - SearchModeSideButtonWidget(final AutocrafterManagerContainerMenu containerMenu) { + SearchModeSideButtonWidget(final AutocrafterManagerContainerMenu containerMenu, + final Supplier helpTextSupplier) { super(createPressAction(containerMenu)); this.containerMenu = containerMenu; + this.helpTextSupplier = helpTextSupplier; } private static OnPress createPressAction(final AutocrafterManagerContainerMenu containerMenu) { @@ -73,11 +70,6 @@ protected MutableComponent getSubText() { @Override protected Component getHelpText() { - return switch (containerMenu.getSearchMode()) { - case ALL -> HELP_ALL; - case PATTERN_INPUTS -> HELP_PATTERN_INPUTS; - case PATTERN_OUTPUTS -> HELP_PATTERN_OUTPUTS; - case AUTOCRAFTER_NAMES -> HELP_AUTOCRAFTER_NAMES; - }; + return helpTextSupplier.get(); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/patterngrid/AlternativesScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/patterngrid/AlternativesScreen.java index cbfeacfc6..334166aa1 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/patterngrid/AlternativesScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/patterngrid/AlternativesScreen.java @@ -10,6 +10,7 @@ import com.refinedmods.refinedstorage.common.support.widget.CustomCheckboxWidget; import com.refinedmods.refinedstorage.common.support.widget.HoveredImageButton; import com.refinedmods.refinedstorage.common.support.widget.ScrollbarWidget; +import com.refinedmods.refinedstorage.common.support.widget.SearchIconWidget; import java.util.ArrayList; import java.util.HashSet; @@ -17,6 +18,7 @@ import java.util.Set; import javax.annotation.Nullable; +import net.minecraft.ChatFormatting; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.EditBox; @@ -30,7 +32,6 @@ import net.minecraft.world.entity.player.Inventory; import org.joml.Vector3f; -import static com.refinedmods.refinedstorage.common.support.Sprites.SEARCH_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; @@ -42,6 +43,8 @@ public class AlternativesScreen extends AbstractAmountScreen getMenu().filter(query)); addRenderableWidget(searchField); + + addRenderableWidget(new SearchIconWidget( + leftPos + 7, + topPos + 107, + () -> SEARCH_HELP, + searchField + )); } private int getInsetY() { @@ -300,7 +310,6 @@ public void render(final GuiGraphics graphics, final int mouseX, final int mouse @Override protected void renderBg(final GuiGraphics graphics, final float delta, final int mouseX, final int mouseY) { super.renderBg(graphics, delta, mouseX, mouseY); - graphics.blitSprite(Sprites.SEARCH, leftPos + 7, topPos + 107, SEARCH_SIZE, SEARCH_SIZE); final int x = getInsetX(); final int y = getInsetY(); graphics.enableScissor(x, y, x + INSET_WIDTH, y + INSET_HEIGHT); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java index cfa88b4b9..e9d570941 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/AbstractGridScreen.java @@ -16,7 +16,6 @@ import com.refinedmods.refinedstorage.common.grid.NoopGridSynchronizer; import com.refinedmods.refinedstorage.common.grid.view.ItemGridResource; import com.refinedmods.refinedstorage.common.support.ResourceSlotRendering; -import com.refinedmods.refinedstorage.common.support.Sprites; import com.refinedmods.refinedstorage.common.support.containermenu.DisabledSlot; import com.refinedmods.refinedstorage.common.support.containermenu.PropertyTypes; import com.refinedmods.refinedstorage.common.support.containermenu.ResourceSlot; @@ -26,6 +25,7 @@ import com.refinedmods.refinedstorage.common.support.widget.AutoSelectedSideButtonWidget; import com.refinedmods.refinedstorage.common.support.widget.History; import com.refinedmods.refinedstorage.common.support.widget.RedstoneModeSideButtonWidget; +import com.refinedmods.refinedstorage.common.support.widget.SearchIconWidget; import com.refinedmods.refinedstorage.common.support.widget.TextMarquee; import com.refinedmods.refinedstorage.query.lexer.SyntaxHighlighter; import com.refinedmods.refinedstorage.query.lexer.SyntaxHighlighterColors; @@ -51,7 +51,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static com.refinedmods.refinedstorage.common.support.Sprites.SEARCH_SIZE; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslationKey; @@ -66,6 +65,13 @@ public abstract class AbstractGridScreen ex private static final int COLUMNS = 9; private static final int DISABLED_SLOT_COLOR = 0xFF5B5B5B; private static final List SEARCH_FIELD_HISTORY = new ArrayList<>(); + private static final Component SEARCH_HELP = createTranslation("gui", "grid.search_help") + .append("\n") + .append(createTranslation("gui", "grid.search_help.mod_search").withStyle(ChatFormatting.GRAY)) + .append("\n") + .append(createTranslation("gui", "grid.search_help.tag_search").withStyle(ChatFormatting.GRAY)) + .append("\n") + .append(createTranslation("gui", "grid.search_help.tooltip_search").withStyle(ChatFormatting.GRAY)); protected final int bottomHeight; @@ -116,6 +122,13 @@ protected void init(final int rows) { addSideButton(new SortingTypeSideButtonWidget(getMenu())); addSideButton(new AutoSelectedSideButtonWidget(searchField)); + addRenderableWidget(new SearchIconWidget( + leftPos + 79, + topPos + 5, + () -> SEARCH_HELP, + searchField + )); + final boolean onlyHasNoopSynchronizer = RefinedStorageApi.INSTANCE.getGridSynchronizerRegistry() .getAll() .stream() @@ -160,12 +173,6 @@ private boolean isOverStorageArea(final int mouseX, final int mouseY) { && isInStretchedArea(relativeMouseY); } - @Override - protected void renderBg(final GuiGraphics graphics, final float delta, final int mouseX, final int mouseY) { - super.renderBg(graphics, delta, mouseX, mouseY); - graphics.blitSprite(Sprites.SEARCH, leftPos + 79, topPos + 5, SEARCH_SIZE, SEARCH_SIZE); - } - @Override protected void renderStretchingBackground(final GuiGraphics graphics, final int x, final int y, final int rows) { for (int row = 0; row < rows; ++row) { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/Sprites.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/Sprites.java index a29fc360e..ab0897790 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/Sprites.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/Sprites.java @@ -11,8 +11,6 @@ public final class Sprites { public static final int LIGHT_ARROW_HEIGHT = 15; public static final ResourceLocation WARNING = createIdentifier("warning"); public static final int WARNING_SIZE = 10; - public static final ResourceLocation SEARCH = createIdentifier("search"); - public static final int SEARCH_SIZE = 12; public static final int ERROR_SIZE = 12; public static final ResourceLocation ERROR = createIdentifier("error"); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/SearchIconWidget.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/SearchIconWidget.java new file mode 100644 index 000000000..802cebef6 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/widget/SearchIconWidget.java @@ -0,0 +1,57 @@ +package com.refinedmods.refinedstorage.common.support.widget; + +import java.util.function.Supplier; + +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.AbstractWidget; +import net.minecraft.client.gui.components.EditBox; +import net.minecraft.client.gui.components.Tooltip; +import net.minecraft.client.gui.narration.NarrationElementOutput; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; + +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; + +public class SearchIconWidget extends AbstractWidget { + public static final ResourceLocation SEARCH = createIdentifier("search"); + public static final int SEARCH_SIZE = 12; + + private final Supplier messageSupplier; + private final EditBox editBox; + + public SearchIconWidget(final int x, + final int y, + final Supplier messageSupplier, + final EditBox editBox) { + super(x, y, SEARCH_SIZE, SEARCH_SIZE, Component.empty()); + this.messageSupplier = messageSupplier; + this.editBox = editBox; + } + + @Override + public boolean mouseClicked(final double mouseX, final double mouseY, final int button) { + if (super.mouseClicked(mouseX, mouseY, button)) { + editBox.setFocused(true); + return true; + } + return false; + } + + @Override + protected void renderWidget(final GuiGraphics graphics, + final int mouseX, + final int mouseY, + final float partialTicks) { + graphics.blitSprite(SEARCH, getX(), getY(), SEARCH_SIZE, SEARCH_SIZE); + if (isHovered) { + setTooltip(Tooltip.create(messageSupplier.get())); + } else { + setTooltip(null); + } + } + + @Override + protected void updateWidgetNarration(final NarrationElementOutput narrationElementOutput) { + // no op + } +} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json index 82ad7507f..ac8896191 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -69,6 +69,10 @@ "gui.refinedstorage.grid.pattern_in_inventory": "This resource has a pattern in your inventory.", "gui.refinedstorage.grid.click_to_autocraft": "Click to autocraft", "gui.refinedstorage.grid.ctrl_click_to_autocraft": "CTRL + click to autocraft", + "gui.refinedstorage.grid.search_help": "Search through resources in storage.", + "gui.refinedstorage.grid.search_help.mod_search": "Use '@' to filter for resources from a specific mod", + "gui.refinedstorage.grid.search_help.tag_search": "Use '$' to filter for resources with a specific tag", + "gui.refinedstorage.grid.search_help.tooltip_search": "Use '#' to filter for resources with a specific tooltip", "gui.refinedstorage.crafting_grid.move.network": "Move items to network", "gui.refinedstorage.crafting_grid.move.inventory": "Move items to inventory", "gui.refinedstorage.crafting_grid.press_shift_ctrl_to_only_show_items_used_in_crafting": "Press SHIFT + CTRL to only show items used in the recipe.", @@ -85,6 +89,7 @@ "gui.refinedstorage.pattern_grid.processing.allowed_alternatives": "Allowed alternatives:", "gui.refinedstorage.pattern_grid.alternatives": "Alternatives", "gui.refinedstorage.pattern_grid.alternatives.expand": "Expand", + "gui.refinedstorage.pattern_grid.alternatives.search_help": "Search through tag names.", "gui.refinedstorage.screen_size": "Screen size", "gui.refinedstorage.screen_size.stretch": "Stretch", "gui.refinedstorage.screen_size.small": "Small", From 681830813b7272ca9b0c2fbcc10376d9d515fd8f Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sun, 17 Nov 2024 09:49:24 +0100 Subject: [PATCH 26/30] refactor: autocrafting monitor now delegates to network --- .../status/TaskStatusProvider.java | 2 + .../common/AbstractModInitializer.java | 3 +- ...tractAutocraftingMonitorContainerMenu.java | 41 +++++------ .../monitor/AutocraftingMonitor.java | 9 +++ .../AutocraftingMonitorBlockEntity.java | 70 ++++++++++++++++--- .../AutocraftingMonitorContainerMenu.java | 20 +----- .../monitor/AutocraftingMonitorScreen.java | 2 +- .../monitor/AutocraftingMonitorWatcher.java | 2 +- .../monitor/TaskStatusProviderImpl.java | 7 +- .../grid/AbstractGridContainerMenu.java | 20 ++---- .../AutocraftingNetworkComponent.java | 3 +- .../test/fixtures/FakeTaskStatusProvider.java | 40 +++++++++++ .../test/fixtures/NetworkTestFixtures.java | 2 +- .../AutocraftingNetworkComponentImpl.java | 39 +++++++++++ .../AutocraftingNetworkComponentImplTest.java | 3 +- 15 files changed, 190 insertions(+), 73 deletions(-) create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitor.java create mode 100644 refinedstorage-network-test/src/main/java/com/refinedmods/refinedstorage/network/test/fixtures/FakeTaskStatusProvider.java diff --git a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.java b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.java index a74424707..8fbc08337 100644 --- a/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.java +++ b/refinedstorage-autocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.java @@ -17,4 +17,6 @@ public interface TaskStatusProvider { void cancel(TaskId taskId); void cancelAll(); + + void testUpdate(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java index 454a34aa4..5f7f8d8ee 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java @@ -28,6 +28,7 @@ import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorData; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.TaskStatusProviderImpl; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridData; @@ -276,7 +277,7 @@ private void registerNetworkComponents() { ); RefinedStorageApi.INSTANCE.getNetworkComponentMapFactory().addFactory( AutocraftingNetworkComponent.class, - network -> new AutocraftingNetworkComponentImpl() + network -> new AutocraftingNetworkComponentImpl(new TaskStatusProviderImpl()) ); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AbstractAutocraftingMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AbstractAutocraftingMonitorContainerMenu.java index cf639c9d5..88fc8fe48 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AbstractAutocraftingMonitorContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AbstractAutocraftingMonitorContainerMenu.java @@ -3,7 +3,6 @@ import com.refinedmods.refinedstorage.api.autocrafting.TaskId; import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; -import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; import com.refinedmods.refinedstorage.common.support.AbstractBaseContainerMenu; import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; import com.refinedmods.refinedstorage.common.support.packet.s2c.S2CPackets; @@ -25,7 +24,7 @@ public abstract class AbstractAutocraftingMonitorContainerMenu extends AbstractB private final List tasks; private final List tasksView; @Nullable - private final TaskStatusProvider taskStatusProvider; + private final AutocraftingMonitor autocraftingMonitor; private final Player player; @Nullable @@ -46,38 +45,40 @@ protected AbstractAutocraftingMonitorContainerMenu(final MenuType menuType, this.tasks = data.statuses().stream().map(TaskStatus::info).collect(Collectors.toList()); this.tasksView = Collections.unmodifiableList(tasks); this.currentTaskId = data.statuses().isEmpty() ? null : data.statuses().getFirst().info().id(); - this.taskStatusProvider = null; + this.autocraftingMonitor = null; this.active = data.active(); this.player = playerInventory.player; } - protected AbstractAutocraftingMonitorContainerMenu(final MenuType menuType, - final int syncId, - final Player player, - final TaskStatusProvider taskStatusProvider) { + AbstractAutocraftingMonitorContainerMenu(final MenuType menuType, + final int syncId, + final Player player, + final AutocraftingMonitor autocraftingMonitor) { super(menuType, syncId); this.statusByTaskId = Collections.emptyMap(); this.tasks = Collections.emptyList(); this.tasksView = Collections.emptyList(); this.currentTaskId = null; - this.taskStatusProvider = taskStatusProvider; + this.autocraftingMonitor = autocraftingMonitor; this.player = player; - taskStatusProvider.addListener(this); + this.autocraftingMonitor.addListener(this); + this.autocraftingMonitor.addWatcher(this); } @Override public void removed(final Player removedPlayer) { super.removed(removedPlayer); - if (taskStatusProvider != null) { - taskStatusProvider.removeListener(this); + if (autocraftingMonitor != null) { + autocraftingMonitor.removeListener(this); + autocraftingMonitor.removeWatcher(this); } } @Override public void broadcastChanges() { super.broadcastChanges(); - if (taskStatusProvider instanceof TaskStatusProviderImpl taskStatusProviderImpl) { - taskStatusProviderImpl.testTick(); + if (autocraftingMonitor != null) { + autocraftingMonitor.testUpdate(); } } @@ -115,7 +116,7 @@ void loadCurrentTask() { @Override public void taskStatusChanged(final TaskStatus status) { - if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + if (autocraftingMonitor != null && player instanceof ServerPlayer serverPlayer) { S2CPackets.sendAutocraftingMonitorTaskStatusChanged(serverPlayer, status); return; } @@ -124,7 +125,7 @@ public void taskStatusChanged(final TaskStatus status) { @Override public void taskRemoved(final TaskId id) { - if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + if (autocraftingMonitor != null && player instanceof ServerPlayer serverPlayer) { S2CPackets.sendAutocraftingMonitorTaskRemoved(serverPlayer, id); return; } @@ -141,7 +142,7 @@ public void taskRemoved(final TaskId id) { @Override public void taskAdded(final TaskStatus status) { - if (taskStatusProvider != null && player instanceof ServerPlayer serverPlayer) { + if (autocraftingMonitor != null && player instanceof ServerPlayer serverPlayer) { S2CPackets.sendAutocraftingMonitorTaskAdded(serverPlayer, status); return; } @@ -157,8 +158,8 @@ public void taskAdded(final TaskStatus status) { } public void cancelTask(final TaskId taskId) { - if (taskStatusProvider != null) { - taskStatusProvider.cancel(taskId); + if (autocraftingMonitor != null) { + autocraftingMonitor.cancel(taskId); } } @@ -169,8 +170,8 @@ void cancelCurrentTask() { } public void cancelAllTasks() { - if (taskStatusProvider != null) { - taskStatusProvider.cancelAll(); + if (autocraftingMonitor != null) { + autocraftingMonitor.cancelAll(); } else { C2SPackets.sendAutocraftingMonitorCancelAll(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitor.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitor.java new file mode 100644 index 000000000..3bb5b3259 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitor.java @@ -0,0 +1,9 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; + +interface AutocraftingMonitor extends TaskStatusProvider { + void addWatcher(AutocraftingMonitorWatcher watcher); + + void removeWatcher(AutocraftingMonitorWatcher watcher); +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java index b9759b6f6..ddd57f10d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java @@ -1,5 +1,10 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; +import com.refinedmods.refinedstorage.api.network.Network; +import com.refinedmods.refinedstorage.api.network.autocrafting.AutocraftingNetworkComponent; import com.refinedmods.refinedstorage.api.network.impl.node.SimpleNetworkNode; import com.refinedmods.refinedstorage.common.Platform; import com.refinedmods.refinedstorage.common.content.BlockEntities; @@ -8,7 +13,10 @@ import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; import com.refinedmods.refinedstorage.common.support.network.AbstractBaseNetworkNodeContainerBlockEntity; +import java.util.Collections; import java.util.HashSet; +import java.util.List; +import java.util.Optional; import java.util.Set; import net.minecraft.core.BlockPos; @@ -21,7 +29,7 @@ import net.minecraft.world.level.block.state.BlockState; public class AutocraftingMonitorBlockEntity extends AbstractBaseNetworkNodeContainerBlockEntity - implements NetworkNodeExtendedMenuProvider { + implements NetworkNodeExtendedMenuProvider, AutocraftingMonitor { private final Set watchers = new HashSet<>(); public AutocraftingMonitorBlockEntity(final BlockPos pos, final BlockState state) { @@ -30,14 +38,6 @@ public AutocraftingMonitorBlockEntity(final BlockPos pos, final BlockState state )); } - void addWatcher(final AutocraftingMonitorWatcher watcher) { - watchers.add(watcher); - } - - void removeWatcher(final AutocraftingMonitorWatcher watcher) { - watchers.remove(watcher); - } - @Override protected void activenessChanged(final boolean newActive) { super.activenessChanged(newActive); @@ -57,7 +57,7 @@ protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState @Override public AutocraftingMonitorData getMenuData() { - return new AutocraftingMonitorData(new TaskStatusProviderImpl().getStatuses(), mainNetworkNode.isActive()); + return new AutocraftingMonitorData(getStatuses(), mainNetworkNode.isActive()); } @Override @@ -67,6 +67,54 @@ public StreamEncoder getMenuCo @Override public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { - return new AutocraftingMonitorContainerMenu(syncId, player, new TaskStatusProviderImpl(), this); + return new AutocraftingMonitorContainerMenu(syncId, player, this); + } + + private Optional getAutocrafting() { + final Network network = mainNetworkNode.getNetwork(); + if (network == null) { + return Optional.empty(); + } + return Optional.of(network.getComponent(AutocraftingNetworkComponent.class)); + } + + @Override + public List getStatuses() { + return getAutocrafting().map(AutocraftingNetworkComponent::getStatuses).orElse(Collections.emptyList()); + } + + @Override + public void addListener(final TaskStatusListener listener) { + getAutocrafting().ifPresent(autocrafting -> autocrafting.addListener(listener)); + } + + @Override + public void removeListener(final TaskStatusListener listener) { + getAutocrafting().ifPresent(autocrafting -> autocrafting.removeListener(listener)); + } + + @Override + public void cancel(final TaskId taskId) { + getAutocrafting().ifPresent(autocrafting -> autocrafting.cancel(taskId)); + } + + @Override + public void cancelAll() { + getAutocrafting().ifPresent(AutocraftingNetworkComponent::cancelAll); + } + + @Override + public void testUpdate() { + getAutocrafting().ifPresent(AutocraftingNetworkComponent::testUpdate); + } + + @Override + public void addWatcher(final AutocraftingMonitorWatcher watcher) { + watchers.add(watcher); + } + + @Override + public void removeWatcher(final AutocraftingMonitorWatcher watcher) { + watchers.remove(watcher); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java index e6d29160f..46a08b825 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorContainerMenu.java @@ -1,48 +1,30 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; -import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; import com.refinedmods.refinedstorage.common.content.Menus; import com.refinedmods.refinedstorage.common.support.RedstoneMode; import com.refinedmods.refinedstorage.common.support.containermenu.ClientProperty; import com.refinedmods.refinedstorage.common.support.containermenu.PropertyTypes; import com.refinedmods.refinedstorage.common.support.containermenu.ServerProperty; -import javax.annotation.Nullable; - import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; public class AutocraftingMonitorContainerMenu extends AbstractAutocraftingMonitorContainerMenu { - @Nullable - private final AutocraftingMonitorBlockEntity autocraftingMonitor; - public AutocraftingMonitorContainerMenu(final int syncId, final Inventory playerInventory, final AutocraftingMonitorData data) { super(Menus.INSTANCE.getAutocraftingMonitor(), syncId, playerInventory, data); registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); - this.autocraftingMonitor = null; } AutocraftingMonitorContainerMenu(final int syncId, final Player player, - final TaskStatusProvider taskStatusProvider, final AutocraftingMonitorBlockEntity autocraftingMonitor) { - super(Menus.INSTANCE.getAutocraftingMonitor(), syncId, player, taskStatusProvider); + super(Menus.INSTANCE.getAutocraftingMonitor(), syncId, player, autocraftingMonitor); registerProperty(new ServerProperty<>( PropertyTypes.REDSTONE_MODE, autocraftingMonitor::getRedstoneMode, autocraftingMonitor::setRedstoneMode )); - this.autocraftingMonitor = autocraftingMonitor; - autocraftingMonitor.addWatcher(this); - } - - @Override - public void removed(final Player removedPlayer) { - super.removed(removedPlayer); - if (autocraftingMonitor != null) { - autocraftingMonitor.removeWatcher(this); - } } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java index d7341a5cc..9ac2e2d80 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorScreen.java @@ -326,7 +326,7 @@ private void renderItemText(final GuiGraphics graphics, final int y) { int yy = y; if (item.stored() > 0) { - renderItemText(graphics, "stored", rendering, x, yy, item.missing()); + renderItemText(graphics, "stored", rendering, x, yy, item.stored()); yy += 7; } if (item.missing() > 0) { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorWatcher.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorWatcher.java index 7ee80632c..56c3c0dca 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorWatcher.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorWatcher.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.autocrafting.monitor; @FunctionalInterface -interface AutocraftingMonitorWatcher { +public interface AutocraftingMonitorWatcher { void activeChanged(boolean active); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java index fc96c9b99..76aeb33fc 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/TaskStatusProviderImpl.java @@ -18,7 +18,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -class TaskStatusProviderImpl implements TaskStatusProvider { +public class TaskStatusProviderImpl implements TaskStatusProvider { private static final Item[] ITEM_SET = new Item[] { Items.DIRT, Items.DIAMOND, @@ -66,12 +66,13 @@ public void cancelAll() { copy.forEach(s -> listeners.forEach(l -> l.taskRemoved(s.info().id()))); } - void testTick() { + @Override + public void testUpdate() { if (ticks++ % 10 != 0) { return; } final int chance = r.nextInt(100); - if (chance < 50) { + if (chance < 50 && statuses.size() < 100) { final TaskStatus status = generateTaskStatus(); statuses.add(status); listeners.forEach(l -> l.taskAdded(status)); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java index 47ea13859..64ca79739 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractGridContainerMenu.java @@ -207,15 +207,14 @@ public void setViewType(final GridViewType viewType) { } public void setSearchBox(final GridSearchBox searchBox) { - registerViewUpdatingListener(searchBox); - configureSearchBox(searchBox); - } - - private void registerViewUpdatingListener(final GridSearchBox theSearchBox) { - theSearchBox.addListener(text -> { + searchBox.addListener(text -> { final boolean valid = onSearchTextChanged(text); - theSearchBox.setValid(valid); + searchBox.setValid(valid); }); + if (Platform.INSTANCE.getConfig().getGrid().isRememberSearchQuery()) { + searchBox.setValue(lastSearchQuery); + searchBox.addListener(AbstractGridContainerMenu::updateLastSearchQuery); + } } private boolean onSearchTextChanged(final String text) { @@ -228,13 +227,6 @@ private boolean onSearchTextChanged(final String text) { } } - private void configureSearchBox(final GridSearchBox theSearchBox) { - if (Platform.INSTANCE.getConfig().getGrid().isRememberSearchQuery()) { - theSearchBox.setValue(lastSearchQuery); - theSearchBox.addListener(AbstractGridContainerMenu::updateLastSearchQuery); - } - } - private static void updateLastSearchQuery(final String text) { lastSearchQuery = text; } diff --git a/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java b/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java index 072ba8151..d7b34c58f 100644 --- a/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java +++ b/refinedstorage-network-api/src/main/java/com/refinedmods/refinedstorage/api/network/autocrafting/AutocraftingNetworkComponent.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; import com.refinedmods.refinedstorage.api.network.NetworkComponent; import com.refinedmods.refinedstorage.api.resource.ResourceKey; @@ -10,7 +11,7 @@ import org.apiguardian.api.API; @API(status = API.Status.STABLE, since = "2.0.0-milestone.4.8") -public interface AutocraftingNetworkComponent extends NetworkComponent, PreviewProvider { +public interface AutocraftingNetworkComponent extends NetworkComponent, PreviewProvider, TaskStatusProvider { void addListener(PatternListener listener); void removeListener(PatternListener listener); diff --git a/refinedstorage-network-test/src/main/java/com/refinedmods/refinedstorage/network/test/fixtures/FakeTaskStatusProvider.java b/refinedstorage-network-test/src/main/java/com/refinedmods/refinedstorage/network/test/fixtures/FakeTaskStatusProvider.java new file mode 100644 index 000000000..9a180e45e --- /dev/null +++ b/refinedstorage-network-test/src/main/java/com/refinedmods/refinedstorage/network/test/fixtures/FakeTaskStatusProvider.java @@ -0,0 +1,40 @@ +package com.refinedmods.refinedstorage.network.test.fixtures; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; + +import java.util.List; + +public class FakeTaskStatusProvider implements TaskStatusProvider { + @Override + public List getStatuses() { + return List.of(); + } + + @Override + public void addListener(final TaskStatusListener listener) { + // no op + } + + @Override + public void removeListener(final TaskStatusListener listener) { + // no op + } + + @Override + public void cancel(final TaskId taskId) { + // no op + } + + @Override + public void cancelAll() { + // no op + } + + @Override + public void testUpdate() { + // no op + } +} diff --git a/refinedstorage-network-test/src/main/java/com/refinedmods/refinedstorage/network/test/fixtures/NetworkTestFixtures.java b/refinedstorage-network-test/src/main/java/com/refinedmods/refinedstorage/network/test/fixtures/NetworkTestFixtures.java index 7be2b7176..86c0261f5 100644 --- a/refinedstorage-network-test/src/main/java/com/refinedmods/refinedstorage/network/test/fixtures/NetworkTestFixtures.java +++ b/refinedstorage-network-test/src/main/java/com/refinedmods/refinedstorage/network/test/fixtures/NetworkTestFixtures.java @@ -39,7 +39,7 @@ public final class NetworkTestFixtures { ); NETWORK_COMPONENT_MAP_FACTORY.addFactory( AutocraftingNetworkComponent.class, - network -> new AutocraftingNetworkComponentImpl() + network -> new AutocraftingNetworkComponentImpl(new FakeTaskStatusProvider()) ); } diff --git a/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java b/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java index e3407c8f3..ed4e2741c 100644 --- a/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java +++ b/refinedstorage-network/src/main/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImpl.java @@ -2,9 +2,13 @@ import com.refinedmods.refinedstorage.api.autocrafting.Pattern; import com.refinedmods.refinedstorage.api.autocrafting.PatternRepositoryImpl; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewItem; import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewType; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusProvider; import com.refinedmods.refinedstorage.api.network.autocrafting.AutocraftingNetworkComponent; import com.refinedmods.refinedstorage.api.network.autocrafting.ParentContainer; import com.refinedmods.refinedstorage.api.network.autocrafting.PatternListener; @@ -22,6 +26,11 @@ public class AutocraftingNetworkComponentImpl implements AutocraftingNetworkComp private final Set providers = new HashSet<>(); private final Set listeners = new HashSet<>(); private final PatternRepositoryImpl patternRepository = new PatternRepositoryImpl(); + private final TaskStatusProvider taskStatusProvider; + + public AutocraftingNetworkComponentImpl(final TaskStatusProvider taskStatusProvider) { + this.taskStatusProvider = taskStatusProvider; + } @Override public void onContainerAdded(final NetworkNodeContainer container) { @@ -88,13 +97,43 @@ public void addListener(final PatternListener listener) { listeners.add(listener); } + @Override + public void addListener(final TaskStatusListener listener) { + taskStatusProvider.addListener(listener); + } + @Override public void removeListener(final PatternListener listener) { listeners.remove(listener); } + @Override + public void removeListener(final TaskStatusListener listener) { + taskStatusProvider.removeListener(listener); + } + @Override public Set getPatterns() { return patternRepository.getAll(); } + + @Override + public List getStatuses() { + return taskStatusProvider.getStatuses(); + } + + @Override + public void cancel(final TaskId taskId) { + taskStatusProvider.cancel(taskId); + } + + @Override + public void cancelAll() { + taskStatusProvider.cancelAll(); + } + + @Override + public void testUpdate() { + taskStatusProvider.testUpdate(); + } } diff --git a/refinedstorage-network/src/test/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImplTest.java b/refinedstorage-network/src/test/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImplTest.java index cebdb63ee..4200f04d6 100644 --- a/refinedstorage-network/src/test/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImplTest.java +++ b/refinedstorage-network/src/test/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImplTest.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage.api.network.impl.node.patternprovider.PatternProviderNetworkNode; import com.refinedmods.refinedstorage.api.network.node.container.NetworkNodeContainer; +import com.refinedmods.refinedstorage.network.test.fixtures.FakeTaskStatusProvider; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -14,7 +15,7 @@ class AutocraftingNetworkComponentImplTest { @BeforeEach void setUp() { - sut = new AutocraftingNetworkComponentImpl(); + sut = new AutocraftingNetworkComponentImpl(new FakeTaskStatusProvider()); } @Test From 4bb264dcdeb57aec9854b437e9578291b806617b Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sun, 17 Nov 2024 11:35:37 +0100 Subject: [PATCH 27/30] feat: wireless autocrafting monitor --- CHANGELOG.md | 2 + config/checkstyle/checkstyle-suppressions.xml | 1 + .../common/AbstractClientModInitializer.java | 9 ++ .../common/AbstractModInitializer.java | 8 ++ .../refinedstorage/common/Config.java | 12 +++ .../monitor/AutocraftingMonitor.java | 2 + .../AutocraftingMonitorBlockEntity.java | 7 +- .../monitor/WirelessAutocraftingMonitor.java | 81 ++++++++++++++++++ ...elessAutocraftingMonitorContainerMenu.java | 19 ++++ ...tocraftingMonitorExtendedMenuProvider.java | 47 ++++++++++ .../WirelessAutocraftingMonitorItem.java | 65 ++++++++++++++ .../common/content/ContentIds.java | 6 ++ .../common/content/ContentNames.java | 12 +++ .../common/content/CreativeModeTabItems.java | 3 + .../common/content/DefaultEnergyUsage.java | 5 ++ .../refinedstorage/common/content/Items.java | 21 +++++ .../common/content/KeyMappings.java | 11 +++ .../refinedstorage/common/content/Menus.java | 13 +++ .../common/grid/WirelessGridItem.java | 8 +- .../assets/refinedstorage/lang/en_us.json | 17 +++- ...reative_wireless_autocrafting_monitor.json | 17 ++++ .../item/wireless_autocrafting_monitor.json | 17 ++++ .../wireless_autocrafting_monitor/active.json | 6 ++ .../inactive.json | 6 ++ .../wireless_autocrafting_monitor/active.png | Bin 0 -> 548 bytes .../inactive.png | Bin 0 -> 522 bytes .../advancement/wireless_monitoring.json | 28 ++++++ .../recipe/wireless_autocrafting_monitor.json | 25 ++++++ .../fabric/ClientModInitializerImpl.java | 16 ++++ .../refinedstorage/fabric/ConfigImpl.java | 39 +++++++++ .../fabric/ModInitializerImpl.java | 32 +++++++ .../neoforge/ClientModInitializer.java | 19 ++++ .../refinedstorage/neoforge/ConfigImpl.java | 65 ++++++++++++++ .../neoforge/ModInitializer.java | 32 +++++++ .../AutocraftingNetworkComponentImplTest.java | 46 ++++++++++ 35 files changed, 692 insertions(+), 5 deletions(-) create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitor.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorContainerMenu.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorExtendedMenuProvider.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorItem.java create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/creative_wireless_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor.json create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor/active.json create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor/inactive.json create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/wireless_autocrafting_monitor/active.png create mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/wireless_autocrafting_monitor/inactive.png create mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/advancement/wireless_monitoring.json create mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/recipe/wireless_autocrafting_monitor.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 01c39d647..6ac22324d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - Autocrafting Monitor +- Wireless Autocrafting Monitor +- Creative Wireless Autocrafting Monitor ### Changed diff --git a/config/checkstyle/checkstyle-suppressions.xml b/config/checkstyle/checkstyle-suppressions.xml index 8b6e49245..3e6eb5b83 100644 --- a/config/checkstyle/checkstyle-suppressions.xml +++ b/config/checkstyle/checkstyle-suppressions.xml @@ -7,6 +7,7 @@ + diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java index 7e4c75034..bbc1b946b 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractClientModInitializer.java @@ -108,6 +108,7 @@ public AutocraftingPreviewScreen create(final AutocraftingPreviewContainerMenu m }); registration.register(Menus.INSTANCE.getAutocrafterManager(), AutocrafterManagerScreen::new); registration.register(Menus.INSTANCE.getAutocraftingMonitor(), AutocraftingMonitorScreen::new); + registration.register(Menus.INSTANCE.getWirelessAutocraftingMonitor(), AutocraftingMonitorScreen::new); } protected static void registerAlternativeGridHints() { @@ -142,6 +143,14 @@ protected static void handleInputEvents() { Items.INSTANCE.getCreativePortableGrid() ); } + final KeyMapping openWirelessAutocraftingMonitor = KeyMappings.INSTANCE.getOpenWirelessAutocraftingMonitor(); + while (openWirelessAutocraftingMonitor != null && openWirelessAutocraftingMonitor.consumeClick()) { + RefinedStorageApi.INSTANCE.useSlotReferencedItem( + player, + Items.INSTANCE.getWirelessAutocraftingMonitor(), + Items.INSTANCE.getCreativeWirelessAutocraftingMonitor() + ); + } } protected static void registerDiskModels() { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java index 5f7f8d8ee..4e2233a1a 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java @@ -29,6 +29,7 @@ import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorData; import com.refinedmods.refinedstorage.common.autocrafting.monitor.TaskStatusProviderImpl; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.WirelessAutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridBlockEntity; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridData; @@ -826,6 +827,13 @@ protected final void registerMenus(final RegistryCallback> callback, AutocraftingMonitorData.STREAM_CODEC ) )); + Menus.INSTANCE.setWirelessAutocraftingMonitor(callback.register( + ContentIds.WIRELESS_AUTOCRAFTING_MONITOR, + () -> extendedMenuTypeFactory.create( + WirelessAutocraftingMonitorContainerMenu::new, + AutocraftingMonitorData.STREAM_CODEC + ) + )); } protected final void registerLootFunctions(final RegistryCallback> callback) { diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java index 9482cbb74..1fd5fb666 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/Config.java @@ -85,6 +85,8 @@ public interface Config { SimpleEnergyUsageEntry getAutocraftingMonitor(); + WirelessAutocraftingMonitorEntry getWirelessAutocraftingMonitor(); + interface SimpleEnergyUsageEntry { long getEnergyUsage(); } @@ -228,4 +230,14 @@ interface AutocrafterManagerEntry extends SimpleEnergyUsageEntry { AutocrafterManagerViewType getViewType(); } + + interface WirelessAutocraftingMonitorEntry { + long getEnergyCapacity(); + + long getOpenEnergyUsage(); + + long getCancelEnergyUsage(); + + long getCancelAllEnergyUsage(); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitor.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitor.java index 3bb5b3259..a3198c9f2 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitor.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitor.java @@ -6,4 +6,6 @@ interface AutocraftingMonitor extends TaskStatusProvider { void addWatcher(AutocraftingMonitorWatcher watcher); void removeWatcher(AutocraftingMonitorWatcher watcher); + + boolean isAutocraftingMonitorActive(); } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java index ddd57f10d..402e57252 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/AutocraftingMonitorBlockEntity.java @@ -57,7 +57,7 @@ protected boolean doesBlockStateChangeWarrantNetworkNodeUpdate(final BlockState @Override public AutocraftingMonitorData getMenuData() { - return new AutocraftingMonitorData(getStatuses(), mainNetworkNode.isActive()); + return new AutocraftingMonitorData(getStatuses(), isAutocraftingMonitorActive()); } @Override @@ -117,4 +117,9 @@ public void addWatcher(final AutocraftingMonitorWatcher watcher) { public void removeWatcher(final AutocraftingMonitorWatcher watcher) { watchers.remove(watcher); } + + @Override + public boolean isAutocraftingMonitorActive() { + return mainNetworkNode.isActive(); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitor.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitor.java new file mode 100644 index 000000000..7fea8c646 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitor.java @@ -0,0 +1,81 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; +import com.refinedmods.refinedstorage.api.network.autocrafting.AutocraftingNetworkComponent; +import com.refinedmods.refinedstorage.api.network.energy.EnergyNetworkComponent; +import com.refinedmods.refinedstorage.common.Platform; +import com.refinedmods.refinedstorage.common.api.support.network.item.NetworkItemContext; + +import java.util.Collections; +import java.util.List; +import java.util.Optional; + +class WirelessAutocraftingMonitor implements AutocraftingMonitor { + private final NetworkItemContext context; + + WirelessAutocraftingMonitor(final NetworkItemContext context) { + this.context = context; + } + + private Optional getAutocrafting() { + return context.resolveNetwork().map(network -> network.getComponent(AutocraftingNetworkComponent.class)); + } + + @Override + public void addWatcher(final AutocraftingMonitorWatcher watcher) { + context.drainEnergy(Platform.INSTANCE.getConfig().getWirelessAutocraftingMonitor().getOpenEnergyUsage()); + } + + @Override + public void removeWatcher(final AutocraftingMonitorWatcher watcher) { + // no op + } + + @Override + public boolean isAutocraftingMonitorActive() { + final boolean networkActive = context.resolveNetwork().map( + network -> network.getComponent(EnergyNetworkComponent.class).getStored() > 0 + ).orElse(false); + return networkActive && context.isActive(); + } + + @Override + public List getStatuses() { + return getAutocrafting().map(AutocraftingNetworkComponent::getStatuses).orElse(Collections.emptyList()); + } + + @Override + public void addListener(final TaskStatusListener listener) { + getAutocrafting().ifPresent(autocrafting -> autocrafting.addListener(listener)); + } + + @Override + public void removeListener(final TaskStatusListener listener) { + getAutocrafting().ifPresent(autocrafting -> autocrafting.removeListener(listener)); + } + + @Override + public void cancel(final TaskId taskId) { + getAutocrafting().ifPresent(autocrafting -> { + autocrafting.cancel(taskId); + context.drainEnergy(Platform.INSTANCE.getConfig().getWirelessAutocraftingMonitor().getCancelEnergyUsage()); + }); + } + + @Override + public void cancelAll() { + getAutocrafting().ifPresent(autocrafting -> { + autocrafting.cancelAll(); + context.drainEnergy( + Platform.INSTANCE.getConfig().getWirelessAutocraftingMonitor().getCancelAllEnergyUsage() + ); + }); + } + + @Override + public void testUpdate() { + getAutocrafting().ifPresent(AutocraftingNetworkComponent::testUpdate); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorContainerMenu.java new file mode 100644 index 000000000..ba5fd82ad --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorContainerMenu.java @@ -0,0 +1,19 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.common.content.Menus; + +import net.minecraft.world.entity.player.Inventory; + +public class WirelessAutocraftingMonitorContainerMenu extends AbstractAutocraftingMonitorContainerMenu { + public WirelessAutocraftingMonitorContainerMenu(final int syncId, + final Inventory playerInventory, + final AutocraftingMonitorData data) { + super(Menus.INSTANCE.getWirelessAutocraftingMonitor(), syncId, playerInventory, data); + } + + WirelessAutocraftingMonitorContainerMenu(final int syncId, + final Inventory playerInventory, + final AutocraftingMonitor autocraftingMonitor) { + super(Menus.INSTANCE.getWirelessAutocraftingMonitor(), syncId, playerInventory.player, autocraftingMonitor); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorExtendedMenuProvider.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorExtendedMenuProvider.java new file mode 100644 index 000000000..d2a643fee --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorExtendedMenuProvider.java @@ -0,0 +1,47 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.common.support.containermenu.ExtendedMenuProvider; + +import javax.annotation.Nullable; + +import net.minecraft.network.RegistryFriendlyByteBuf; +import net.minecraft.network.chat.Component; +import net.minecraft.network.codec.StreamEncoder; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; + +class WirelessAutocraftingMonitorExtendedMenuProvider implements ExtendedMenuProvider { + private final Component name; + private final AutocraftingMonitor autocraftingMonitor; + + WirelessAutocraftingMonitorExtendedMenuProvider(final Component name, + final AutocraftingMonitor autocraftingMonitor) { + this.name = name; + this.autocraftingMonitor = autocraftingMonitor; + } + + @Override + public AutocraftingMonitorData getMenuData() { + return new AutocraftingMonitorData( + autocraftingMonitor.getStatuses(), + autocraftingMonitor.isAutocraftingMonitorActive() + ); + } + + @Override + public StreamEncoder getMenuCodec() { + return AutocraftingMonitorData.STREAM_CODEC; + } + + @Override + public Component getDisplayName() { + return name; + } + + @Nullable + @Override + public AbstractContainerMenu createMenu(final int syncId, final Inventory inventory, final Player player) { + return new WirelessAutocraftingMonitorContainerMenu(syncId, inventory, autocraftingMonitor); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorItem.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorItem.java new file mode 100644 index 000000000..6426f704a --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/monitor/WirelessAutocraftingMonitorItem.java @@ -0,0 +1,65 @@ +package com.refinedmods.refinedstorage.common.autocrafting.monitor; + +import com.refinedmods.refinedstorage.api.network.energy.EnergyStorage; +import com.refinedmods.refinedstorage.api.network.impl.energy.EnergyStorageImpl; +import com.refinedmods.refinedstorage.common.Platform; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.security.SecurityHelper; +import com.refinedmods.refinedstorage.common.api.support.energy.AbstractNetworkEnergyItem; +import com.refinedmods.refinedstorage.common.api.support.network.item.NetworkItemContext; +import com.refinedmods.refinedstorage.common.api.support.slotreference.SlotReference; +import com.refinedmods.refinedstorage.common.content.ContentNames; +import com.refinedmods.refinedstorage.common.security.BuiltinPermission; + +import javax.annotation.Nullable; + +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; + +import static java.util.Objects.requireNonNullElse; + +public class WirelessAutocraftingMonitorItem extends AbstractNetworkEnergyItem { + private final boolean creative; + + public WirelessAutocraftingMonitorItem(final boolean creative) { + super( + new Item.Properties().stacksTo(1), + RefinedStorageApi.INSTANCE.getEnergyItemHelper(), + RefinedStorageApi.INSTANCE.getNetworkItemHelper() + ); + this.creative = creative; + } + + public EnergyStorage createEnergyStorage(final ItemStack stack) { + final EnergyStorage energyStorage = new EnergyStorageImpl( + Platform.INSTANCE.getConfig().getWirelessAutocraftingMonitor().getEnergyCapacity() + ); + return RefinedStorageApi.INSTANCE.asItemEnergyStorage(energyStorage, stack); + } + + @Override + protected void use(@Nullable final Component name, + final ServerPlayer player, + final SlotReference slotReference, + final NetworkItemContext context) { + final boolean isAllowed = context.resolveNetwork() + .map(network -> SecurityHelper.isAllowed(player, BuiltinPermission.OPEN, network)) + .orElse(true); + if (!isAllowed) { + RefinedStorageApi.INSTANCE.sendNoPermissionToOpenMessage( + player, + ContentNames.WIRELESS_AUTOCRAFTING_MONITOR + ); + return; + } + final WirelessAutocraftingMonitor autocraftingMonitor = new WirelessAutocraftingMonitor(context); + final Component correctedName = requireNonNullElse( + name, + creative ? ContentNames.CREATIVE_WIRELESS_AUTOCRAFTING_MONITOR : ContentNames.WIRELESS_AUTOCRAFTING_MONITOR + ); + final var provider = new WirelessAutocraftingMonitorExtendedMenuProvider(correctedName, autocraftingMonitor); + Platform.INSTANCE.getMenuOpener().openMenu(player, provider); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java index 1b3ae4fce..1c3d9cec2 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java @@ -70,6 +70,12 @@ public final class ContentIds { public static final ResourceLocation AUTOCRAFTER = createIdentifier("autocrafter"); public static final ResourceLocation AUTOCRAFTER_MANAGER = createIdentifier("autocrafter_manager"); public static final ResourceLocation AUTOCRAFTING_MONITOR = createIdentifier("autocrafting_monitor"); + public static final ResourceLocation WIRELESS_AUTOCRAFTING_MONITOR = createIdentifier( + "wireless_autocrafting_monitor" + ); + public static final ResourceLocation CREATIVE_WIRELESS_AUTOCRAFTING_MONITOR = createIdentifier( + "creative_wireless_autocrafting_monitor" + ); private ContentIds() { } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java index dcccc402c..dc026ac38 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentNames.java @@ -42,6 +42,14 @@ public final class ContentNames { public static final MutableComponent AUTOCRAFTER = name("autocrafter"); public static final MutableComponent AUTOCRAFTER_MANAGER = name("autocrafter_manager"); public static final MutableComponent AUTOCRAFTING_MONITOR = name("autocrafting_monitor"); + public static final MutableComponent WIRELESS_AUTOCRAFTING_MONITOR = createTranslation( + "item", + "wireless_autocrafting_monitor" + ); + public static final MutableComponent CREATIVE_WIRELESS_AUTOCRAFTING_MONITOR = createTranslation( + "item", + "creative_wireless_autocrafting_monitor" + ); public static final String CLEAR_CRAFTING_MATRIX_TO_NETWORK_TRANSLATION_KEY = createTranslationKey("key", "clear_crafting_grid_matrix_to_network"); @@ -50,6 +58,10 @@ public final class ContentNames { public static final String FOCUS_SEARCH_BAR_TRANSLATION_KEY = createTranslationKey("key", "focus_search_bar"); public static final String OPEN_WIRELESS_GRID_TRANSLATION_KEY = createTranslationKey("key", "open_wireless_grid"); public static final String OPEN_PORTABLE_GRID_TRANSLATION_KEY = createTranslationKey("key", "open_portable_grid"); + public static final String OPEN_WIRELESS_AUTOCRAFTING_MONITOR_TRANSLATION_KEY = createTranslationKey( + "key", + "open_wireless_autocrafting_monitor" + ); private ContentNames() { } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java index c368aeba3..ae1f7c489 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java @@ -115,5 +115,8 @@ private static void appendItems(final Consumer consumer) { itemConsumer.accept(Items.INSTANCE.getSecurityCard()); itemConsumer.accept(Items.INSTANCE.getFallbackSecurityCard()); itemConsumer.accept(Items.INSTANCE.getPattern()); + itemConsumer.accept(Items.INSTANCE.getWirelessAutocraftingMonitor()); + consumer.accept(Items.INSTANCE.getWirelessAutocraftingMonitor().createAtEnergyCapacity()); + itemConsumer.accept(Items.INSTANCE.getCreativeWirelessAutocraftingMonitor()); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java index 12196696f..fcf0cbe09 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/DefaultEnergyUsage.java @@ -67,6 +67,11 @@ public final class DefaultEnergyUsage { public static final long PORTABLE_GRID_INSERT = 5; public static final long PORTABLE_GRID_EXTRACT = 5; + public static final long WIRELESS_AUTOCRAFTING_MONITOR_CAPACITY = 1000; + public static final long WIRELESS_AUTOCRAFTING_MONITOR_OPEN = 5; + public static final long WIRELESS_AUTOCRAFTING_MONITOR_CANCEL = 5; + public static final long WIRELESS_AUTOCRAFTING_MONITOR_CANCEL_ALL = 5; + private DefaultEnergyUsage() { } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java index 9471ab294..99bc66e7a 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Items.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage.common.api.upgrade.AbstractUpgradeItem; import com.refinedmods.refinedstorage.common.autocrafting.PatternItem; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.WirelessAutocraftingMonitorItem; import com.refinedmods.refinedstorage.common.controller.ControllerBlockItem; import com.refinedmods.refinedstorage.common.controller.CreativeControllerBlockItem; import com.refinedmods.refinedstorage.common.grid.WirelessGridItem; @@ -109,6 +110,10 @@ public final class Items { private Supplier fallbackSecurityCard; @Nullable private Supplier pattern; + @Nullable + private Supplier wirelessAutocraftingMonitor; + @Nullable + private Supplier creativeWirelessAutocraftingMonitor; private Items() { } @@ -512,4 +517,20 @@ public PatternItem getPattern() { public void setPattern(final Supplier supplier) { this.pattern = supplier; } + + public WirelessAutocraftingMonitorItem getWirelessAutocraftingMonitor() { + return requireNonNull(wirelessAutocraftingMonitor).get(); + } + + public void setWirelessAutocraftingMonitor(final Supplier supplier) { + this.wirelessAutocraftingMonitor = supplier; + } + + public WirelessAutocraftingMonitorItem getCreativeWirelessAutocraftingMonitor() { + return requireNonNull(creativeWirelessAutocraftingMonitor).get(); + } + + public void setCreativeWirelessAutocraftingMonitor(final Supplier supplier) { + this.creativeWirelessAutocraftingMonitor = supplier; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/KeyMappings.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/KeyMappings.java index ee88ed6ae..b6f3568f1 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/KeyMappings.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/KeyMappings.java @@ -18,6 +18,8 @@ public final class KeyMappings { private KeyMapping openWirelessGrid; @Nullable private KeyMapping openPortableGrid; + @Nullable + private KeyMapping openWirelessAutocraftingMonitor; private KeyMappings() { } @@ -65,4 +67,13 @@ public KeyMapping getOpenPortableGrid() { public void setOpenPortableGrid(final KeyMapping openPortableGrid) { this.openPortableGrid = openPortableGrid; } + + @Nullable + public KeyMapping getOpenWirelessAutocraftingMonitor() { + return openWirelessAutocraftingMonitor; + } + + public void setOpenWirelessAutocraftingMonitor(final KeyMapping openWirelessAutocraftingMonitor) { + this.openWirelessAutocraftingMonitor = openWirelessAutocraftingMonitor; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java index 408b8b124..6984f5744 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Menus.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage.common.autocrafting.autocrafter.AutocrafterContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.autocraftermanager.AutocrafterManagerContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.monitor.AutocraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.WirelessAutocraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu; import com.refinedmods.refinedstorage.common.autocrafting.preview.AutocraftingPreviewContainerMenu; import com.refinedmods.refinedstorage.common.constructordestructor.ConstructorContainerMenu; @@ -101,6 +102,8 @@ public final class Menus { private Supplier> autocrafterManager; @Nullable private Supplier> autocraftingMonitor; + @Nullable + private Supplier> wirelessAutocraftingMonitor; private Menus() { } @@ -348,4 +351,14 @@ public MenuType getAutocraftingMonitor() { public void setAutocraftingMonitor(final Supplier> autocraftingMonitor) { this.autocraftingMonitor = autocraftingMonitor; } + + public MenuType getWirelessAutocraftingMonitor() { + return requireNonNull(wirelessAutocraftingMonitor).get(); + } + + public void setWirelessAutocraftingMonitor( + final Supplier> wirelessAutocraftingMonitor + ) { + this.wirelessAutocraftingMonitor = wirelessAutocraftingMonitor; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGridItem.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGridItem.java index f620203d2..3a3c3d7b4 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGridItem.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGridItem.java @@ -47,14 +47,16 @@ protected void use(@Nullable final Component name, final NetworkItemContext context) { final boolean isAllowed = context.resolveNetwork() .map(network -> SecurityHelper.isAllowed(player, BuiltinPermission.OPEN, network)) - .orElse(true); // if the network can't be resolved that will be apparent later in the UI. + .orElse(true); if (!isAllowed) { RefinedStorageApi.INSTANCE.sendNoPermissionToOpenMessage(player, ContentNames.WIRELESS_GRID); return; } final Grid grid = new WirelessGrid(context); - final Component correctedName = requireNonNullElse(name, - creative ? ContentNames.CREATIVE_WIRELESS_GRID : ContentNames.WIRELESS_GRID); + final Component correctedName = requireNonNullElse( + name, + creative ? ContentNames.CREATIVE_WIRELESS_GRID : ContentNames.WIRELESS_GRID + ); final var provider = new WirelessGridExtendedMenuProvider(correctedName, grid, slotReference); Platform.INSTANCE.getMenuOpener().openMenu(player, provider); } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json index ac8896191..da5e49fda 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -365,6 +365,8 @@ "item.refinedstorage.pattern.help": "Used in autocrafting to store the recipe to be crafted. Use while crouching to clear.", "item.refinedstorage.autocrafter_manager.help": "Allows managing all your autocrafters from a single interface.", "item.refinedstorage.autocrafting_monitor.help": "Displays the status of autocrafting tasks and allows you to cancel autocrafting tasks in your storage network.", + "item.refinedstorage.wireless_autocrafting_monitor": "Wireless Autocrafting Monitor", + "item.refinedstorage.creative_wireless_autocrafting_monitor": "Creative Wireless Autocrafting Monitor", "misc.refinedstorage.stored": "Stored: %s", "misc.refinedstorage.stored_with_capacity": "Stored: %s / %s (%d%%)", "misc.refinedstorage.total": "%d total", @@ -401,6 +403,7 @@ "key.refinedstorage.clear_crafting_grid_matrix_to_inventory": "Clear Crafting Grid matrix to inventory", "key.refinedstorage.open_wireless_grid": "Open Wireless Grid", "key.refinedstorage.open_portable_grid": "Open Portable Grid", + "key.refinedstorage.open_wireless_autocrafting_monitor": "Open Wireless Autocrafting Monitor", "refinedstorage.subtitle.wrench": "Wrench used", "permission.refinedstorage.insert": "Insert", "permission.refinedstorage.insert.description": "Whether the player can insert resources in a network.", @@ -649,6 +652,16 @@ "text.autoconfig.refinedstorage.option.autocraftingMonitor.tooltip": "Configuration for the Autocrafting Monitor.", "text.autoconfig.refinedstorage.option.autocraftingMonitor.energyUsage": "Energy usage", "text.autoconfig.refinedstorage.option.autocraftingMonitor.energyUsage.tooltip": "The energy used by the Autocrafting Monitor.", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor": "Wireless Autocrafting Monitor", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.tooltip": "Configuration for the Wireless Autocrafting Monitor.", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.energyCapacity": "Energy capacity", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.energyCapacity.tooltip": "The energy capacity of the Wireless Autocrafting Monitor.", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.openEnergyUsage": "Open energy usage", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.openEnergyUsage.tooltip": "The energy used by the Wireless Autocrafting Monitor to open.", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.cancelEnergyUsage": "Cancel energy usage", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.cancelEnergyUsage.tooltip": "The energy used by the Wireless Autocrafting Monitor to cancel a task.", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.cancelAllEnergyUsage": "Cancel all energy usage", + "text.autoconfig.refinedstorage.option.wirelessAutocraftingMonitor.cancelAllEnergyUsage.tooltip": "The energy used by the Wireless Autocrafting Monitor to cancel all tasks.", "advancements.refinedstorage.root.description": "Use one or multiple Controllers in a storage network to provide your network with energy", "advancements.refinedstorage.connecting": "Connecting", "advancements.refinedstorage.connecting.description": "Use Cable to connect devices with each other, or place devices against each other", @@ -697,5 +710,7 @@ "advancements.refinedstorage.managing_patterns": "Managing patterns", "advancements.refinedstorage.managing_patterns.description": "Craft an Autocrafter Manager to manage your patterns in a centralized interface", "advancements.refinedstorage.monitoring": "Monitoring", - "advancements.refinedstorage.monitoring.description": "Check the status of your autocrafting tasks with a Autocrafting Monitor" + "advancements.refinedstorage.monitoring.description": "Check the status of your autocrafting tasks with a Autocrafting Monitor", + "advancements.refinedstorage.wireless_monitoring": "Wireless monitoring", + "advancements.refinedstorage.wireless_monitoring.description": "Check the status of your autocrafting tasks wirelessly with a Wireless Autocrafting Monitor" } diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/creative_wireless_autocrafting_monitor.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/creative_wireless_autocrafting_monitor.json new file mode 100644 index 000000000..4adcac16b --- /dev/null +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/creative_wireless_autocrafting_monitor.json @@ -0,0 +1,17 @@ +{ + "parent": "item/generated", + "overrides": [ + { + "predicate": { + "refinedstorage:network_bound_active": 0 + }, + "model": "refinedstorage:item/wireless_autocrafting_monitor/inactive" + }, + { + "predicate": { + "refinedstorage:network_bound_active": 1 + }, + "model": "refinedstorage:item/wireless_autocrafting_monitor/active" + } + ] +} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor.json new file mode 100644 index 000000000..4adcac16b --- /dev/null +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor.json @@ -0,0 +1,17 @@ +{ + "parent": "item/generated", + "overrides": [ + { + "predicate": { + "refinedstorage:network_bound_active": 0 + }, + "model": "refinedstorage:item/wireless_autocrafting_monitor/inactive" + }, + { + "predicate": { + "refinedstorage:network_bound_active": 1 + }, + "model": "refinedstorage:item/wireless_autocrafting_monitor/active" + } + ] +} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor/active.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor/active.json new file mode 100644 index 000000000..c89d3952c --- /dev/null +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor/active.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "refinedstorage:item/wireless_autocrafting_monitor/active" + } +} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor/inactive.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor/inactive.json new file mode 100644 index 000000000..5352e0add --- /dev/null +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/wireless_autocrafting_monitor/inactive.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "refinedstorage:item/wireless_autocrafting_monitor/inactive" + } +} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/wireless_autocrafting_monitor/active.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/item/wireless_autocrafting_monitor/active.png new file mode 100644 index 0000000000000000000000000000000000000000..704b6e8ac9f61d024771ca05bc59db28df70cede GIT binary patch literal 548 zcmV+<0^9wGP)N2bZe?^J zG%heMF)~90YwQ330ij7mK~y+TrIJlc0#O)+>;JTKmq8(c(8r>og@WRsWcEjN?0)YUiN25_B5(z{i5tapmL6DB-j^+>wg;1~8(Q36Y7!1(w z_nCUV9u!4Exm;$T)jJx1APDGmIxyV5;#~O#_pro8;}a*h3+$cpkR%B{pN~{^0CePL zvx(#TH^>WUbm$XNEEeH(I!RRrKzD4n+c;}1asB)b=hFu+AHT4#zToIef-K9RQ?B08 z0O-TfUFq1rCpZvpP^nbl@pwp82jFtKP_0(k!%e4CsH%$DY=-f8jBdA!TrLN@-A<}H z0Q#*R4hP(BH`~=_vw`P%<`#>ExyfWARULrQXoS^jMX6LmHk(BzlR=?SV4lzC!Eqc6 z1_P<;0Q`PGYPA~X^EpPN5r)Gd8=q!$ExMl9>m^kk0987jW`AEQm13SuCJ~FpAc`X5 m@i?hy`igP)<{98FWQhbW?9;ba!ELWdLwtX>N2bZe?^J zG%heMF)~90YwQ330f$LMK~y+TrBY3+K~WU-{)jSBMudq>WTNiSh$8a+aU&CiDG8-W z21e$T0U{)&Obqacmb3TBd7RRFgVj1`we~uD?|TgZ{)La?C-{6mLGSvTpu$%Hm&@g+ zP$(dm%YnF5Dxq4fqF5}lme1!QJW`Ex(RCg3`5dd&3Wvi1`~9A=+wHJiE-@aDIq0=U z3P>ap*lad%I2>@h-Ecace74)|uvjeUcDu-AGQz3|pq3Yl1#C7OG)GBtR6u$=yPh!Wnnb-~6djJ3c M07*qoM6N<$f^D handleInputEvents()); } @@ -552,6 +558,16 @@ private void registerItemProperties() { SecurityCardItemPropertyFunction.NAME, new SecurityCardItemPropertyFunction() ); + ItemProperties.register( + Items.INSTANCE.getWirelessAutocraftingMonitor(), + NetworkItemPropertyFunction.NAME, + new NetworkItemPropertyFunction() + ); + ItemProperties.register( + Items.INSTANCE.getCreativeWirelessAutocraftingMonitor(), + NetworkItemPropertyFunction.NAME, + new NetworkItemPropertyFunction() + ); } private void registerItemColors() { diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java index 1f790e368..faf653b88 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ConfigImpl.java @@ -134,6 +134,10 @@ public class ConfigImpl implements ConfigData, com.refinedmods.refinedstorage.co DefaultEnergyUsage.AUTOCRAFTING_MONITOR ); + @ConfigEntry.Gui.CollapsibleObject + private WirelessAutocraftingMonitorEntryImpl wirelessAutocraftingMonitor = + new WirelessAutocraftingMonitorEntryImpl(); + public static ConfigImpl get() { return AutoConfig.getConfigHolder(ConfigImpl.class).getConfig(); } @@ -320,6 +324,11 @@ public SimpleEnergyUsageEntry getAutocraftingMonitor() { return autocraftingMonitor; } + @Override + public WirelessAutocraftingMonitorEntry getWirelessAutocraftingMonitor() { + return wirelessAutocraftingMonitor; + } + private static class GridEntryImpl implements GridEntry { private boolean largeFont = false; @@ -798,4 +807,34 @@ private static void save() { AutoConfig.getConfigHolder(ConfigImpl.class).save(); } } + + private static class WirelessAutocraftingMonitorEntryImpl implements WirelessAutocraftingMonitorEntry { + private long energyCapacity = DefaultEnergyUsage.WIRELESS_AUTOCRAFTING_MONITOR_CAPACITY; + + private long openEnergyUsage = DefaultEnergyUsage.WIRELESS_AUTOCRAFTING_MONITOR_OPEN; + + private long cancelEnergyUsage = DefaultEnergyUsage.WIRELESS_AUTOCRAFTING_MONITOR_CANCEL; + + private long cancelAllEnergyUsage = DefaultEnergyUsage.WIRELESS_AUTOCRAFTING_MONITOR_CANCEL_ALL; + + @Override + public long getEnergyCapacity() { + return energyCapacity; + } + + @Override + public long getOpenEnergyUsage() { + return openEnergyUsage; + } + + @Override + public long getCancelEnergyUsage() { + return cancelEnergyUsage; + } + + @Override + public long getCancelAllEnergyUsage() { + return cancelAllEnergyUsage; + } + } } diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java index 35763ef00..90339f198 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ModInitializerImpl.java @@ -4,6 +4,7 @@ import com.refinedmods.refinedstorage.common.PlatformProxy; import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.WirelessAutocraftingMonitorItem; import com.refinedmods.refinedstorage.common.content.BlockEntities; import com.refinedmods.refinedstorage.common.content.BlockEntityProvider; import com.refinedmods.refinedstorage.common.content.BlockEntityProviders; @@ -152,11 +153,13 @@ import team.reborn.energy.api.EnergyStorage; import static com.refinedmods.refinedstorage.common.content.ContentIds.CREATIVE_PORTABLE_GRID; +import static com.refinedmods.refinedstorage.common.content.ContentIds.CREATIVE_WIRELESS_AUTOCRAFTING_MONITOR; import static com.refinedmods.refinedstorage.common.content.ContentIds.CREATIVE_WIRELESS_GRID; import static com.refinedmods.refinedstorage.common.content.ContentIds.FALLBACK_SECURITY_CARD; import static com.refinedmods.refinedstorage.common.content.ContentIds.PORTABLE_GRID; import static com.refinedmods.refinedstorage.common.content.ContentIds.REGULATOR_UPGRADE; import static com.refinedmods.refinedstorage.common.content.ContentIds.SECURITY_CARD; +import static com.refinedmods.refinedstorage.common.content.ContentIds.WIRELESS_AUTOCRAFTING_MONITOR; import static com.refinedmods.refinedstorage.common.content.ContentIds.WIRELESS_GRID; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; import static com.refinedmods.refinedstorage.fabric.support.resource.VariantUtil.toFluidVariant; @@ -402,6 +405,30 @@ public boolean allowComponentsUpdateAnimation(final Player player, } } )); + Items.INSTANCE.setWirelessAutocraftingMonitor(callback.register( + WIRELESS_AUTOCRAFTING_MONITOR, + () -> new WirelessAutocraftingMonitorItem(false) { + @Override + public boolean allowComponentsUpdateAnimation(final Player player, + final InteractionHand hand, + final ItemStack oldStack, + final ItemStack newStack) { + return AbstractModInitializer.allowComponentsUpdateAnimation(oldStack, newStack); + } + } + )); + Items.INSTANCE.setCreativeWirelessAutocraftingMonitor(callback.register( + CREATIVE_WIRELESS_AUTOCRAFTING_MONITOR, + () -> new WirelessAutocraftingMonitorItem(true) { + @Override + public boolean allowComponentsUpdateAnimation(final Player player, + final InteractionHand hand, + final ItemStack oldStack, + final ItemStack newStack) { + return AbstractModInitializer.allowComponentsUpdateAnimation(oldStack, newStack); + } + } + )); } private void registerCreativeModeTab() { @@ -812,6 +839,11 @@ private void registerEnergyItemProviders() { (stack, context) -> new EnergyStorageAdapter(PortableGridBlockItem.createEnergyStorage(stack)), Items.INSTANCE.getPortableGrid() ); + EnergyStorage.ITEM.registerForItems( + (stack, context) -> + new EnergyStorageAdapter(Items.INSTANCE.getWirelessAutocraftingMonitor().createEnergyStorage(stack)), + Items.INSTANCE.getWirelessAutocraftingMonitor() + ); } private void registerTickHandler() { diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ClientModInitializer.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ClientModInitializer.java index 786ca5497..81a3a4e24 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ClientModInitializer.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ClientModInitializer.java @@ -167,6 +167,15 @@ public static void onRegisterKeyMappings(final RegisterKeyMappingsEvent e) { ); e.register(openPortableGrid); KeyMappings.INSTANCE.setOpenPortableGrid(openPortableGrid); + + final KeyMapping openWirelessAutocraftingMonitor = new KeyMapping( + ContentNames.OPEN_WIRELESS_AUTOCRAFTING_MONITOR_TRANSLATION_KEY, + KeyConflictContext.IN_GAME, + InputConstants.UNKNOWN, + ContentNames.MOD_TRANSLATION_KEY + ); + e.register(openWirelessAutocraftingMonitor); + KeyMappings.INSTANCE.setOpenWirelessAutocraftingMonitor(openWirelessAutocraftingMonitor); } private static void registerBlockEntityRenderer() { @@ -260,5 +269,15 @@ private static void registerItemProperties() { SecurityCardItemPropertyFunction.NAME, new SecurityCardItemPropertyFunction() ); + ItemProperties.register( + Items.INSTANCE.getWirelessAutocraftingMonitor(), + NetworkItemPropertyFunction.NAME, + new NetworkItemPropertyFunction() + ); + ItemProperties.register( + Items.INSTANCE.getCreativeWirelessAutocraftingMonitor(), + NetworkItemPropertyFunction.NAME, + new NetworkItemPropertyFunction() + ); } } diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java index d3e6dd7c2..b6ffbb6ea 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ConfigImpl.java @@ -58,6 +58,7 @@ public class ConfigImpl implements Config { private final AutocrafterEntryImpl autocrafter; private final AutocrafterManagerEntryImpl autocrafterManager; private final SimpleEnergyUsageEntry autocraftingMonitor; + private final WirelessAutocraftingMonitorEntryImpl wirelessAutocraftingMonitor; public ConfigImpl() { screenSize = builder @@ -111,6 +112,7 @@ public ConfigImpl() { "autocraftingMonitor", DefaultEnergyUsage.AUTOCRAFTING_MONITOR ); + wirelessAutocraftingMonitor = new WirelessAutocraftingMonitorEntryImpl(); spec = builder.build(); } @@ -304,6 +306,11 @@ public SimpleEnergyUsageEntry getAutocraftingMonitor() { return autocraftingMonitor; } + @Override + public WirelessAutocraftingMonitorEntry getWirelessAutocraftingMonitor() { + return wirelessAutocraftingMonitor; + } + private static String translationKey(final String value) { return createTranslationKey("text.autoconfig", "option." + value); } @@ -838,18 +845,22 @@ private class WirelessGridEntryImpl implements WirelessGridEntry { builder.pop(); } + @Override public long getEnergyCapacity() { return energyCapacity.get(); } + @Override public long getOpenEnergyUsage() { return openEnergyUsage.get(); } + @Override public long getExtractEnergyUsage() { return extractEnergyUsage.get(); } + @Override public long getInsertEnergyUsage() { return insertEnergyUsage.get(); } @@ -870,10 +881,12 @@ private class WirelessTransmitterEntryImpl implements WirelessTransmitterEntry { builder.pop(); } + @Override public long getEnergyUsage() { return energyUsage.get(); } + @Override public int getBaseRange() { return baseRange.get(); } @@ -902,18 +915,22 @@ private class PortableGridEntryImpl implements PortableGridEntry { builder.pop(); } + @Override public long getEnergyCapacity() { return energyCapacity.get(); } + @Override public long getOpenEnergyUsage() { return openEnergyUsage.get(); } + @Override public long getExtractEnergyUsage() { return extractEnergyUsage.get(); } + @Override public long getInsertEnergyUsage() { return insertEnergyUsage.get(); } @@ -1021,4 +1038,52 @@ public long getEnergyUsage() { return energyUsage.get(); } } + + private class WirelessAutocraftingMonitorEntryImpl implements WirelessAutocraftingMonitorEntry { + private final ModConfigSpec.LongValue energyCapacity; + private final ModConfigSpec.LongValue openEnergyUsage; + private final ModConfigSpec.LongValue cancelEnergyUsage; + private final ModConfigSpec.LongValue cancelAllEnergyUsage; + + WirelessAutocraftingMonitorEntryImpl() { + builder.translation(translationKey("wirelessAutocraftingMonitor")).push("wirelessAutocraftingMonitor"); + energyCapacity = builder + .translation(translationKey("wirelessAutocraftingMonitor." + ENERGY_CAPACITY)) + .defineInRange(ENERGY_CAPACITY, DefaultEnergyUsage.WIRELESS_AUTOCRAFTING_MONITOR_CAPACITY, 0, + Long.MAX_VALUE); + openEnergyUsage = builder + .translation(translationKey("wirelessAutocraftingMonitor.openEnergyUsage")) + .defineInRange("openEnergyUsage", DefaultEnergyUsage.WIRELESS_AUTOCRAFTING_MONITOR_OPEN, 0, + Long.MAX_VALUE); + cancelEnergyUsage = builder + .translation(translationKey("wirelessAutocraftingMonitor.cancelEnergyUsage")) + .defineInRange("cancelEnergyUsage", DefaultEnergyUsage.WIRELESS_AUTOCRAFTING_MONITOR_CANCEL, 0, + Long.MAX_VALUE); + cancelAllEnergyUsage = builder + .translation(translationKey("wirelessAutocraftingMonitor.cancelAllEnergyUsage")) + .defineInRange("cancelAllEnergyUsage", DefaultEnergyUsage.WIRELESS_AUTOCRAFTING_MONITOR_CANCEL_ALL, 0, + Long.MAX_VALUE); + builder.pop(); + } + + @Override + public long getEnergyCapacity() { + return energyCapacity.get(); + } + + @Override + public long getOpenEnergyUsage() { + return openEnergyUsage.get(); + } + + @Override + public long getCancelEnergyUsage() { + return cancelEnergyUsage.get(); + } + + @Override + public long getCancelAllEnergyUsage() { + return cancelAllEnergyUsage.get(); + } + } } diff --git a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java index 785edbcc4..de22470b2 100644 --- a/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java +++ b/refinedstorage-neoforge/src/main/java/com/refinedmods/refinedstorage/neoforge/ModInitializer.java @@ -6,6 +6,7 @@ import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity; import com.refinedmods.refinedstorage.common.api.support.network.NetworkNodeContainerProvider; +import com.refinedmods.refinedstorage.common.autocrafting.monitor.WirelessAutocraftingMonitorItem; import com.refinedmods.refinedstorage.common.content.BlockEntities; import com.refinedmods.refinedstorage.common.content.BlockEntityProvider; import com.refinedmods.refinedstorage.common.content.BlockEntityProviders; @@ -154,11 +155,13 @@ import net.neoforged.neoforge.registries.RegisterEvent; import static com.refinedmods.refinedstorage.common.content.ContentIds.CREATIVE_PORTABLE_GRID; +import static com.refinedmods.refinedstorage.common.content.ContentIds.CREATIVE_WIRELESS_AUTOCRAFTING_MONITOR; import static com.refinedmods.refinedstorage.common.content.ContentIds.CREATIVE_WIRELESS_GRID; import static com.refinedmods.refinedstorage.common.content.ContentIds.FALLBACK_SECURITY_CARD; import static com.refinedmods.refinedstorage.common.content.ContentIds.PORTABLE_GRID; import static com.refinedmods.refinedstorage.common.content.ContentIds.REGULATOR_UPGRADE; import static com.refinedmods.refinedstorage.common.content.ContentIds.SECURITY_CARD; +import static com.refinedmods.refinedstorage.common.content.ContentIds.WIRELESS_AUTOCRAFTING_MONITOR; import static com.refinedmods.refinedstorage.common.content.ContentIds.WIRELESS_GRID; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.MOD_ID; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; @@ -366,6 +369,28 @@ public boolean shouldCauseReequipAnimation(final ItemStack oldStack, } } )); + Items.INSTANCE.setWirelessAutocraftingMonitor(callback.register( + WIRELESS_AUTOCRAFTING_MONITOR, + () -> new WirelessAutocraftingMonitorItem(false) { + @Override + public boolean shouldCauseReequipAnimation(final ItemStack oldStack, + final ItemStack newStack, + final boolean slotChanged) { + return AbstractModInitializer.allowComponentsUpdateAnimation(oldStack, newStack); + } + } + )); + Items.INSTANCE.setCreativeWirelessAutocraftingMonitor(callback.register( + CREATIVE_WIRELESS_AUTOCRAFTING_MONITOR, + () -> new WirelessAutocraftingMonitorItem(true) { + @Override + public boolean shouldCauseReequipAnimation(final ItemStack oldStack, + final ItemStack newStack, + final boolean slotChanged) { + return AbstractModInitializer.allowComponentsUpdateAnimation(oldStack, newStack); + } + } + )); } private void registerBlockEntities(final IEventBus eventBus) { @@ -479,6 +504,13 @@ private void registerCapabilities(final RegisterCapabilitiesEvent event) { (stack, ctx) -> new EnergyStorageAdapter(PortableGridBlockItem.createEnergyStorage(stack)), Items.INSTANCE.getPortableGrid() ); + event.registerItem( + Capabilities.EnergyStorage.ITEM, + (stack, ctx) -> new EnergyStorageAdapter( + Items.INSTANCE.getWirelessAutocraftingMonitor().createEnergyStorage(stack) + ), + Items.INSTANCE.getWirelessAutocraftingMonitor() + ); event.registerBlockEntity( Capabilities.ItemHandler.BLOCK, BlockEntities.INSTANCE.getDiskInterface(), diff --git a/refinedstorage-network/src/test/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImplTest.java b/refinedstorage-network/src/test/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImplTest.java index 4200f04d6..2683c6deb 100644 --- a/refinedstorage-network/src/test/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImplTest.java +++ b/refinedstorage-network/src/test/java/com/refinedmods/refinedstorage/api/network/impl/autocrafting/AutocraftingNetworkComponentImplTest.java @@ -1,9 +1,16 @@ package com.refinedmods.refinedstorage.api.network.impl.autocrafting; +import com.refinedmods.refinedstorage.api.autocrafting.Pattern; +import com.refinedmods.refinedstorage.api.autocrafting.TaskId; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatus; +import com.refinedmods.refinedstorage.api.autocrafting.status.TaskStatusListener; +import com.refinedmods.refinedstorage.api.network.autocrafting.PatternListener; import com.refinedmods.refinedstorage.api.network.impl.node.patternprovider.PatternProviderNetworkNode; import com.refinedmods.refinedstorage.api.network.node.container.NetworkNodeContainer; import com.refinedmods.refinedstorage.network.test.fixtures.FakeTaskStatusProvider; +import java.util.UUID; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -18,6 +25,45 @@ void setUp() { sut = new AutocraftingNetworkComponentImpl(new FakeTaskStatusProvider()); } + @Test + void temporaryCoverage() { + final PatternListener listener = new PatternListener() { + @Override + public void onAdded(final Pattern pattern) { + // no op + } + + @Override + public void onRemoved(final Pattern pattern) { + // no op + } + }; + sut.addListener(listener); + sut.removeListener(listener); + final TaskStatusListener listener2 = new TaskStatusListener() { + @Override + public void taskStatusChanged(final TaskStatus status) { + // no op + } + + @Override + public void taskRemoved(final TaskId id) { + // no op + } + + @Override + public void taskAdded(final TaskStatus status) { + // no op + } + }; + sut.addListener(listener2); + sut.removeListener(listener2); + sut.getStatuses(); + sut.cancel(new TaskId(UUID.randomUUID())); + sut.cancelAll(); + sut.testUpdate(); + } + @Test void shouldAddPatternsFromPatternProvider() { // Arrange From 790ede591522aad0aba796ce91d955c8d45a773e Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sun, 17 Nov 2024 12:57:17 +0100 Subject: [PATCH 28/30] refactor: make crafting grid code reusable For the wireless crafting grid addon. --- build.gradle.kts | 11 ++ .../patterngrid/PatternGridBlockEntity.java | 13 +- .../AbstractCraftingGridContainerMenu.java | 182 ++++++++++++++++++ .../common/grid/ClientCraftingGrid.java | 66 ++++++- .../common/grid/CraftingGrid.java | 7 +- .../common/grid/CraftingGridBlockEntity.java | 102 ++++++---- .../grid/CraftingGridContainerMenu.java | 175 +---------------- .../common/grid/CraftingGridImpl.java | 129 ------------- .../grid/CraftingGridRefillContext.java | 12 -- .../grid/CraftingGridRefillContextImpl.java | 23 --- .../common/grid/CraftingGridResultSlot.java | 16 +- .../grid/DirectCommitExtractTransaction.java | 26 +++ .../common/grid/ExtractTransaction.java | 24 +++ ...t.java => SnapshotExtractTransaction.java} | 49 ++--- .../common/grid/WirelessGrid.java | 33 ++-- .../grid/screen/CraftingGridScreen.java | 8 +- .../common/support/RecipeMatrixContainer.java | 108 +++++++++++ .../support/network/ResourceSorters.java | 19 +- .../packet/c2s/CraftingGridClearPacket.java | 4 +- .../c2s/CraftingGridRecipeTransferPacket.java | 4 +- .../fabric/ClientModInitializerImpl.java | 4 +- 21 files changed, 560 insertions(+), 455 deletions(-) create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractCraftingGridContainerMenu.java delete mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridImpl.java delete mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridRefillContext.java delete mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridRefillContextImpl.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/DirectCommitExtractTransaction.java create mode 100644 refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ExtractTransaction.java rename refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/{SnapshotCraftingGridRefillContext.java => SnapshotExtractTransaction.java} (61%) diff --git a/build.gradle.kts b/build.gradle.kts index e7891180d..b854b533d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,6 +13,17 @@ subprojects { group = "com.refinedmods.refinedstorage" } +/* publish all subprojects to mavenLocal */ +subprojects { + apply(plugin = "maven-publish") + + publishing { + repositories { + mavenLocal() + } + } +} + project.extensions.getByType().apply { properties { property( diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/patterngrid/PatternGridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/patterngrid/PatternGridBlockEntity.java index b687d4b77..a978db09e 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/patterngrid/PatternGridBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/autocrafting/patterngrid/PatternGridBlockEntity.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.common.autocrafting.patterngrid; +import com.refinedmods.refinedstorage.api.network.storage.StorageNetworkComponent; import com.refinedmods.refinedstorage.api.resource.ResourceAmount; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.common.Platform; @@ -496,7 +497,9 @@ private boolean isPatternAvailable() { void transferCraftingRecipe(final Player player, final List> recipe) { final Comparator sorter = ResourceSorters.create( - mainNetworkNode.getNetwork(), + mainNetworkNode.getNetwork() != null + ? mainNetworkNode.getNetwork().getComponent(StorageNetworkComponent.class) + : null, player.getInventory() ); getCraftingMatrix().clearContent(); @@ -517,7 +520,9 @@ void transferProcessingRecipe(final Player player, final List> inputs, final List> outputs) { final Comparator sorter = ResourceSorters.create( - mainNetworkNode.getNetwork(), + mainNetworkNode.getNetwork() != null + ? mainNetworkNode.getNetwork().getComponent(StorageNetworkComponent.class) + : null, player.getInventory(), ResourceAmount::resource ); @@ -556,7 +561,9 @@ void transferSmithingTableRecipe(final Player player, return; } final Comparator sorter = ResourceSorters.create( - mainNetworkNode.getNetwork(), + mainNetworkNode.getNetwork() != null + ? mainNetworkNode.getNetwork().getComponent(StorageNetworkComponent.class) + : null, player.getInventory(), r -> r ); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractCraftingGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractCraftingGridContainerMenu.java new file mode 100644 index 000000000..0e8545c03 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/AbstractCraftingGridContainerMenu.java @@ -0,0 +1,182 @@ +package com.refinedmods.refinedstorage.common.grid; + +import com.refinedmods.refinedstorage.api.grid.view.GridResource; +import com.refinedmods.refinedstorage.api.grid.view.GridView; +import com.refinedmods.refinedstorage.api.resource.ResourceKey; +import com.refinedmods.refinedstorage.api.resource.list.MutableResourceList; +import com.refinedmods.refinedstorage.common.grid.view.ItemGridResource; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.BiPredicate; +import java.util.function.Consumer; +import javax.annotation.Nullable; + +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; +import org.apiguardian.api.API; + +public abstract class AbstractCraftingGridContainerMenu extends AbstractGridContainerMenu { + private static final int Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT = 69; + + private final Player gridPlayer; + private final CraftingGrid craftingGrid; + private final List craftingMatrixSlots = new ArrayList<>(); + + @Nullable + private Consumer activenessListener; + @Nullable + private BiPredicate filterBeforeFilteringBasedOnCraftingMatrixItems; + + protected AbstractCraftingGridContainerMenu(final MenuType menuType, + final int syncId, + final Inventory playerInventory, + final GridData gridData) { + super(menuType, syncId, playerInventory, gridData); + this.craftingGrid = new ClientCraftingGrid(); + this.gridPlayer = playerInventory.player; + } + + protected AbstractCraftingGridContainerMenu(final MenuType menuType, + final int syncId, + final Inventory playerInventory, + final CraftingGrid craftingGrid) { + super(menuType, syncId, playerInventory, craftingGrid); + this.craftingGrid = craftingGrid; + this.gridPlayer = playerInventory.player; + } + + public void setActivenessListener(@Nullable final Consumer activenessListener) { + this.activenessListener = activenessListener; + } + + @Override + public void onActiveChanged(final boolean newActive) { + super.onActiveChanged(newActive); + if (activenessListener != null) { + activenessListener.accept(newActive); + } + } + + @Override + public boolean canTakeItemForPickAll(final ItemStack stack, final Slot slot) { + if (slot instanceof CraftingGridResultSlot) { + return false; + } + return super.canTakeItemForPickAll(stack, slot); + } + + @Override + @SuppressWarnings("resource") + public ItemStack quickMoveStack(final Player actor, final int slotIndex) { + final Slot slot = getSlot(slotIndex); + if (!actor.level().isClientSide() + && slot instanceof CraftingGridResultSlot resultSlot + && resultSlot.hasItem()) { + final ItemStack craftedStack = resultSlot.onQuickCraft(actor); + craftingGrid.acceptQuickCraft(actor, craftedStack); + return ItemStack.EMPTY; + } + return super.quickMoveStack(actor, slotIndex); + } + + @Override + public void resized(final int playerInventoryY, final int topYStart, final int topYEnd) { + super.resized(playerInventoryY, topYStart, topYEnd); + craftingMatrixSlots.clear(); + for (int y = 0; y < 3; ++y) { + for (int x = 0; x < 3; ++x) { + final int slotX = 26 + ((x % 3) * 18); + final int slotY = playerInventoryY + - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT + + ((y % 3) * 18); + craftingMatrixSlots.add(addSlot(new Slot(craftingGrid.getCraftingMatrix(), x + y * 3, slotX, slotY))); + } + } + addSlot(new CraftingGridResultSlot( + gridPlayer, + craftingGrid, + 130 + 4, + playerInventoryY - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT + 18 + )); + } + + public List getCraftingMatrixSlots() { + return craftingMatrixSlots; + } + + public void clear(final boolean toPlayerInventory) { + craftingGrid.clearMatrix(gridPlayer, toPlayerInventory); + } + + @API(status = API.Status.INTERNAL) + public MutableResourceList getAvailableListForRecipeTransfer() { + final MutableResourceList available = getView().copyBackingList(); + addContainerToList(craftingGrid.getCraftingMatrix(), available); + addContainerToList(gridPlayer.getInventory(), available); + return available; + } + + private void addContainerToList(final Container container, final MutableResourceList available) { + for (int i = 0; i < container.getContainerSize(); ++i) { + final ItemStack stack = container.getItem(i); + if (stack.isEmpty()) { + continue; + } + available.add(ItemResource.ofItemStack(stack), stack.getCount()); + } + } + + public void transferRecipe(final List> recipe) { + craftingGrid.transferRecipe(gridPlayer, recipe); + } + + public void filterBasedOnCraftingMatrixItems() { + final Set craftingMatrixItems = getCraftingMatrixItems(); + filterBeforeFilteringBasedOnCraftingMatrixItems = getView().setFilterAndSort( + (view, resource) -> resource instanceof ItemGridResource itemResource + && craftingMatrixItems.contains(itemResource.getItemResource()) + ); + } + + private Set getCraftingMatrixItems() { + final Set craftingMatrixItems = new HashSet<>(); + for (int i = 0; i < craftingGrid.getCraftingMatrix().getContainerSize(); ++i) { + final ItemStack craftingMatrixStack = craftingGrid.getCraftingMatrix().getItem(i); + if (craftingMatrixStack.isEmpty()) { + continue; + } + craftingMatrixItems.add(ItemResource.ofItemStack(craftingMatrixStack)); + } + return craftingMatrixItems; + } + + public void stopFilteringBasedOnCraftingMatrixItems() { + if (filterBeforeFilteringBasedOnCraftingMatrixItems == null) { + return; + } + getView().setFilterAndSort(filterBeforeFilteringBasedOnCraftingMatrixItems); + filterBeforeFilteringBasedOnCraftingMatrixItems = null; + } + + @Nullable + @Override + protected ResourceKey getResourceForAutocraftableHint(final Slot slot) { + if (slot.container == craftingGrid.getCraftingMatrix() || slot.container == craftingGrid.getCraftingResult()) { + return ItemResource.ofItemStack(slot.getItem()); + } + return super.getResourceForAutocraftableHint(slot); + } + + @Override + public boolean isLargeSlot(final Slot slot) { + return slot.container == craftingGrid.getCraftingResult() || super.isLargeSlot(slot); + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ClientCraftingGrid.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ClientCraftingGrid.java index 7a3473d39..d4510fbe0 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ClientCraftingGrid.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ClientCraftingGrid.java @@ -1,12 +1,24 @@ package com.refinedmods.refinedstorage.common.grid; +import com.refinedmods.refinedstorage.api.autocrafting.preview.Preview; +import com.refinedmods.refinedstorage.api.grid.operations.GridOperations; +import com.refinedmods.refinedstorage.api.grid.watcher.GridWatcher; +import com.refinedmods.refinedstorage.api.resource.ResourceKey; +import com.refinedmods.refinedstorage.api.storage.Actor; +import com.refinedmods.refinedstorage.api.storage.Storage; +import com.refinedmods.refinedstorage.api.storage.TrackedResourceAmount; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.api.support.resource.ResourceType; import com.refinedmods.refinedstorage.common.support.RecipeMatrixContainer; import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.util.List; +import java.util.Optional; +import java.util.Set; import net.minecraft.core.NonNullList; +import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; @@ -37,13 +49,8 @@ public NonNullList getRemainingItems(final Player player, final Craft } @Override - public CraftingGridRefillContext openRefillContext() { - throw new UnsupportedOperationException(); - } - - @Override - public CraftingGridRefillContext openSnapshotRefillContext(final Player player) { - throw new UnsupportedOperationException(); + public ExtractTransaction startExtractTransaction(final Player player, final boolean directCommit) { + return ExtractTransaction.NOOP; } @Override @@ -61,4 +68,49 @@ public void transferRecipe(final Player player, final List> r public void acceptQuickCraft(final Player player, final ItemStack craftedStack) { throw new UnsupportedOperationException(); } + + @Override + public void addWatcher(final GridWatcher watcher, final Class actorType) { + throw new UnsupportedOperationException(); + } + + @Override + public void removeWatcher(final GridWatcher watcher) { + throw new UnsupportedOperationException(); + } + + @Override + public Storage getItemStorage() { + throw new UnsupportedOperationException(); + } + + @Override + public boolean isGridActive() { + throw new UnsupportedOperationException(); + } + + @Override + public List getResources(final Class actorType) { + throw new UnsupportedOperationException(); + } + + @Override + public Set getAutocraftableResources() { + throw new UnsupportedOperationException(); + } + + @Override + public GridOperations createOperations(final ResourceType resourceType, final ServerPlayer player) { + throw new UnsupportedOperationException(); + } + + @Override + public Optional getPreview(final ResourceKey resource, final long amount) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean startTask(final ResourceKey resource, final long amount) { + throw new UnsupportedOperationException(); + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGrid.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGrid.java index 0674963f0..8efa78239 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGrid.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGrid.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.common.grid; +import com.refinedmods.refinedstorage.common.api.grid.Grid; import com.refinedmods.refinedstorage.common.support.RecipeMatrixContainer; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; @@ -11,16 +12,14 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingInput; -interface CraftingGrid { +public interface CraftingGrid extends Grid { RecipeMatrixContainer getCraftingMatrix(); ResultContainer getCraftingResult(); NonNullList getRemainingItems(Player player, CraftingInput input); - CraftingGridRefillContext openRefillContext(); - - CraftingGridRefillContext openSnapshotRefillContext(Player player); + ExtractTransaction startExtractTransaction(Player player, boolean directCommit); boolean clearMatrix(Player player, boolean toPlayerInventory); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridBlockEntity.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridBlockEntity.java index 6b83eae94..411fa2ce8 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridBlockEntity.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridBlockEntity.java @@ -3,7 +3,6 @@ import com.refinedmods.refinedstorage.api.core.Action; import com.refinedmods.refinedstorage.api.network.Network; import com.refinedmods.refinedstorage.api.network.storage.StorageNetworkComponent; -import com.refinedmods.refinedstorage.api.storage.root.RootStorage; import com.refinedmods.refinedstorage.common.Platform; import com.refinedmods.refinedstorage.common.api.storage.PlayerActor; import com.refinedmods.refinedstorage.common.content.BlockEntities; @@ -14,6 +13,7 @@ import com.refinedmods.refinedstorage.common.support.containermenu.NetworkNodeExtendedMenuProvider; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; +import java.util.List; import java.util.Optional; import javax.annotation.Nullable; @@ -34,7 +34,7 @@ import net.minecraft.world.level.block.state.BlockState; public class CraftingGridBlockEntity extends AbstractGridBlockEntity implements BlockEntityWithDrops, - NetworkNodeExtendedMenuProvider { + NetworkNodeExtendedMenuProvider, CraftingGrid { private static final String TAG_MATRIX = "matrix"; private final RecipeMatrix craftingRecipe = RecipeMatrix.crafting( @@ -51,18 +51,75 @@ public CraftingGridBlockEntity(final BlockPos pos, final BlockState state) { ); } - RecipeMatrixContainer getCraftingMatrix() { + @Override + public RecipeMatrixContainer getCraftingMatrix() { return craftingRecipe.getMatrix(); } - ResultContainer getCraftingResult() { + @Override + public ResultContainer getCraftingResult() { return craftingRecipe.getResult(); } - NonNullList getRemainingItems(final Player player, final CraftingInput input) { + @Override + public NonNullList getRemainingItems(final Player player, final CraftingInput input) { return craftingRecipe.getRemainingItems(level, player, input); } + @Override + public ExtractTransaction startExtractTransaction(final Player player, final boolean directCommit) { + return getNetwork() + .map(network -> network.getComponent(StorageNetworkComponent.class)) + .map(storage -> directCommit + ? new DirectCommitExtractTransaction(storage) + : new SnapshotExtractTransaction(player, storage, getCraftingMatrix())) + .orElse(ExtractTransaction.NOOP); + } + + @Override + public boolean clearMatrix(final Player player, final boolean toPlayerInventory) { + return toPlayerInventory + ? getCraftingMatrix().clearToPlayerInventory(player) + : clearMatrixIntoStorage(player); + } + + private boolean clearMatrixIntoStorage(final Player player) { + return getNetwork() + .map(network -> network.getComponent(StorageNetworkComponent.class)) + .map(storage -> getCraftingMatrix().clearIntoStorage(storage, player)) + .orElse(false); + } + + @Override + public void transferRecipe(final Player player, final List> recipe) { + getCraftingMatrix().transferRecipe( + player, + getNetwork().map(network -> network.getComponent(StorageNetworkComponent.class)).orElse(null), + recipe + ); + } + + @Override + public void acceptQuickCraft(final Player player, final ItemStack craftedStack) { + if (player.getInventory().add(craftedStack)) { + return; + } + final long inserted = getNetwork() + .map(network -> network.getComponent(StorageNetworkComponent.class)) + .map(rootStorage -> rootStorage.insert( + ItemResource.ofItemStack(craftedStack), + craftedStack.getCount(), + Action.EXECUTE, + new PlayerActor(player) + )) + .orElse(0L); + if (inserted != craftedStack.getCount()) { + final long remainder = craftedStack.getCount() - inserted; + final ItemStack remainderStack = craftedStack.copyWithCount((int) remainder); + player.drop(remainderStack, false); + } + } + @Override public GridData getMenuData() { return GridData.of(this); @@ -113,43 +170,10 @@ public final NonNullList getDrops() { return drops; } - Optional getNetwork() { + private Optional getNetwork() { if (!mainNetworkNode.isActive()) { return Optional.empty(); } return Optional.ofNullable(mainNetworkNode.getNetwork()); } - - Optional getRootStorage() { - return getNetwork().map(network -> network.getComponent(StorageNetworkComponent.class)); - } - - ItemStack insert(final ItemStack stack, final Player player) { - return getRootStorage().map(rootStorage -> doInsert(stack, player, rootStorage)).orElse(stack); - } - - private ItemStack doInsert(final ItemStack stack, - final Player player, - final RootStorage rootStorage) { - final long inserted = rootStorage.insert( - ItemResource.ofItemStack(stack), - stack.getCount(), - Action.EXECUTE, - new PlayerActor(player) - ); - final long remainder = stack.getCount() - inserted; - if (remainder == 0) { - return ItemStack.EMPTY; - } - return stack.copyWithCount((int) remainder); - } - - long extract(final ItemResource resource, final Player player) { - return getRootStorage().map(rootStorage -> rootStorage.extract( - resource, - 1, - Action.EXECUTE, - new PlayerActor(player) - )).orElse(0L); - } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridContainerMenu.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridContainerMenu.java index 593b1416e..fac7de69f 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridContainerMenu.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridContainerMenu.java @@ -1,192 +1,31 @@ package com.refinedmods.refinedstorage.common.grid; -import com.refinedmods.refinedstorage.api.grid.view.GridResource; -import com.refinedmods.refinedstorage.api.grid.view.GridView; -import com.refinedmods.refinedstorage.api.resource.ResourceKey; -import com.refinedmods.refinedstorage.api.resource.list.MutableResourceList; import com.refinedmods.refinedstorage.common.content.Menus; -import com.refinedmods.refinedstorage.common.grid.view.ItemGridResource; import com.refinedmods.refinedstorage.common.support.RedstoneMode; import com.refinedmods.refinedstorage.common.support.containermenu.ClientProperty; import com.refinedmods.refinedstorage.common.support.containermenu.PropertyTypes; import com.refinedmods.refinedstorage.common.support.containermenu.ServerProperty; -import com.refinedmods.refinedstorage.common.support.resource.ItemResource; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.function.BiPredicate; -import java.util.function.Consumer; -import javax.annotation.Nullable; - -import net.minecraft.world.Container; import net.minecraft.world.entity.player.Inventory; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.Slot; -import net.minecraft.world.item.ItemStack; -import org.apiguardian.api.API; - -public class CraftingGridContainerMenu extends AbstractGridContainerMenu { - private static final int Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT = 69; - - private final Player gridPlayer; - private final CraftingGrid craftingGrid; - private final List craftingMatrixSlots = new ArrayList<>(); - - @Nullable - private Consumer activenessListener; - @Nullable - private BiPredicate filterBeforeFilteringBasedOnCraftingMatrixItems; +public class CraftingGridContainerMenu extends AbstractCraftingGridContainerMenu { public CraftingGridContainerMenu(final int syncId, final Inventory playerInventory, final GridData gridData) { super(Menus.INSTANCE.getCraftingGrid(), syncId, playerInventory, gridData); - this.craftingGrid = new ClientCraftingGrid(); - this.gridPlayer = playerInventory.player; - resized(0, 0, 0); registerProperty(new ClientProperty<>(PropertyTypes.REDSTONE_MODE, RedstoneMode.IGNORE)); + resized(0, 0, 0); } CraftingGridContainerMenu(final int syncId, final Inventory playerInventory, - final CraftingGridBlockEntity grid) { - super(Menus.INSTANCE.getCraftingGrid(), syncId, playerInventory, grid); - this.craftingGrid = new CraftingGridImpl(grid); - this.gridPlayer = playerInventory.player; - resized(0, 0, 0); + final CraftingGridBlockEntity craftingGrid) { + super(Menus.INSTANCE.getCraftingGrid(), syncId, playerInventory, craftingGrid); registerProperty(new ServerProperty<>( PropertyTypes.REDSTONE_MODE, - grid::getRedstoneMode, - grid::setRedstoneMode - )); - } - - public void setActivenessListener(@Nullable final Consumer activenessListener) { - this.activenessListener = activenessListener; - } - - @Override - public void onActiveChanged(final boolean newActive) { - super.onActiveChanged(newActive); - if (activenessListener != null) { - activenessListener.accept(newActive); - } - } - - @Override - public boolean canTakeItemForPickAll(final ItemStack stack, final Slot slot) { - if (slot instanceof CraftingGridResultSlot) { - return false; - } - return super.canTakeItemForPickAll(stack, slot); - } - - @Override - @SuppressWarnings("resource") - public ItemStack quickMoveStack(final Player actor, final int slotIndex) { - final Slot slot = getSlot(slotIndex); - if (!actor.level().isClientSide() - && slot instanceof CraftingGridResultSlot resultSlot - && resultSlot.hasItem()) { - final ItemStack craftedStack = resultSlot.onQuickCraft(actor); - craftingGrid.acceptQuickCraft(actor, craftedStack); - return ItemStack.EMPTY; - } - return super.quickMoveStack(actor, slotIndex); - } - - @Override - public void resized(final int playerInventoryY, final int topYStart, final int topYEnd) { - super.resized(playerInventoryY, topYStart, topYEnd); - craftingMatrixSlots.clear(); - for (int y = 0; y < 3; ++y) { - for (int x = 0; x < 3; ++x) { - final int slotX = 26 + ((x % 3) * 18); - final int slotY = playerInventoryY - - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT - + ((y % 3) * 18); - craftingMatrixSlots.add(addSlot(new Slot(craftingGrid.getCraftingMatrix(), x + y * 3, slotX, slotY))); - } - } - addSlot(new CraftingGridResultSlot( - gridPlayer, - craftingGrid, - 130 + 4, - playerInventoryY - Y_OFFSET_BETWEEN_PLAYER_INVENTORY_AND_FIRST_CRAFTING_MATRIX_SLOT + 18 + craftingGrid::getRedstoneMode, + craftingGrid::setRedstoneMode )); - } - - public List getCraftingMatrixSlots() { - return craftingMatrixSlots; - } - - public void clear(final boolean toPlayerInventory) { - craftingGrid.clearMatrix(gridPlayer, toPlayerInventory); - } - - @API(status = API.Status.INTERNAL) - public MutableResourceList getAvailableListForRecipeTransfer() { - final MutableResourceList available = getView().copyBackingList(); - addContainerToList(craftingGrid.getCraftingMatrix(), available); - addContainerToList(gridPlayer.getInventory(), available); - return available; - } - - private void addContainerToList(final Container container, final MutableResourceList available) { - for (int i = 0; i < container.getContainerSize(); ++i) { - final ItemStack stack = container.getItem(i); - if (stack.isEmpty()) { - continue; - } - available.add(ItemResource.ofItemStack(stack), stack.getCount()); - } - } - - public void transferRecipe(final List> recipe) { - craftingGrid.transferRecipe(gridPlayer, recipe); - } - - public void filterBasedOnCraftingMatrixItems() { - final Set craftingMatrixItems = getCraftingMatrixItems(); - filterBeforeFilteringBasedOnCraftingMatrixItems = getView().setFilterAndSort( - (view, resource) -> resource instanceof ItemGridResource itemResource - && craftingMatrixItems.contains(itemResource.getItemResource()) - ); - } - - private Set getCraftingMatrixItems() { - final Set craftingMatrixItems = new HashSet<>(); - for (int i = 0; i < craftingGrid.getCraftingMatrix().getContainerSize(); ++i) { - final ItemStack craftingMatrixStack = craftingGrid.getCraftingMatrix().getItem(i); - if (craftingMatrixStack.isEmpty()) { - continue; - } - craftingMatrixItems.add(ItemResource.ofItemStack(craftingMatrixStack)); - } - return craftingMatrixItems; - } - - public void stopFilteringBasedOnCraftingMatrixItems() { - if (filterBeforeFilteringBasedOnCraftingMatrixItems == null) { - return; - } - getView().setFilterAndSort(filterBeforeFilteringBasedOnCraftingMatrixItems); - filterBeforeFilteringBasedOnCraftingMatrixItems = null; - } - - @Nullable - @Override - protected ResourceKey getResourceForAutocraftableHint(final Slot slot) { - if (slot.container == craftingGrid.getCraftingMatrix() || slot.container == craftingGrid.getCraftingResult()) { - return ItemResource.ofItemStack(slot.getItem()); - } - return super.getResourceForAutocraftableHint(slot); - } - - @Override - public boolean isLargeSlot(final Slot slot) { - return slot.container == craftingGrid.getCraftingResult() || super.isLargeSlot(slot); + resized(0, 0, 0); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridImpl.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridImpl.java deleted file mode 100644 index ac00a7d2a..000000000 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.refinedmods.refinedstorage.common.grid; - -import com.refinedmods.refinedstorage.api.resource.ResourceKey; -import com.refinedmods.refinedstorage.common.support.RecipeMatrixContainer; -import com.refinedmods.refinedstorage.common.support.network.ResourceSorters; -import com.refinedmods.refinedstorage.common.support.resource.ItemResource; - -import java.util.Comparator; -import java.util.List; - -import net.minecraft.core.NonNullList; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.inventory.ResultContainer; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.CraftingInput; - -class CraftingGridImpl implements CraftingGrid { - private final CraftingGridBlockEntity blockEntity; - - CraftingGridImpl(final CraftingGridBlockEntity blockEntity) { - this.blockEntity = blockEntity; - } - - @Override - public RecipeMatrixContainer getCraftingMatrix() { - return blockEntity.getCraftingMatrix(); - } - - @Override - public ResultContainer getCraftingResult() { - return blockEntity.getCraftingResult(); - } - - @Override - public NonNullList getRemainingItems(final Player player, final CraftingInput input) { - return blockEntity.getRemainingItems(player, input); - } - - @Override - public CraftingGridRefillContext openRefillContext() { - return new CraftingGridRefillContextImpl(blockEntity); - } - - @Override - public CraftingGridRefillContext openSnapshotRefillContext(final Player player) { - return new SnapshotCraftingGridRefillContext(player, blockEntity, blockEntity.getCraftingMatrix()); - } - - @Override - public void acceptQuickCraft(final Player player, final ItemStack craftedStack) { - if (player.getInventory().add(craftedStack)) { - return; - } - final ItemStack remainder = blockEntity.insert(craftedStack, player); - if (!remainder.isEmpty()) { - player.drop(remainder, false); - } - } - - @Override - public boolean clearMatrix(final Player player, final boolean toPlayerInventory) { - boolean success = true; - for (int i = 0; i < getCraftingMatrix().getContainerSize(); ++i) { - final ItemStack matrixStack = getCraftingMatrix().getItem(i); - if (matrixStack.isEmpty()) { - continue; - } - if (toPlayerInventory) { - if (player.getInventory().add(matrixStack)) { - getCraftingMatrix().setItem(i, ItemStack.EMPTY); - } else { - success = false; - } - } else { - final ItemStack remainder = blockEntity.insert(matrixStack, player); - if (!remainder.isEmpty()) { - success = false; - } - getCraftingMatrix().setItem(i, remainder); - } - } - return success; - } - - @Override - public void transferRecipe(final Player player, final List> recipe) { - final boolean clearToPlayerInventory = blockEntity.getNetwork().isEmpty(); - if (!clearMatrix(player, clearToPlayerInventory)) { - return; - } - final Comparator sorter = ResourceSorters.create( - blockEntity.getNetwork().orElse(null), - player.getInventory() - ); - for (int i = 0; i < getCraftingMatrix().getContainerSize(); ++i) { - if (i >= recipe.size()) { - break; - } - final List possibilities = recipe.get(i); - possibilities.sort(sorter); - doTransferRecipe(i, possibilities, player); - } - } - - private void doTransferRecipe(final int index, final List sortedPossibilities, final Player player) { - for (final ItemResource possibility : sortedPossibilities) { - boolean extracted = blockEntity.extract(possibility, player) == 1; - if (!extracted) { - extracted = extractFromPlayerInventory(player, possibility); - } - if (extracted) { - getCraftingMatrix().setItem(index, possibility.toItemStack()); - return; - } - } - } - - private boolean extractFromPlayerInventory(final Player player, final ItemResource possibility) { - final ItemStack possibilityStack = possibility.toItemStack(); - for (int i = 0; i < player.getInventory().getContainerSize(); ++i) { - final ItemStack playerStack = player.getInventory().getItem(i); - if (ItemStack.isSameItemSameComponents(playerStack, possibilityStack)) { - player.getInventory().removeItem(i, 1); - return true; - } - } - return false; - } -} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridRefillContext.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridRefillContext.java deleted file mode 100644 index 8ba2f0738..000000000 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridRefillContext.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.refinedmods.refinedstorage.common.grid; - -import com.refinedmods.refinedstorage.common.support.resource.ItemResource; - -import net.minecraft.world.entity.player.Player; - -interface CraftingGridRefillContext extends AutoCloseable { - boolean extract(ItemResource resource, Player player); - - @Override - void close(); -} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridRefillContextImpl.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridRefillContextImpl.java deleted file mode 100644 index 62ef95490..000000000 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridRefillContextImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.refinedmods.refinedstorage.common.grid; - -import com.refinedmods.refinedstorage.common.support.resource.ItemResource; - -import net.minecraft.world.entity.player.Player; - -class CraftingGridRefillContextImpl implements CraftingGridRefillContext { - private final CraftingGridBlockEntity blockEntity; - - CraftingGridRefillContextImpl(final CraftingGridBlockEntity blockEntity) { - this.blockEntity = blockEntity; - } - - @Override - public boolean extract(final ItemResource resource, final Player player) { - return blockEntity.extract(resource, player) == 1; - } - - @Override - public void close() { - // no op - } -} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridResultSlot.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridResultSlot.java index 64dba45d1..9650928b8 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridResultSlot.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/CraftingGridResultSlot.java @@ -28,9 +28,9 @@ public ItemStack onQuickCraft(final Player player) { final ItemStack singleResultStack = getItem().copy(); final int maxCrafted = singleResultStack.getMaxStackSize(); int crafted = 0; - try (CraftingGridRefillContext refillContext = craftingGrid.openSnapshotRefillContext(player)) { + try (ExtractTransaction transaction = craftingGrid.startExtractTransaction(player, false)) { while (ItemStack.isSameItemSameComponents(singleResultStack, getItem()) && crafted < maxCrafted) { - doTake(player, refillContext); + doTake(player, transaction); crafted += singleResultStack.getCount(); } } @@ -43,12 +43,12 @@ public void onTake(final Player player, final ItemStack stack) { if (player.level().isClientSide()) { return; } - try (CraftingGridRefillContext refillContext = craftingGrid.openRefillContext()) { - doTake(player, refillContext); + try (ExtractTransaction transaction = craftingGrid.startExtractTransaction(player, true)) { + doTake(player, transaction); } } - private void doTake(final Player player, final CraftingGridRefillContext refillContext) { + private void doTake(final Player player, final ExtractTransaction transaction) { fireCraftingEvents(player, getItem().copy()); final CraftingInput.Positioned positioned = craftingGrid.getCraftingMatrix().asPositionedCraftInput(); final CraftingInput input = positioned.input(); @@ -64,7 +64,7 @@ private void doTake(final Player player, final CraftingGridRefillContext refillC if (!remainingItem.isEmpty()) { useIngredientWithRemainingItem(player, index, remainingItem); } else if (!matrixStack.isEmpty()) { - useIngredient(player, refillContext, index, matrixStack); + useIngredient(player, transaction, index, matrixStack); } } } @@ -86,10 +86,10 @@ private void useIngredientWithRemainingItem(final Player player, } private void useIngredient(final Player player, - final CraftingGridRefillContext refillContext, + final ExtractTransaction transaction, final int index, final ItemStack matrixStack) { - if (matrixStack.getCount() > 1 || !refillContext.extract(ItemResource.ofItemStack(matrixStack), player)) { + if (matrixStack.getCount() > 1 || !transaction.extract(ItemResource.ofItemStack(matrixStack), player)) { decrementMatrixSlot(index); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/DirectCommitExtractTransaction.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/DirectCommitExtractTransaction.java new file mode 100644 index 000000000..8c5d12d35 --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/DirectCommitExtractTransaction.java @@ -0,0 +1,26 @@ +package com.refinedmods.refinedstorage.common.grid; + +import com.refinedmods.refinedstorage.api.core.Action; +import com.refinedmods.refinedstorage.api.storage.root.RootStorage; +import com.refinedmods.refinedstorage.common.api.storage.PlayerActor; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; + +import net.minecraft.world.entity.player.Player; + +public class DirectCommitExtractTransaction implements ExtractTransaction { + private final RootStorage rootStorage; + + public DirectCommitExtractTransaction(final RootStorage rootStorage) { + this.rootStorage = rootStorage; + } + + @Override + public boolean extract(final ItemResource resource, final Player player) { + return rootStorage.extract(resource, 1, Action.EXECUTE, new PlayerActor(player)) == 1; + } + + @Override + public void close() { + // no op + } +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ExtractTransaction.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ExtractTransaction.java new file mode 100644 index 000000000..785d89a3a --- /dev/null +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/ExtractTransaction.java @@ -0,0 +1,24 @@ +package com.refinedmods.refinedstorage.common.grid; + +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; + +import net.minecraft.world.entity.player.Player; + +public interface ExtractTransaction extends AutoCloseable { + ExtractTransaction NOOP = new ExtractTransaction() { + @Override + public boolean extract(final ItemResource resource, final Player player) { + return false; + } + + @Override + public void close() { + // no op + } + }; + + boolean extract(ItemResource resource, Player player); + + @Override + void close(); +} diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotCraftingGridRefillContext.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotExtractTransaction.java similarity index 61% rename from refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotCraftingGridRefillContext.java rename to refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotExtractTransaction.java index 2a3f18d61..6316369ba 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotCraftingGridRefillContext.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/SnapshotExtractTransaction.java @@ -12,42 +12,35 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -class SnapshotCraftingGridRefillContext implements CraftingGridRefillContext { +public class SnapshotExtractTransaction implements ExtractTransaction { private final PlayerActor playerActor; - private final CraftingGridBlockEntity blockEntity; + private final RootStorage rootStorage; private final MutableResourceList available = MutableResourceListImpl.create(); private final MutableResourceList used = MutableResourceListImpl.create(); - SnapshotCraftingGridRefillContext( - final Player player, - final CraftingGridBlockEntity blockEntity, - final RecipeMatrixContainer craftingMatrix - ) { + public SnapshotExtractTransaction(final Player player, + final RootStorage rootStorage, + final RecipeMatrixContainer craftingMatrix) { this.playerActor = new PlayerActor(player); - this.blockEntity = blockEntity; + this.rootStorage = rootStorage; addAvailableItems(craftingMatrix); } private void addAvailableItems(final RecipeMatrixContainer craftingMatrix) { - blockEntity.getRootStorage().ifPresent(rootStorage -> { - for (int i = 0; i < craftingMatrix.getContainerSize(); ++i) { - addAvailableItem(craftingMatrix, rootStorage, i); - } - }); + for (int i = 0; i < craftingMatrix.getContainerSize(); ++i) { + addAvailableItem(craftingMatrix, i); + } } - private void addAvailableItem(final RecipeMatrixContainer craftingMatrix, - final RootStorage rootStorage, - final int craftingMatrixSlotIndex) { + private void addAvailableItem(final RecipeMatrixContainer craftingMatrix, final int craftingMatrixSlotIndex) { final ItemStack craftingMatrixStack = craftingMatrix.getItem(craftingMatrixSlotIndex); if (craftingMatrixStack.isEmpty()) { return; } - addAvailableItem(rootStorage, craftingMatrixStack); + addAvailableItem(craftingMatrixStack); } - private void addAvailableItem(final RootStorage rootStorage, - final ItemStack craftingMatrixStack) { + private void addAvailableItem(final ItemStack craftingMatrixStack) { final ItemResource craftingMatrixResource = ItemResource.ofItemStack(craftingMatrixStack); // a single resource can occur multiple times in a recipe, only add it once if (!available.contains(craftingMatrixResource)) { @@ -60,22 +53,16 @@ private void addAvailableItem(final RootStorage rootStorage, @Override public boolean extract(final ItemResource resource, final Player player) { - return blockEntity.getNetwork().map(network -> { - final boolean isAvailable = available.contains(resource); - if (isAvailable) { - available.remove(resource, 1); - used.add(resource, 1); - } - return isAvailable; - }).orElse(false); + final boolean isAvailable = available.contains(resource); + if (isAvailable) { + available.remove(resource, 1); + used.add(resource, 1); + } + return isAvailable; } @Override public void close() { - blockEntity.getRootStorage().ifPresent(this::extractUsedItems); - } - - private void extractUsedItems(final RootStorage rootStorage) { for (final ResourceKey usedResource : used.getAll()) { final long amountUsed = used.get(usedResource); rootStorage.extract(usedResource, amountUsed, Action.EXECUTE, playerActor); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java index e824e73f2..d48a18765 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/WirelessGrid.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import java.util.stream.Collectors; import net.minecraft.server.level.ServerPlayer; @@ -45,6 +46,10 @@ private Optional getSecurity() { return context.resolveNetwork().map(network -> network.getComponent(PlatformSecurityNetworkComponent.class)); } + private Optional getAutocrafting() { + return context.resolveNetwork().map(network -> network.getComponent(AutocraftingNetworkComponent.class)); + } + @Override public void addWatcher(final GridWatcher watcher, final Class actorType) { context.drainEnergy(Platform.INSTANCE.getConfig().getWirelessGrid().getOpenEnergyUsage()); @@ -70,9 +75,9 @@ public Storage getItemStorage() { @Override public boolean isGridActive() { - final boolean networkActive = context.resolveNetwork().map( - network -> network.getComponent(EnergyNetworkComponent.class).getStored() > 0 - ).orElse(false); + final boolean networkActive = context.resolveNetwork() + .map(network -> network.getComponent(EnergyNetworkComponent.class).getStored() > 0) + .orElse(false); return networkActive && context.isActive(); } @@ -83,15 +88,21 @@ public List getResources(final Class act @Override public Set getAutocraftableResources() { - return Collections.emptySet(); + return getAutocrafting() + .map(AutocraftingNetworkComponent::getOutputs) + .map(outputs -> outputs.stream() + .filter(PlatformResourceKey.class::isInstance) + .map(PlatformResourceKey.class::cast) + .collect(Collectors.toSet())) + .orElse(Collections.emptySet()); } @Override public GridOperations createOperations(final ResourceType resourceType, final ServerPlayer player) { return getStorage() - .flatMap(rootStorage -> - getSecurity().map(security -> createGridOperations(resourceType, player, rootStorage, security))) - .map(gridOperations -> (GridOperations) new WirelessGridOperations(gridOperations, context, watchers)) + .flatMap(rootStorage -> getSecurity() + .map(security -> createGridOperations(resourceType, player, rootStorage, security))) + .map(operations -> (GridOperations) new WirelessGridOperations(operations, context, watchers)) .orElseGet(NoopGridOperations::new); } @@ -106,15 +117,11 @@ private GridOperations createGridOperations(final ResourceType resourceType, @Override public Optional getPreview(final ResourceKey resource, final long amount) { - return context.resolveNetwork() - .map(network -> network.getComponent(AutocraftingNetworkComponent.class)) - .flatMap(component -> component.getPreview(resource, amount)); + return getAutocrafting().flatMap(component -> component.getPreview(resource, amount)); } @Override public boolean startTask(final ResourceKey resource, final long amount) { - return context.resolveNetwork() - .map(network -> network.getComponent(AutocraftingNetworkComponent.class).startTask(resource, amount)) - .orElse(false); + return getAutocrafting().map(autocrafting -> autocrafting.startTask(resource, amount)).orElse(false); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/CraftingGridScreen.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/CraftingGridScreen.java index d2b6a8dc6..162b8fa72 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/CraftingGridScreen.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/grid/screen/CraftingGridScreen.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage.common.Platform; import com.refinedmods.refinedstorage.common.content.KeyMappings; -import com.refinedmods.refinedstorage.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage.common.grid.AbstractCraftingGridContainerMenu; import com.refinedmods.refinedstorage.common.grid.CraftingGridMatrixCloseBehavior; import com.refinedmods.refinedstorage.common.support.tooltip.HelpClientTooltipComponent; import com.refinedmods.refinedstorage.common.support.widget.HoveredImageButton; @@ -27,7 +27,7 @@ import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createIdentifier; import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; -public class CraftingGridScreen extends AbstractGridScreen { +public class CraftingGridScreen extends AbstractGridScreen { private static final ResourceLocation TEXTURE = createIdentifier("textures/gui/crafting_grid.png"); private static final WidgetSprites CLEAR_BUTTON_TO_PLAYER_INVENTORY_SPRITES = new WidgetSprites( @@ -51,7 +51,9 @@ public class CraftingGridScreen extends AbstractGridScreen> recipe) { + final boolean cleared = rootStorage == null + ? clearToPlayerInventory(player) + : clearIntoStorage(rootStorage, player); + if (!cleared) { + return; + } + final Comparator sorter = ResourceSorters.create(rootStorage, player.getInventory()); + for (int i = 0; i < getContainerSize(); ++i) { + if (i >= recipe.size()) { + break; + } + final List possibilities = recipe.get(i); + possibilities.sort(sorter); + doTransferRecipe(i, possibilities, player, rootStorage); + } + } + + private void doTransferRecipe(final int index, + final List sortedPossibilities, + final Player player, + @Nullable final RootStorage rootStorage) { + for (final ItemResource possibility : sortedPossibilities) { + boolean extracted = rootStorage != null + && rootStorage.extract(possibility, 1, Action.EXECUTE, new PlayerActor(player)) == 1; + if (!extracted) { + extracted = extractSingleItemFromPlayerInventory(player, possibility); + } + if (extracted) { + setItem(index, possibility.toItemStack()); + return; + } + } + } + + private boolean extractSingleItemFromPlayerInventory(final Player player, final ItemResource possibility) { + final ItemStack possibilityStack = possibility.toItemStack(); + for (int i = 0; i < player.getInventory().getContainerSize(); ++i) { + final ItemStack playerStack = player.getInventory().getItem(i); + if (ItemStack.isSameItemSameComponents(playerStack, possibilityStack)) { + player.getInventory().removeItem(i, 1); + return true; + } + } + return false; + } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/network/ResourceSorters.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/network/ResourceSorters.java index bf5ff6516..f37df6d3c 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/network/ResourceSorters.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/network/ResourceSorters.java @@ -1,11 +1,10 @@ package com.refinedmods.refinedstorage.common.support.network; -import com.refinedmods.refinedstorage.api.network.Network; -import com.refinedmods.refinedstorage.api.network.storage.StorageNetworkComponent; import com.refinedmods.refinedstorage.api.resource.ResourceKey; import com.refinedmods.refinedstorage.api.resource.list.MutableResourceList; import com.refinedmods.refinedstorage.api.resource.list.MutableResourceListImpl; import com.refinedmods.refinedstorage.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage.api.storage.root.RootStorage; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.util.Comparator; @@ -19,22 +18,24 @@ public final class ResourceSorters { private ResourceSorters() { } - public static Comparator create(@Nullable final Network network, final Inventory playerInventory) { - return create(network, playerInventory, Function.identity()); + public static Comparator create(@Nullable final RootStorage rootStorage, + final Inventory playerInventory) { + return create(rootStorage, playerInventory, Function.identity()); } - public static Comparator create(@Nullable final Network network, + public static Comparator create(@Nullable final RootStorage rootStorage, final Inventory playerInventory, final Function resourceExtractor) { final MutableResourceList available = MutableResourceListImpl.create(); - addNetworkItemsIntoList(network, available); + addRootStorageItemsIntoList(rootStorage, available); addPlayerInventoryItemsIntoList(playerInventory, available); return sortByHighestAvailableFirst(available, resourceExtractor); } - private static void addNetworkItemsIntoList(@Nullable final Network network, final MutableResourceList list) { - if (network != null) { - network.getComponent(StorageNetworkComponent.class).getAll().forEach(list::add); + private static void addRootStorageItemsIntoList(@Nullable final RootStorage rootStorage, + final MutableResourceList list) { + if (rootStorage != null) { + rootStorage.getAll().forEach(list::add); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/CraftingGridClearPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/CraftingGridClearPacket.java index 2397c8a0f..6bb17100b 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/CraftingGridClearPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/CraftingGridClearPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; -import com.refinedmods.refinedstorage.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage.common.grid.AbstractCraftingGridContainerMenu; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; import net.minecraft.network.RegistryFriendlyByteBuf; @@ -19,7 +19,7 @@ public record CraftingGridClearPacket(boolean toPlayerInventory) implements Cust ); public static void handle(final CraftingGridClearPacket packet, final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof CraftingGridContainerMenu craftingGridContainerMenu) { + if (ctx.getPlayer().containerMenu instanceof AbstractCraftingGridContainerMenu craftingGridContainerMenu) { craftingGridContainerMenu.clear(packet.toPlayerInventory()); } } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/CraftingGridRecipeTransferPacket.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/CraftingGridRecipeTransferPacket.java index be2d9e879..71665c8e2 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/CraftingGridRecipeTransferPacket.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/support/packet/c2s/CraftingGridRecipeTransferPacket.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.common.support.packet.c2s; -import com.refinedmods.refinedstorage.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage.common.grid.AbstractCraftingGridContainerMenu; import com.refinedmods.refinedstorage.common.support.packet.PacketContext; import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import com.refinedmods.refinedstorage.common.support.resource.ResourceCodecs; @@ -28,7 +28,7 @@ public record CraftingGridRecipeTransferPacket(List> recipe) ); public static void handle(final CraftingGridRecipeTransferPacket packet, final PacketContext ctx) { - if (ctx.getPlayer().containerMenu instanceof CraftingGridContainerMenu craftingGridContainerMenu) { + if (ctx.getPlayer().containerMenu instanceof AbstractCraftingGridContainerMenu craftingGridContainerMenu) { craftingGridContainerMenu.transferRecipe(packet.recipe()); } } diff --git a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java index db3ddc104..17796cf06 100644 --- a/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java +++ b/refinedstorage-fabric/src/main/java/com/refinedmods/refinedstorage/fabric/ClientModInitializerImpl.java @@ -103,7 +103,7 @@ public > void MenuScreens.register(type, factory::create); } }); - registerKeyBindings(); + registerKeyMappings(); registerModelPredicates(); registerResourceRendering(); registerAlternativeGridHints(); @@ -496,7 +496,7 @@ private void registerCustomTooltips() { }); } - private void registerKeyBindings() { + private void registerKeyMappings() { KeyMappings.INSTANCE.setFocusSearchBar(KeyBindingHelper.registerKeyBinding(new KeyMapping( ContentNames.FOCUS_SEARCH_BAR_TRANSLATION_KEY, InputConstants.Type.KEYSYM, From ed72af80e34c31863025ce6c78cf3ec291febf39 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sun, 24 Nov 2024 00:26:43 +0100 Subject: [PATCH 29/30] fix: move quartz enriched iron and copper blocks to addon --- CHANGELOG.md | 5 +++++ .../common/AbstractModInitializer.java | 12 ----------- .../refinedstorage/common/content/Blocks.java | 20 ------------------ .../common/content/ContentIds.java | 4 ---- .../common/content/CreativeModeTabItems.java | 2 -- .../quartz_enriched_copper_block.json | 7 ------ .../quartz_enriched_iron_block.json | 7 ------ .../assets/refinedstorage/lang/en_us.json | 2 -- .../block/quartz_enriched_copper_block.json | 6 ------ .../block/quartz_enriched_iron_block.json | 6 ------ .../item/quartz_enriched_copper_block.json | 3 --- .../item/quartz_enriched_iron_block.json | 3 --- .../block/quartz_enriched_copper_block.png | Bin 685 -> 0 bytes .../block/quartz_enriched_iron_block.png | Bin 1547 -> 0 bytes .../blocks/quartz_enriched_iron_block.json | 19 ----------------- .../recipe/quartz_enriched_copper_block.json | 16 -------------- .../quartz_enriched_copper_from_block.json | 12 ----------- .../recipe/quartz_enriched_iron_block.json | 16 -------------- .../quartz_enriched_iron_from_block.json | 12 ----------- 19 files changed, 5 insertions(+), 147 deletions(-) delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/blockstates/quartz_enriched_copper_block.json delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/blockstates/quartz_enriched_iron_block.json delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/block/quartz_enriched_copper_block.json delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/block/quartz_enriched_iron_block.json delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/quartz_enriched_copper_block.json delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/quartz_enriched_iron_block.json delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/quartz_enriched_copper_block.png delete mode 100644 refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/quartz_enriched_iron_block.png delete mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/loot_table/blocks/quartz_enriched_iron_block.json delete mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/recipe/quartz_enriched_copper_block.json delete mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/recipe/quartz_enriched_copper_from_block.json delete mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/recipe/quartz_enriched_iron_block.json delete mode 100644 refinedstorage-common/src/main/resources/data/refinedstorage/recipe/quartz_enriched_iron_from_block.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ac22324d..1fb2ffec5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - The Autocrafting Monitor now has a sidebar with all tasks instead of using tabs. - The auto-selected search box mode is now a global option used in the Autocrafter Manager as well. +### Removed + +- Block of Quartz Enriched Iron (has been moved to addon mod) +- Block of Quartz Enriched Copper (has been moved to addon mod) + ## [2.0.0-milestone.4.9] - 2024-11-01 ### Added diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java index 4e2233a1a..41566deb2 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/AbstractModInitializer.java @@ -300,10 +300,6 @@ private void registerPermissions() { protected final void registerBlocks(final RegistryCallback callback, final BlockEntityProviders blockEntityProviders) { - Blocks.INSTANCE.setQuartzEnrichedIronBlock(callback.register( - ContentIds.QUARTZ_ENRICHED_IRON_BLOCK, SimpleBlock::new)); - Blocks.INSTANCE.setQuartzEnrichedCopperBlock( - callback.register(ContentIds.QUARTZ_ENRICHED_COPPER_BLOCK, SimpleBlock::new)); Blocks.INSTANCE.setDiskDrive(callback.register( ContentIds.DISK_DRIVE, () -> new DiskDriveBlock(blockEntityProviders.diskDrive()) @@ -385,14 +381,6 @@ protected final void registerItems(final RegistryCallback callback) { private void registerSimpleItems(final RegistryCallback callback) { Items.INSTANCE.setQuartzEnrichedIron(callback.register(ContentIds.QUARTZ_ENRICHED_IRON, SimpleItem::new)); Items.INSTANCE.setQuartzEnrichedCopper(callback.register(ContentIds.QUARTZ_ENRICHED_COPPER, SimpleItem::new)); - callback.register( - ContentIds.QUARTZ_ENRICHED_IRON_BLOCK, - () -> new BaseBlockItem(Blocks.INSTANCE.getQuartzEnrichedIronBlock()) - ); - callback.register( - ContentIds.QUARTZ_ENRICHED_COPPER_BLOCK, - () -> new BaseBlockItem(Blocks.INSTANCE.getQuartzEnrichedCopperBlock()) - ); Items.INSTANCE.setSilicon(callback.register(ContentIds.SILICON, SimpleItem::new)); Items.INSTANCE.setProcessorBinding(callback.register(ContentIds.PROCESSOR_BINDING, SimpleItem::new)); callback.register(ContentIds.DISK_DRIVE, () -> Blocks.INSTANCE.getDiskDrive().createBlockItem()); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java index e07b1276c..2b3bc9a50 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/Blocks.java @@ -166,10 +166,6 @@ public final class Blocks { COLOR ); - @Nullable - private Supplier quartzEnrichedIronBlock; - @Nullable - private Supplier quartzEnrichedCopperBlock; @Nullable private Supplier diskDrive; @Nullable @@ -205,14 +201,6 @@ public BlockColorMap getCable() { return requireNonNull(cable); } - public SimpleBlock getQuartzEnrichedIronBlock() { - return requireNonNull(quartzEnrichedIronBlock).get(); - } - - public SimpleBlock getQuartzEnrichedCopperBlock() { - return requireNonNull(quartzEnrichedCopperBlock).get(); - } - public DiskDriveBlock getDiskDrive() { return requireNonNull(diskDrive).get(); } @@ -243,14 +231,6 @@ CreativeControllerBlockItem> getCreativeController() { return creativeController; } - public void setQuartzEnrichedIronBlock(final Supplier quartzEnrichedIronBlockSupplier) { - this.quartzEnrichedIronBlock = quartzEnrichedIronBlockSupplier; - } - - public void setQuartzEnrichedCopperBlock(final Supplier quartzEnrichedCopperBlockSupplier) { - this.quartzEnrichedCopperBlock = quartzEnrichedCopperBlockSupplier; - } - public void setDiskDrive(final Supplier diskDriveSupplier) { this.diskDrive = diskDriveSupplier; } diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java index 1c3d9cec2..1350d084e 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/ContentIds.java @@ -14,10 +14,6 @@ public final class ContentIds { public static final ResourceLocation DISK_DRIVE = createIdentifier("disk_drive"); public static final ResourceLocation MACHINE_CASING = createIdentifier("machine_casing"); public static final ResourceLocation CABLE = createIdentifier("cable"); - public static final ResourceLocation QUARTZ_ENRICHED_IRON_BLOCK = createIdentifier("quartz_enriched_iron_block"); - public static final ResourceLocation QUARTZ_ENRICHED_COPPER_BLOCK = createIdentifier( - "quartz_enriched_copper_block" - ); public static final ResourceLocation QUARTZ_ENRICHED_IRON = createIdentifier("quartz_enriched_iron"); public static final ResourceLocation QUARTZ_ENRICHED_COPPER = createIdentifier("quartz_enriched_copper"); public static final ResourceLocation SILICON = createIdentifier("silicon"); diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java index ae1f7c489..d05ebea7d 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/content/CreativeModeTabItems.java @@ -50,8 +50,6 @@ private static void appendBlocks(final Consumer consumer) { Blocks.INSTANCE.getFluidStorageBlock(variant) )); itemConsumer.accept(Blocks.INSTANCE.getMachineCasing()); - itemConsumer.accept(Blocks.INSTANCE.getQuartzEnrichedIronBlock()); - itemConsumer.accept(Blocks.INSTANCE.getQuartzEnrichedCopperBlock()); itemConsumer.accept(Blocks.INSTANCE.getStorageMonitor()); Items.INSTANCE.getNetworkTransmitters().stream().map(Supplier::get).forEach(itemConsumer); Items.INSTANCE.getNetworkReceivers().stream().map(Supplier::get).forEach(itemConsumer); diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/blockstates/quartz_enriched_copper_block.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/blockstates/quartz_enriched_copper_block.json deleted file mode 100644 index 79ec69bbc..000000000 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/blockstates/quartz_enriched_copper_block.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "refinedstorage:block/quartz_enriched_copper_block" - } - } -} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/blockstates/quartz_enriched_iron_block.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/blockstates/quartz_enriched_iron_block.json deleted file mode 100644 index b27fd75da..000000000 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/blockstates/quartz_enriched_iron_block.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variants": { - "": { - "model": "refinedstorage:block/quartz_enriched_iron_block" - } - } -} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json index da5e49fda..a3d016f66 100644 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/refinedstorage-common/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -1,8 +1,6 @@ { "mod.refinedstorage": "Refined Storage", "block.refinedstorage.cable": "Cable", - "block.refinedstorage.quartz_enriched_iron_block": "Block of Quartz Enriched Iron", - "block.refinedstorage.quartz_enriched_copper_block": "Block of Quartz Enriched Copper", "block.refinedstorage.disk_drive": "Disk Drive", "block.refinedstorage.machine_casing": "Machine Casing", "block.refinedstorage.grid": "Grid", diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/block/quartz_enriched_copper_block.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/block/quartz_enriched_copper_block.json deleted file mode 100644 index 956b8f9a4..000000000 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/block/quartz_enriched_copper_block.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "refinedstorage:block/quartz_enriched_copper_block" - } -} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/block/quartz_enriched_iron_block.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/block/quartz_enriched_iron_block.json deleted file mode 100644 index 64fd28d16..000000000 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/block/quartz_enriched_iron_block.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "refinedstorage:block/quartz_enriched_iron_block" - } -} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/quartz_enriched_copper_block.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/quartz_enriched_copper_block.json deleted file mode 100644 index 7fa5d899a..000000000 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/quartz_enriched_copper_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "refinedstorage:block/quartz_enriched_copper_block" -} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/quartz_enriched_iron_block.json b/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/quartz_enriched_iron_block.json deleted file mode 100644 index 5737f1a5c..000000000 --- a/refinedstorage-common/src/main/resources/assets/refinedstorage/models/item/quartz_enriched_iron_block.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "refinedstorage:block/quartz_enriched_iron_block" -} diff --git a/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/quartz_enriched_copper_block.png b/refinedstorage-common/src/main/resources/assets/refinedstorage/textures/block/quartz_enriched_copper_block.png deleted file mode 100644 index fb59478b5152335567163dbc44816dc724b13aa4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 685 zcmV;e0#f~nP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0zyedK~y+T9a6h) z6fqPXzs8=~Wj7EKL6A@=kSHi9_y{QZ4SK$WhJub7J^>^?fr^MCh@eE9ea?($#&2^5 z7nW?_dtTS%{i}zZvy@U%6ha8fsH#;8$y!VPFV4Al9{0hA>4>`5Z{LY};Z4tFE#^nq zUAL!PCU5-E`av@;ST*;<;rpi#l#l||7hk`O`&G_4TI1TCT%7uTM|erNkjrCd^{;QA z$K5K%NR?80{rBwIi|X!!B841Wkz;UOefk*Wxro8^Le^)`Uq)vbr4*=8Cg#g>c0{N^ zP4Lbh*0$L~UXf`EHb*a)C$y|lOr??peT@6Dr5zmQgAUP zidRCg2T+@KLkR~3RN)4WZM#Je5Y1tWhKWJzo|Os=IE1lv`XCp_h$xsbrxc9tZZ4sg zS9OsyJW=n%uwN0%;h0y839Q*rQL<7@GGZW%>D3?jLGKL7hgiD2PKQszaa85V_wbeWD6m-fpMIXH}x&Z`@F@>QI9@%Bn ztf^372T5`+*bxwFeoV^}xsC098XUAi*2G{nCN}P_gB>7}t15ZludkSt?vk&Xbi?Qn_1}xVdjvk!@(l)y=_E2aJx2A2z zb{o9|cDK1cIe$98cOU5F5cAS_pp=loLCOy!S{>~3h3++GEy*tSUl}j8ma+={ zEbL+>p+KaSeB{m!gO%95+EK_*Q9~{jIVCAnzD1x5d@L{9Ehb1g(J~xEqRAP_D2nK? zbR0tvt1%6=5*Zjlq+=LvG#c+ zMGzb+lK&JOj+92FHr|S!H#~JX?$5fP4N-1pHhtc!sa@Upz{c$Bf41E?YqwNon6go2a9 za`E|C`p`L|V(@lD_JoqwnH7_67*uULw;9x`dHK6nFKg;)jvCynO5NJ~zRHwT-Ng+a zTCuwZ=ugsv Date: Sun, 24 Nov 2024 00:05:52 +0000 Subject: [PATCH 30/30] chore: prepare release v2.0.0-milestone.4.10 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fb2ffec5..eeb0eb344 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [2.0.0-milestone.4.10] - 2024-11-24 + ### Added - Autocrafting Monitor @@ -812,7 +814,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - The Grid can now use smooth scrolling. - The Grid now has syntax highlighting for the search query. -[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.9...HEAD +[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.10...HEAD + +[2.0.0-milestone.4.10]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.9...v2.0.0-milestone.4.10 [2.0.0-milestone.4.9]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.8...v2.0.0-milestone.4.9