From a6289a1f104bb35b294db4fb214e1388205182f7 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 30 Jan 2024 18:14:20 +0100 Subject: [PATCH] feat: port to minecraft 1.20.4 --- .github/CONTRIBUTING.md | 5 - .github/workflows/build.yml | 3 +- .github/workflows/draft-release.yml | 2 +- .../issue-for-unsupported-version.yml | 2 +- .github/workflows/publish-release.yml | 5 +- .github/workflows/resolved-issue-locking.yml | 2 +- .github/workflows/validate-branch-name.yml | 2 +- .github/workflows/validate-changelog.yml | 2 +- .../workflows/validate-commit-messages.yml | 2 +- .gitignore | 2 +- CHANGELOG.md | 4 + LICENSE.md | 2 +- README.md | 2 +- build.gradle | 38 +- gradle/wrapper/gradle-wrapper.properties | 4 +- .../59eb3dbb5f86130e09b3c62d89b9525ee01cf52d | 2 +- .../9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e | 578 +++++++++--------- .../c52895b732924e707cb6e5ddd1c6b6962039449c | 2 +- .../cb654f100e416ac39358630d6623170b9bfdc5d2 | 2 +- .../f481442ce31db2c3b3dabb5b6d85f9a78568164e | 4 +- .../fd27170b6bf91459ed2598d25721edfeafc82e0a | 2 +- .../tags/blocks/relocation_not_supported.json | 22 +- .../coloring_recipes/black_controller.json | 7 +- .../misc/coloring_recipes/black_crafter.json | 7 +- .../black_crafter_manager.json | 7 +- .../coloring_recipes/black_crafting_grid.json | 7 +- .../black_crafting_monitor.json | 7 +- .../misc/coloring_recipes/black_detector.json | 7 +- .../black_disk_manipulator.json | 7 +- .../coloring_recipes/black_fluid_grid.json | 7 +- .../misc/coloring_recipes/black_grid.json | 7 +- .../black_network_receiver.json | 7 +- .../black_network_transmitter.json | 7 +- .../coloring_recipes/black_pattern_grid.json | 7 +- .../misc/coloring_recipes/black_relay.json | 7 +- .../black_security_manager.json | 7 +- .../black_wireless_transmitter.json | 7 +- .../coloring_recipes/blue_controller.json | 7 +- .../misc/coloring_recipes/blue_crafter.json | 7 +- .../blue_crafter_manager.json | 7 +- .../coloring_recipes/blue_crafting_grid.json | 7 +- .../blue_crafting_monitor.json | 7 +- .../misc/coloring_recipes/blue_detector.json | 7 +- .../blue_disk_manipulator.json | 7 +- .../coloring_recipes/blue_fluid_grid.json | 7 +- .../misc/coloring_recipes/blue_grid.json | 7 +- .../blue_network_receiver.json | 7 +- .../blue_network_transmitter.json | 7 +- .../coloring_recipes/blue_pattern_grid.json | 7 +- .../misc/coloring_recipes/blue_relay.json | 7 +- .../blue_security_manager.json | 7 +- .../blue_wireless_transmitter.json | 7 +- .../coloring_recipes/brown_controller.json | 7 +- .../misc/coloring_recipes/brown_crafter.json | 7 +- .../brown_crafter_manager.json | 7 +- .../coloring_recipes/brown_crafting_grid.json | 7 +- .../brown_crafting_monitor.json | 7 +- .../misc/coloring_recipes/brown_detector.json | 7 +- .../brown_disk_manipulator.json | 7 +- .../coloring_recipes/brown_fluid_grid.json | 7 +- .../misc/coloring_recipes/brown_grid.json | 7 +- .../brown_network_receiver.json | 7 +- .../brown_network_transmitter.json | 7 +- .../coloring_recipes/brown_pattern_grid.json | 7 +- .../misc/coloring_recipes/brown_relay.json | 7 +- .../brown_security_manager.json | 7 +- .../brown_wireless_transmitter.json | 7 +- .../misc/coloring_recipes/controller.json | 7 +- .../misc/coloring_recipes/crafter.json | 7 +- .../coloring_recipes/crafter_manager.json | 7 +- .../misc/coloring_recipes/crafting_grid.json | 7 +- .../coloring_recipes/crafting_monitor.json | 7 +- .../coloring_recipes/cyan_controller.json | 7 +- .../misc/coloring_recipes/cyan_crafter.json | 7 +- .../cyan_crafter_manager.json | 7 +- .../coloring_recipes/cyan_crafting_grid.json | 7 +- .../cyan_crafting_monitor.json | 7 +- .../misc/coloring_recipes/cyan_detector.json | 7 +- .../cyan_disk_manipulator.json | 7 +- .../coloring_recipes/cyan_fluid_grid.json | 7 +- .../misc/coloring_recipes/cyan_grid.json | 7 +- .../cyan_network_receiver.json | 7 +- .../cyan_network_transmitter.json | 7 +- .../coloring_recipes/cyan_pattern_grid.json | 7 +- .../misc/coloring_recipes/cyan_relay.json | 7 +- .../cyan_security_manager.json | 7 +- .../cyan_wireless_transmitter.json | 7 +- .../misc/coloring_recipes/detector.json | 7 +- .../coloring_recipes/disk_manipulator.json | 7 +- .../misc/coloring_recipes/fluid_grid.json | 7 +- .../coloring_recipes/gray_controller.json | 7 +- .../misc/coloring_recipes/gray_crafter.json | 7 +- .../gray_crafter_manager.json | 7 +- .../coloring_recipes/gray_crafting_grid.json | 7 +- .../gray_crafting_monitor.json | 7 +- .../misc/coloring_recipes/gray_detector.json | 7 +- .../gray_disk_manipulator.json | 7 +- .../coloring_recipes/gray_fluid_grid.json | 7 +- .../misc/coloring_recipes/gray_grid.json | 7 +- .../gray_network_receiver.json | 7 +- .../gray_network_transmitter.json | 7 +- .../coloring_recipes/gray_pattern_grid.json | 7 +- .../misc/coloring_recipes/gray_relay.json | 7 +- .../gray_security_manager.json | 7 +- .../gray_wireless_transmitter.json | 7 +- .../coloring_recipes/green_controller.json | 7 +- .../misc/coloring_recipes/green_crafter.json | 7 +- .../green_crafter_manager.json | 7 +- .../coloring_recipes/green_crafting_grid.json | 7 +- .../green_crafting_monitor.json | 7 +- .../misc/coloring_recipes/green_detector.json | 7 +- .../green_disk_manipulator.json | 7 +- .../coloring_recipes/green_fluid_grid.json | 7 +- .../misc/coloring_recipes/green_grid.json | 7 +- .../green_network_receiver.json | 7 +- .../green_network_transmitter.json | 7 +- .../coloring_recipes/green_pattern_grid.json | 7 +- .../misc/coloring_recipes/green_relay.json | 7 +- .../green_security_manager.json | 7 +- .../green_wireless_transmitter.json | 7 +- .../recipes/misc/coloring_recipes/grid.json | 7 +- .../light_gray_controller.json | 7 +- .../coloring_recipes/light_gray_crafter.json | 7 +- .../light_gray_crafter_manager.json | 7 +- .../light_gray_crafting_grid.json | 7 +- .../light_gray_crafting_monitor.json | 7 +- .../coloring_recipes/light_gray_detector.json | 7 +- .../light_gray_disk_manipulator.json | 7 +- .../light_gray_fluid_grid.json | 7 +- .../coloring_recipes/light_gray_grid.json | 7 +- .../light_gray_network_receiver.json | 7 +- .../light_gray_network_transmitter.json | 7 +- .../light_gray_pattern_grid.json | 7 +- .../coloring_recipes/light_gray_relay.json | 7 +- .../light_gray_security_manager.json | 7 +- .../light_gray_wireless_transmitter.json | 7 +- .../coloring_recipes/lime_controller.json | 7 +- .../misc/coloring_recipes/lime_crafter.json | 7 +- .../lime_crafter_manager.json | 7 +- .../coloring_recipes/lime_crafting_grid.json | 7 +- .../lime_crafting_monitor.json | 7 +- .../misc/coloring_recipes/lime_detector.json | 7 +- .../lime_disk_manipulator.json | 7 +- .../coloring_recipes/lime_fluid_grid.json | 7 +- .../misc/coloring_recipes/lime_grid.json | 7 +- .../lime_network_receiver.json | 7 +- .../lime_network_transmitter.json | 7 +- .../coloring_recipes/lime_pattern_grid.json | 7 +- .../misc/coloring_recipes/lime_relay.json | 7 +- .../lime_security_manager.json | 7 +- .../lime_wireless_transmitter.json | 7 +- .../coloring_recipes/magenta_controller.json | 7 +- .../coloring_recipes/magenta_crafter.json | 7 +- .../magenta_crafter_manager.json | 7 +- .../magenta_crafting_grid.json | 7 +- .../magenta_crafting_monitor.json | 7 +- .../coloring_recipes/magenta_detector.json | 7 +- .../magenta_disk_manipulator.json | 7 +- .../coloring_recipes/magenta_fluid_grid.json | 7 +- .../misc/coloring_recipes/magenta_grid.json | 7 +- .../magenta_network_receiver.json | 7 +- .../magenta_network_transmitter.json | 7 +- .../magenta_pattern_grid.json | 7 +- .../misc/coloring_recipes/magenta_relay.json | 7 +- .../magenta_security_manager.json | 7 +- .../magenta_wireless_transmitter.json | 7 +- .../coloring_recipes/network_receiver.json | 7 +- .../coloring_recipes/network_transmitter.json | 7 +- .../coloring_recipes/orange_controller.json | 7 +- .../misc/coloring_recipes/orange_crafter.json | 7 +- .../orange_crafter_manager.json | 7 +- .../orange_crafting_grid.json | 7 +- .../orange_crafting_monitor.json | 7 +- .../coloring_recipes/orange_detector.json | 7 +- .../orange_disk_manipulator.json | 7 +- .../coloring_recipes/orange_fluid_grid.json | 7 +- .../misc/coloring_recipes/orange_grid.json | 7 +- .../orange_network_receiver.json | 7 +- .../orange_network_transmitter.json | 7 +- .../coloring_recipes/orange_pattern_grid.json | 7 +- .../misc/coloring_recipes/orange_relay.json | 7 +- .../orange_security_manager.json | 7 +- .../orange_wireless_transmitter.json | 7 +- .../misc/coloring_recipes/pattern_grid.json | 7 +- .../coloring_recipes/pink_controller.json | 7 +- .../misc/coloring_recipes/pink_crafter.json | 7 +- .../pink_crafter_manager.json | 7 +- .../coloring_recipes/pink_crafting_grid.json | 7 +- .../pink_crafting_monitor.json | 7 +- .../misc/coloring_recipes/pink_detector.json | 7 +- .../pink_disk_manipulator.json | 7 +- .../coloring_recipes/pink_fluid_grid.json | 7 +- .../misc/coloring_recipes/pink_grid.json | 7 +- .../pink_network_receiver.json | 7 +- .../pink_network_transmitter.json | 7 +- .../coloring_recipes/pink_pattern_grid.json | 7 +- .../misc/coloring_recipes/pink_relay.json | 7 +- .../pink_security_manager.json | 7 +- .../pink_wireless_transmitter.json | 7 +- .../coloring_recipes/purple_controller.json | 7 +- .../misc/coloring_recipes/purple_crafter.json | 7 +- .../purple_crafter_manager.json | 7 +- .../purple_crafting_grid.json | 7 +- .../purple_crafting_monitor.json | 7 +- .../coloring_recipes/purple_detector.json | 7 +- .../purple_disk_manipulator.json | 7 +- .../coloring_recipes/purple_fluid_grid.json | 7 +- .../misc/coloring_recipes/purple_grid.json | 7 +- .../purple_network_receiver.json | 7 +- .../purple_network_transmitter.json | 7 +- .../coloring_recipes/purple_pattern_grid.json | 7 +- .../misc/coloring_recipes/purple_relay.json | 7 +- .../purple_security_manager.json | 7 +- .../purple_wireless_transmitter.json | 7 +- .../misc/coloring_recipes/red_controller.json | 7 +- .../misc/coloring_recipes/red_crafter.json | 7 +- .../coloring_recipes/red_crafter_manager.json | 7 +- .../coloring_recipes/red_crafting_grid.json | 7 +- .../red_crafting_monitor.json | 7 +- .../misc/coloring_recipes/red_detector.json | 7 +- .../red_disk_manipulator.json | 7 +- .../misc/coloring_recipes/red_fluid_grid.json | 7 +- .../misc/coloring_recipes/red_grid.json | 7 +- .../red_network_receiver.json | 7 +- .../red_network_transmitter.json | 7 +- .../coloring_recipes/red_pattern_grid.json | 7 +- .../misc/coloring_recipes/red_relay.json | 7 +- .../red_security_manager.json | 7 +- .../red_wireless_transmitter.json | 7 +- .../recipes/misc/coloring_recipes/relay.json | 7 +- .../coloring_recipes/security_manager.json | 7 +- .../coloring_recipes/white_controller.json | 7 +- .../misc/coloring_recipes/white_crafter.json | 7 +- .../white_crafter_manager.json | 7 +- .../coloring_recipes/white_crafting_grid.json | 7 +- .../white_crafting_monitor.json | 7 +- .../misc/coloring_recipes/white_detector.json | 7 +- .../white_disk_manipulator.json | 7 +- .../coloring_recipes/white_fluid_grid.json | 7 +- .../misc/coloring_recipes/white_grid.json | 7 +- .../white_network_receiver.json | 7 +- .../white_network_transmitter.json | 7 +- .../coloring_recipes/white_pattern_grid.json | 7 +- .../misc/coloring_recipes/white_relay.json | 7 +- .../white_security_manager.json | 7 +- .../white_wireless_transmitter.json | 7 +- .../wireless_transmitter.json | 7 +- .../coloring_recipes/yellow_controller.json | 7 +- .../misc/coloring_recipes/yellow_crafter.json | 7 +- .../yellow_crafter_manager.json | 7 +- .../yellow_crafting_grid.json | 7 +- .../yellow_crafting_monitor.json | 7 +- .../coloring_recipes/yellow_detector.json | 7 +- .../yellow_disk_manipulator.json | 7 +- .../coloring_recipes/yellow_fluid_grid.json | 7 +- .../misc/coloring_recipes/yellow_grid.json | 7 +- .../yellow_network_receiver.json | 7 +- .../yellow_network_transmitter.json | 7 +- .../coloring_recipes/yellow_pattern_grid.json | 7 +- .../misc/coloring_recipes/yellow_relay.json | 7 +- .../yellow_security_manager.json | 7 +- .../yellow_wireless_transmitter.json | 7 +- .../crafting_grid/black_crafting_grid.json | 7 +- .../crafting_grid/blue_crafting_grid.json | 7 +- .../crafting_grid/brown_crafting_grid.json | 7 +- .../misc/crafting_grid/crafting_grid.json | 7 +- .../crafting_grid/cyan_crafting_grid.json | 7 +- .../crafting_grid/gray_crafting_grid.json | 7 +- .../crafting_grid/green_crafting_grid.json | 7 +- .../light_gray_crafting_grid.json | 7 +- .../crafting_grid/lime_crafting_grid.json | 7 +- .../crafting_grid/magenta_crafting_grid.json | 7 +- .../crafting_grid/orange_crafting_grid.json | 7 +- .../crafting_grid/pink_crafting_grid.json | 7 +- .../crafting_grid/purple_crafting_grid.json | 7 +- .../misc/crafting_grid/red_crafting_grid.json | 7 +- .../crafting_grid/white_crafting_grid.json | 7 +- .../crafting_grid/yellow_crafting_grid.json | 7 +- .../misc/fluid_grid/black_fluid_grid.json | 7 +- .../misc/fluid_grid/blue_fluid_grid.json | 7 +- .../misc/fluid_grid/brown_fluid_grid.json | 7 +- .../misc/fluid_grid/cyan_fluid_grid.json | 7 +- .../recipes/misc/fluid_grid/fluid_grid.json | 7 +- .../misc/fluid_grid/gray_fluid_grid.json | 7 +- .../misc/fluid_grid/green_fluid_grid.json | 7 +- .../fluid_grid/light_gray_fluid_grid.json | 7 +- .../misc/fluid_grid/lime_fluid_grid.json | 7 +- .../misc/fluid_grid/magenta_fluid_grid.json | 7 +- .../misc/fluid_grid/orange_fluid_grid.json | 7 +- .../misc/fluid_grid/pink_fluid_grid.json | 7 +- .../misc/fluid_grid/purple_fluid_grid.json | 7 +- .../misc/fluid_grid/red_fluid_grid.json | 7 +- .../misc/fluid_grid/white_fluid_grid.json | 7 +- .../misc/fluid_grid/yellow_fluid_grid.json | 7 +- .../misc/pattern_grid/black_pattern_grid.json | 7 +- .../misc/pattern_grid/blue_pattern_grid.json | 7 +- .../misc/pattern_grid/brown_pattern_grid.json | 7 +- .../misc/pattern_grid/cyan_pattern_grid.json | 7 +- .../misc/pattern_grid/gray_pattern_grid.json | 7 +- .../misc/pattern_grid/green_pattern_grid.json | 7 +- .../pattern_grid/light_gray_pattern_grid.json | 7 +- .../misc/pattern_grid/lime_pattern_grid.json | 7 +- .../pattern_grid/magenta_pattern_grid.json | 7 +- .../pattern_grid/orange_pattern_grid.json | 7 +- .../misc/pattern_grid/pattern_grid.json | 7 +- .../misc/pattern_grid/pink_pattern_grid.json | 7 +- .../pattern_grid/purple_pattern_grid.json | 7 +- .../misc/pattern_grid/red_pattern_grid.json | 7 +- .../misc/pattern_grid/white_pattern_grid.json | 7 +- .../pattern_grid/yellow_pattern_grid.json | 7 +- .../com/refinedmods/refinedstorage/RS.java | 59 +- .../refinedstorage/RSBlockEntities.java | 85 +-- .../refinedmods/refinedstorage/RSBlocks.java | 86 +-- .../refinedstorage/RSContainerMenus.java | 60 +- .../RSCreativeModeTabItems.java | 20 +- .../refinedmods/refinedstorage/RSItems.java | 247 +++++--- .../refinedstorage/RSKeyBindings.java | 4 +- .../refinedstorage/RSLootFunctions.java | 17 +- .../refinedstorage/RSRecipeSerializers.java | 7 +- .../refinedstorage/api/IRSAPI.java | 3 +- .../api/autocrafting/ICraftingManager.java | 5 +- .../api/autocrafting/ICraftingPattern.java | 3 +- .../ICraftingPatternContainer.java | 8 +- .../ICraftingMonitorElement.java | 5 +- .../preview/ICraftingPreviewElement.java | 4 +- .../task/ICraftingRequestInfo.java | 3 +- .../api/autocrafting/task/ICraftingTask.java | 3 +- .../refinedstorage/api/network/INetwork.java | 5 +- .../api/network/grid/IGrid.java | 7 +- .../api/network/grid/IGridTab.java | 3 +- .../api/render/IElementDrawer.java | 2 +- .../api/render/IElementDrawers.java | 2 +- .../api/storage/IStorageProvider.java | 3 +- .../api/storage/cache/IStorageCache.java | 6 + .../IExternalStorageContext.java | 2 +- .../IExternalStorageProvider.java | 14 +- .../refinedstorage/api/util/IComparer.java | 3 +- .../refinedstorage/apiimpl/API.java | 98 +-- .../apiimpl/autocrafting/CraftingManager.java | 4 +- .../apiimpl/autocrafting/CraftingPattern.java | 3 +- .../autocrafting/CraftingPatternFactory.java | 82 ++- .../autocrafting/CraftingPatternInputs.java | 3 +- .../autocrafting/CraftingPatternOutputs.java | 2 +- .../autocrafting/InvalidCraftingPattern.java | 3 +- .../FluidCraftingMonitorElement.java | 7 +- .../ItemCraftingMonitorElement.java | 5 +- .../preview/FluidCraftingPreviewElement.java | 6 +- .../preview/ItemCraftingPreviewElement.java | 6 +- .../task/CraftingRequestInfo.java | 3 +- .../task/v6/CraftingPatternInputs.java | 3 +- .../autocrafting/task/v6/CraftingTask.java | 3 +- .../apiimpl/autocrafting/task/v6/IoUtil.java | 3 +- .../task/v6/SerializationUtil.java | 4 +- .../v6/calculator/CraftingCalculator.java | 5 +- .../CraftingMonitorElementFactory.java | 3 +- .../task/v6/node/CraftingNode.java | 2 +- .../autocrafting/task/v6/node/Node.java | 2 +- .../task/v6/node/NodeRequirements.java | 5 +- .../task/v6/node/ProcessingNode.java | 3 +- .../CraftingPreviewElementFactory.java | 3 +- .../task/v6/preview/CraftingPreviewInfo.java | 3 +- .../apiimpl/network/Network.java | 6 +- .../apiimpl/network/NetworkListener.java | 4 +- .../apiimpl/network/NetworkNodeGraph.java | 2 +- .../apiimpl/network/NetworkNodeListener.java | 4 +- .../network/grid/CraftingGridBehavior.java | 17 +- .../apiimpl/network/grid/GridManager.java | 3 +- .../apiimpl/network/grid/GridTab.java | 3 +- .../grid/handler/FluidGridHandler.java | 36 +- .../network/grid/handler/ItemGridHandler.java | 20 +- .../handler/PortableFluidGridHandler.java | 14 +- .../grid/handler/PortableItemGridHandler.java | 9 +- .../WirelessCraftingMonitorNetworkItem.java | 16 +- .../item/WirelessFluidGridNetworkItem.java | 11 +- .../network/item/WirelessGridNetworkItem.java | 11 +- .../network/node/ConstructorNetworkNode.java | 20 +- .../network/node/CrafterNetworkNode.java | 15 +- .../network/node/DestructorNetworkNode.java | 19 +- .../network/node/DetectorNetworkNode.java | 5 +- .../network/node/ExporterNetworkNode.java | 24 +- .../node/ExternalStorageNetworkNode.java | 8 +- .../node/FluidInterfaceNetworkNode.java | 12 +- .../apiimpl/network/node/GridNetworkNode.java | 18 +- .../network/node/ImporterNetworkNode.java | 22 +- .../network/node/InterfaceNetworkNode.java | 4 +- .../apiimpl/network/node/NetworkNode.java | 2 +- .../node/NetworkTransmitterNetworkNode.java | 3 +- .../node/SecurityManagerNetworkNode.java | 5 +- .../node/StorageMonitorNetworkNode.java | 42 +- .../node/WirelessTransmitterNetworkNode.java | 2 +- .../network/node/cover/CoverManager.java | 9 +- .../node/diskdrive/DiskDriveNetworkNode.java | 6 +- .../FluidDriveWrapperStorageDisk.java | 3 +- .../ItemDriveWrapperStorageDisk.java | 3 +- .../DiskManipulatorNetworkNode.java | 11 +- .../StorageDiskFluidManipulatorWrapper.java | 3 +- .../StorageDiskItemManipulatorWrapper.java | 3 +- .../node/storage/FluidStorageNetworkNode.java | 2 +- .../FluidStorageWrapperStorageDisk.java | 3 +- .../ItemStorageWrapperStorageDisk.java | 3 +- .../node/storage/StorageNetworkNode.java | 2 +- .../apiimpl/render/ElementDrawers.java | 2 +- .../storage/cache/FluidStorageCache.java | 33 +- .../storage/cache/ItemStorageCache.java | 29 + .../cache/PortableFluidStorageCache.java | 13 +- .../cache/PortableItemStorageCache.java | 15 +- .../FluidGridStorageCacheListener.java | 26 +- .../ItemGridStorageCacheListener.java | 26 +- ...PortableFluidGridStorageCacheListener.java | 32 +- .../PortableItemGridStorageCacheListener.java | 28 +- .../storage/disk/FluidStorageDisk.java | 3 +- .../apiimpl/storage/disk/ItemStorageDisk.java | 3 +- .../disk/PortableFluidStorageDisk.java | 3 +- .../disk/factory/FluidStorageDiskFactory.java | 3 +- .../externalstorage/FluidExternalStorage.java | 5 +- .../FluidExternalStorageCache.java | 5 +- .../FluidExternalStorageProvider.java | 19 +- .../externalstorage/ItemExternalStorage.java | 5 +- .../ItemExternalStorageCache.java | 3 +- .../ItemExternalStorageProvider.java | 20 +- .../storage/tracker/FluidStorageTracker.java | 3 +- .../refinedstorage/apiimpl/util/Comparer.java | 3 +- .../apiimpl/util/FluidFilter.java | 2 +- .../apiimpl/util/FluidStackList.java | 3 +- .../apiimpl/util/ItemStackList.java | 3 +- .../apiimpl/util/QuantityFormatter.java | 3 +- .../apiimpl/util/RSSavedData.java | 2 +- .../refinedstorage/block/BlockListener.java | 4 +- .../refinedstorage/block/CableBlock.java | 40 +- .../block/ConstructorBlock.java | 4 +- .../refinedstorage/block/ControllerBlock.java | 22 +- .../refinedstorage/block/CrafterBlock.java | 5 +- .../block/CrafterManagerBlock.java | 5 +- .../block/CraftingMonitorBlock.java | 5 +- .../refinedstorage/block/DestructorBlock.java | 4 +- .../refinedstorage/block/DetectorBlock.java | 6 +- .../refinedstorage/block/DiskDriveBlock.java | 4 +- .../block/DiskManipulatorBlock.java | 5 +- .../refinedstorage/block/ExporterBlock.java | 4 +- .../block/ExternalStorageBlock.java | 4 +- .../block/FluidInterfaceBlock.java | 4 +- .../block/FluidStorageBlock.java | 4 +- .../refinedstorage/block/GridBlock.java | 6 +- .../refinedstorage/block/ImporterBlock.java | 4 +- .../refinedstorage/block/InterfaceBlock.java | 4 +- .../block/NetworkNodeBlock.java | 2 +- .../block/NetworkTransmitterBlock.java | 5 +- .../refinedstorage/block/RelayBlock.java | 5 +- .../block/SecurityManagerBlock.java | 5 +- .../refinedstorage/block/StorageBlock.java | 5 +- .../block/StorageMonitorBlock.java | 4 +- .../block/WirelessTransmitterBlock.java | 4 +- .../blockentity/CableBlockEntity.java | 3 +- .../blockentity/ConstructorBlockEntity.java | 3 +- .../blockentity/ControllerBlockEntity.java | 23 - .../blockentity/CrafterBlockEntity.java | 35 +- .../blockentity/DestructorBlockEntity.java | 3 +- .../blockentity/DiskDriveBlockEntity.java | 23 +- .../DiskManipulatorBlockEntity.java | 23 +- .../blockentity/ExporterBlockEntity.java | 3 +- .../ExternalStorageBlockEntity.java | 5 +- .../FluidInterfaceBlockEntity.java | 25 +- .../blockentity/ImporterBlockEntity.java | 3 +- .../blockentity/InterfaceBlockEntity.java | 19 - .../blockentity/NetworkNodeBlockEntity.java | 21 - .../NetworkTransmitterBlockEntity.java | 19 - .../StorageMonitorBlockEntity.java | 3 +- .../blockentity/config/IType.java | 3 +- .../config/IWhitelistBlacklist.java | 4 +- .../BlockEntitySynchronizationManager.java | 4 +- .../BlockEntitySynchronizationWatcher.java | 6 +- .../blockentity/data/RSSerializers.java | 3 +- .../blockentity/grid/GridBlockEntity.java | 19 +- .../blockentity/grid/WirelessFluidGrid.java | 3 +- .../blockentity/grid/WirelessGrid.java | 3 +- .../grid/portable/IPortableGrid.java | 5 +- .../grid/portable/PortableGrid.java | 19 +- .../portable/PortableGridBlockEntity.java | 38 +- .../NetworkNodeProxyCapability.java | 14 - .../command/disk/CreateDiskCommand.java | 2 +- .../command/pattern/PatternDumpCommand.java | 2 +- .../refinedstorage/config/ClientConfig.java | 48 +- .../refinedstorage/config/ServerConfig.java | 336 +++++----- .../container/AmountContainerMenu.java | 4 +- .../container/BaseContainerMenu.java | 3 +- .../container/ConstructorContainerMenu.java | 2 +- .../container/CrafterContainerMenu.java | 2 +- .../CrafterManagerContainerMenu.java | 3 +- .../CraftingMonitorContainerMenu.java | 12 +- .../CraftingSettingsContainerMenu.java | 4 +- .../container/DestructorContainerMenu.java | 2 +- .../container/DiskDriveContainerMenu.java | 2 +- .../DiskManipulatorContainerMenu.java | 2 +- .../container/ExporterContainerMenu.java | 2 +- .../container/FluidAmountContainerMenu.java | 2 +- .../FluidInterfaceContainerMenu.java | 2 +- .../container/GridContainerMenu.java | 3 +- .../container/ImporterContainerMenu.java | 2 +- .../container/InterfaceContainerMenu.java | 2 +- .../NetworkTransmitterContainerMenu.java | 2 +- .../SecurityManagerContainerMenu.java | 12 +- .../WirelessTransmitterContainerMenu.java | 2 +- .../factory/BlockEntityContainerFactory.java | 2 +- .../CrafterManagerContainerFactory.java | 3 +- .../factory/CrafterManagerMenuProvider.java | 3 +- .../CraftingMonitorContainerFactory.java | 2 +- .../factory/GridContainerFactory.java | 2 +- ...relessCraftingMonitorContainerFactory.java | 2 +- .../container/slot/BaseSlot.java | 5 +- .../container/slot/CrafterManagerSlot.java | 2 +- .../container/slot/DisabledSlot.java | 3 +- .../container/slot/OutputSlot.java | 3 +- .../container/slot/filter/FilterSlot.java | 3 +- .../slot/filter/FluidFilterSlot.java | 3 +- .../slot/grid/ResultCraftingGridSlot.java | 11 +- .../transfer/FilterInventoryWrapper.java | 3 +- .../transfer/FluidFilterInventoryWrapper.java | 4 +- .../transfer/InventoryInventoryWrapper.java | 9 +- .../transfer/ItemFilterInventoryWrapper.java | 4 +- .../transfer/ItemHandlerInventoryWrapper.java | 5 +- .../container/transfer/TransferManager.java | 7 +- .../BlockEntityTagGenerator.java | 7 +- .../datageneration/BlockModelGenerator.java | 19 +- .../datageneration/BlockModels.java | 11 +- .../datageneration/BlockTagGenerator.java | 9 +- .../datageneration/DataGenerators.java | 7 +- .../datageneration/ItemTagGenerator.java | 11 +- .../datageneration/LootTableGenerator.java | 9 +- .../datageneration/RecipeGenerator.java | 14 +- .../energy/BaseEnergyStorage.java | 2 +- .../energy/ItemEnergyStorage.java | 2 +- .../CraftingTweaksIntegration.java | 5 +- .../integration/curios/CuriosIntegration.java | 8 +- .../InventorySorterIntegration.java | 4 +- .../InventoryTweaksIntegration.java | 2 +- .../jei/CoverCraftingCategoryExtension.java | 41 +- .../jei/GhostIngredientHandler.java | 4 +- .../jei/GridRecipeTransferHandler.java | 6 +- .../integration/jei/GuiContainerHandler.java | 3 +- .../HollowCoverCraftingCategoryExtension.java | 28 +- .../integration/jei/IngredientTracker.java | 1 - .../integration/jei/JeiHelper.java | 1 - .../integration/jei/JeiIntegration.java | 2 +- .../integration/jei/RSJeiPlugin.java | 4 +- .../ConfiguredFluidsInFilterItemHandler.java | 2 +- ...onfiguredIconInFluidFilterItemHandler.java | 2 +- .../inventory/fluid/FluidInventory.java | 3 +- .../inventory/fluid/ProxyFluidHandler.java | 7 +- .../inventory/item/BaseItemHandler.java | 3 +- .../ConfiguredIconInFilterItemHandler.java | 2 +- .../ConfiguredItemsInFilterItemHandler.java | 2 +- .../inventory/item/FilterItemHandler.java | 7 +- .../inventory/item/ProxyItemHandler.java | 3 +- .../inventory/player/PlayerSlot.java | 10 +- .../refinedstorage/item/CoverItem.java | 2 +- .../refinedstorage/item/EnergyItem.java | 26 +- .../refinedstorage/item/FilterItem.java | 5 +- .../refinedstorage/item/PatternItem.java | 9 +- .../refinedstorage/item/WrenchItem.java | 2 +- .../item/blockitem/EnergyBlockItem.java | 25 +- .../EnergyCapabilityProvider.java | 31 - .../ControllerItemPropertyGetter.java | 14 +- .../property/NetworkItemPropertyGetter.java | 5 +- .../SecurityCardItemPropertyGetter.java | 5 +- .../loottable/ControllerLootFunction.java | 40 +- .../loottable/CrafterLootFunction.java | 31 +- .../PortableGridBlockLootFunction.java | 27 +- .../loottable/StorageBlockLootFunction.java | 22 +- .../network/FilterUpdateMessage.java | 49 +- .../network/FluidFilterSlotUpdateMessage.java | 29 +- .../network/NetworkHandler.java | 281 ++++++--- .../network/OpenNetworkItemMessage.java | 54 +- .../network/PacketSplitter.java | 228 ------- .../network/SecurityManagerUpdateMessage.java | 51 +- .../network/SetFilterSlotMessage.java | 59 +- .../network/SetFluidFilterSlotMessage.java | 60 +- .../network/SplitPacketMessage.java | 44 -- .../CraftingMonitorCancelMessage.java | 48 +- .../CraftingMonitorSyncTask.java | 15 + .../CraftingMonitorUpdateMessage.java | 71 ++- ...sCraftingMonitorSettingsUpdateMessage.java | 49 +- .../disk/StorageDiskSizeRequestMessage.java | 35 +- .../disk/StorageDiskSizeResponseMessage.java | 39 +- .../network/grid/GridClearMessage.java | 38 +- .../GridCraftingPreviewRequestMessage.java | 69 ++- .../GridCraftingPreviewResponseMessage.java | 52 +- .../grid/GridCraftingStartRequestMessage.java | 63 +- .../GridCraftingStartResponseMessage.java | 26 +- .../network/grid/GridFluidDeltaMessage.java | 70 +-- .../grid/GridFluidInsertHeldMessage.java | 43 +- .../network/grid/GridFluidPullMessage.java | 51 +- .../network/grid/GridFluidUpdateMessage.java | 68 +-- .../network/grid/GridItemDeltaMessage.java | 73 +-- .../grid/GridItemGridScrollMessage.java | 40 +- .../grid/GridItemInsertHeldMessage.java | 45 +- .../grid/GridItemInventoryScrollMessage.java | 37 +- .../network/grid/GridItemPullMessage.java | 48 +- .../network/grid/GridItemUpdateMessage.java | 72 +-- .../grid/GridPatternCreateMessage.java | 41 +- .../grid/GridProcessingTransferMessage.java | 85 +-- .../network/grid/GridStackDelta.java | 6 + .../network/grid/GridTransferMessage.java | 53 +- .../grid/PortableGridFluidDeltaMessage.java | 64 -- .../grid/PortableGridFluidUpdateMessage.java | 62 -- .../grid/PortableGridItemDeltaMessage.java | 66 -- .../grid/PortableGridItemUpdateMessage.java | 62 -- .../PortableGridSettingsUpdateMessage.java | 96 +-- ...irelessFluidGridSettingsUpdateMessage.java | 82 +-- .../WirelessGridSettingsUpdateMessage.java | 96 +-- ...EntitySynchronizationParameterMessage.java | 48 +- ...ynchronizationParameterUpdateMessage.java} | 50 +- .../refinedstorage/recipe/CoverRecipe.java | 7 +- .../recipe/HollowCoverRecipe.java | 4 +- .../UpgradeWithEnchantedBookRecipe.java | 87 ++- ...radeWithEnchantedBookRecipeSerializer.java | 54 +- .../refinedstorage/render/FluidRenderer.java | 6 +- .../PatternItemBlockEntityRenderer.java | 2 +- .../StorageMonitorBlockEntityRenderer.java | 6 +- .../render/model/CubeBuilder.java | 2 +- .../render/model/DiskDriveGeometryLoader.java | 2 +- .../model/DiskDriveUnbakedGeometry.java | 6 +- .../model/DiskManipulatorGeometryLoader.java | 2 +- .../model/DiskManipulatorUnbakedGeometry.java | 9 +- .../model/PortableGridGeometryLoader.java | 2 +- .../model/PortableGridUnbakedGeometry.java | 9 +- .../model/baked/CableCoverBakedModel.java | 4 +- .../model/baked/DiskDriveBakedModel.java | 4 +- .../baked/DiskManipulatorBakedModel.java | 9 +- .../render/model/baked/PatternBakedModel.java | 3 +- .../model/baked/PortableGridBakedModel.java | 9 +- .../baked/PortableGridItemBakedModel.java | 3 +- .../screen/AmountSpecifyingScreen.java | 4 +- .../refinedstorage/screen/BaseScreen.java | 19 +- .../screen/ControllerScreen.java | 4 +- .../screen/CrafterManagerScreen.java | 4 +- .../screen/CraftingMonitorScreen.java | 26 +- .../refinedstorage/screen/FilterScreen.java | 4 +- .../screen/FluidAmountScreen.java | 2 +- .../screen/ItemAmountScreen.java | 2 +- .../screen/KeyInputListener.java | 4 +- .../screen/SecurityManagerScreen.java | 10 +- .../screen/grid/AlternativesScreen.java | 42 +- .../screen/grid/CraftingPreviewScreen.java | 6 +- .../screen/grid/CraftingSettingsScreen.java | 2 +- .../screen/grid/GridScreen.java | 23 +- .../grid/filtering/FilterGridFilter.java | 17 +- .../screen/grid/sorting/IdGridSorter.java | 2 +- .../sorting/InventoryTweaksGridSorter.java | 45 -- .../screen/grid/stack/FluidGridStack.java | 87 ++- .../screen/grid/stack/ItemGridStack.java | 81 ++- .../screen/grid/view/GridViewImpl.java | 2 +- .../screen/grid/view/IGridView.java | 2 +- .../screen/widget/CheckboxWidget.java | 78 --- .../screen/widget/ScrollbarWidget.java | 4 +- .../sidebutton/GridSortingTypeSideButton.java | 13 +- .../refinedstorage/setup/ClientSetup.java | 80 +-- .../refinedstorage/setup/CommonSetup.java | 271 ++++++-- .../refinedstorage/setup/ServerSetup.java | 4 +- .../refinedstorage/util/BlockColorMap.java | 89 +++ .../refinedstorage/util/ColorMap.java | 133 +--- .../refinedstorage/util/ItemColorMap.java | 57 ++ .../refinedstorage/util/LevelUtils.java | 54 +- .../refinedstorage/util/NetworkUtils.java | 10 +- .../refinedstorage/util/RenderUtils.java | 6 +- .../refinedstorage/util/StackUtils.java | 189 +++--- .../resources/META-INF/accesstransformer.cfg | 12 +- src/main/resources/META-INF/mods.toml | 2 +- .../models/block/constructor_destructor.json | 2 +- .../models/block/cube_all_cutout.json | 12 +- .../models/block/cube_cutout.json | 12 +- .../models/block/cube_north_cutout.json | 2 +- .../refinedstorage/models/block/detector.json | 8 +- .../models/block/disks/disk.json | 12 +- .../models/block/disks/disk_full.json | 12 +- .../block/disks/disk_near_capacity.json | 12 +- .../block/disks/portable_grid_disk.json | 12 +- .../block/disks/portable_grid_disk_full.json | 12 +- .../portable_grid_disk_near_capacity.json | 12 +- .../models/block/wireless_transmitter.json | 12 +- .../recipes/fortune_1_upgrade.json | 6 +- .../recipes/fortune_2_upgrade.json | 6 +- .../recipes/fortune_3_upgrade.json | 6 +- .../recipes/silk_touch_upgrade.json | 4 +- src/main/resources/pack.mcmeta | 2 +- 684 files changed, 4923 insertions(+), 5398 deletions(-) delete mode 100644 src/main/java/com/refinedmods/refinedstorage/capability/NetworkNodeProxyCapability.java delete mode 100644 src/main/java/com/refinedmods/refinedstorage/item/capabilityprovider/EnergyCapabilityProvider.java delete mode 100644 src/main/java/com/refinedmods/refinedstorage/network/PacketSplitter.java delete mode 100644 src/main/java/com/refinedmods/refinedstorage/network/SplitPacketMessage.java create mode 100644 src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorSyncTask.java create mode 100644 src/main/java/com/refinedmods/refinedstorage/network/grid/GridStackDelta.java delete mode 100644 src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridFluidDeltaMessage.java delete mode 100644 src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridFluidUpdateMessage.java delete mode 100644 src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridItemDeltaMessage.java delete mode 100644 src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridItemUpdateMessage.java rename src/main/java/com/refinedmods/refinedstorage/network/sync/{BlockEntitySynchronizationParamaterUpdateMessage.java => BlockEntitySynchronizationParameterUpdateMessage.java} (52%) delete mode 100644 src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/InventoryTweaksGridSorter.java delete mode 100644 src/main/java/com/refinedmods/refinedstorage/screen/widget/CheckboxWidget.java create mode 100644 src/main/java/com/refinedmods/refinedstorage/util/BlockColorMap.java create mode 100644 src/main/java/com/refinedmods/refinedstorage/util/ItemColorMap.java diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0e26cfd6e3..a1b1f9e5e1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -162,11 +162,6 @@ The build workflow takes care of the following: - Running a Gradle build, running our tests in the process and generating an aggregated code coverage report for the API modules. -- Analyzing the code on SonarQube. - > Because of - > [limitations with SonarQube](https://portal.productboard.com/sonarsource/1-sonarcloud/c/50-sonarcloud-analyzes-external-pull-request), - > pull requests originating from a fork aren't analyzed on SonarQube. - - Code style validation with Checkstyle. - Mutation and line coverage test with Pitest. - Uploading the artifacts on the action. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08b79a86c5..448b30e2cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,8 @@ on: types: [ opened, synchronize, reopened ] jobs: build: - uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.7.1 + uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.11.4 with: mutation-testing: false + sonarqube: false secrets: inherit diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 9ad68dfe61..9fc1f33734 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -17,7 +17,7 @@ on: type: string jobs: draft: - uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.7.1 + uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.11.4 with: release-type: ${{ inputs.release-type }} version-number-override: ${{ inputs.version-number-override }} diff --git a/.github/workflows/issue-for-unsupported-version.yml b/.github/workflows/issue-for-unsupported-version.yml index 682945e7da..b2ad193d9c 100644 --- a/.github/workflows/issue-for-unsupported-version.yml +++ b/.github/workflows/issue-for-unsupported-version.yml @@ -4,4 +4,4 @@ on: types: [ labeled, unlabeled, reopened ] jobs: unsupported-labeler: - uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.7.1 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.11.4 \ No newline at end of file diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 4e4abb047f..1254b05b79 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -7,11 +7,12 @@ on: - closed jobs: publish-release: - uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.7.1 + uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.11.4 secrets: inherit with: project-name: 'Refined Storage' announce: true mutation-testing: false curseforge: true - modrinth: true \ No newline at end of file + modrinth: true + sonarqube: false \ No newline at end of file diff --git a/.github/workflows/resolved-issue-locking.yml b/.github/workflows/resolved-issue-locking.yml index a3c881c332..2b7957c337 100644 --- a/.github/workflows/resolved-issue-locking.yml +++ b/.github/workflows/resolved-issue-locking.yml @@ -4,4 +4,4 @@ on: - cron: '0 0 * * *' jobs: lock: - uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.7.1 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.11.4 \ No newline at end of file diff --git a/.github/workflows/validate-branch-name.yml b/.github/workflows/validate-branch-name.yml index 02b7d4c291..db81528a60 100644 --- a/.github/workflows/validate-branch-name.yml +++ b/.github/workflows/validate-branch-name.yml @@ -2,4 +2,4 @@ name: Validate branch name on: [ pull_request ] jobs: validate-branch-name: - uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.7.1 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.11.4 \ No newline at end of file diff --git a/.github/workflows/validate-changelog.yml b/.github/workflows/validate-changelog.yml index 43125b2f27..44feba66a3 100644 --- a/.github/workflows/validate-changelog.yml +++ b/.github/workflows/validate-changelog.yml @@ -4,6 +4,6 @@ on: types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ] jobs: validate-changelog: - uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.7.1 + uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.11.4 with: validation-level: 'warn' \ No newline at end of file diff --git a/.github/workflows/validate-commit-messages.yml b/.github/workflows/validate-commit-messages.yml index 2eb18439aa..2656a4d2b3 100644 --- a/.github/workflows/validate-commit-messages.yml +++ b/.github/workflows/validate-commit-messages.yml @@ -2,4 +2,4 @@ name: Validate commit messages on: [ pull_request ] jobs: validate-commit-messages: - uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.7.1 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.11.4 \ No newline at end of file diff --git a/.gitignore b/.gitignore index a862b184c9..d32e5069e6 100755 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ eclipse/ .nb-gradle-properties .project *.launch -run/ +runs/ *.iml *.ipr *.iws diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e6c77ab51..df707afd62 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added + +- Ported to Minecraft 1.20.4. + ## [1.12.4] - 2023-11-05 ### Added diff --git a/LICENSE.md b/LICENSE.md index 52d00fe80a..75bfe45aaf 100755 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # The MIT License (MIT) -Copyright © 2015 - 2023 Refined Mods +Copyright © 2015 - 2024 Refined Mods Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/README.md b/README.md index b7a50c73ee..7e1d72e2e6 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

Refined Storage is a mass storage mod for Minecraft that offers the player a network-based storage system, allowing them to store items and fluids on a massively expandable device network.

-[![Build Status](https://github.com/refinedmods/refinedstorage/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage&metric=coverage)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage) [![Downloads on CurseForge](http://cf.way2muchnoise.eu/full_243076_downloads.svg)](http://minecraft.curseforge.com/projects/refined-storage) [![Downloads on Modrinth](https://img.shields.io/modrinth/dt/refined-storage?logo=modrinth)](https://modrinth.com/mod/refined-storage) [![Discord](https://img.shields.io/discord/342942776494653441)](https://discordapp.com/invite/VYzsydb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md) +[![Build Status](https://github.com/refinedmods/refinedstorage/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage/actions/workflows/build.yml) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage) [![Downloads on CurseForge](http://cf.way2muchnoise.eu/full_243076_downloads.svg)](http://minecraft.curseforge.com/projects/refined-storage) [![Downloads on Modrinth](https://img.shields.io/modrinth/dt/refined-storage?logo=modrinth)](https://modrinth.com/mod/refined-storage) [![Discord](https://img.shields.io/discord/342942776494653441)](https://discordapp.com/invite/VYzsydb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md) ## About diff --git a/build.gradle b/build.gradle index 944a2713f0..9075ba5149 100755 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,4 @@ -apply from: "https://raw.githubusercontent.com/refinedmods/refinedarchitect/v0.7.1/helper.gradle" - -// TODO: remove in 1.21 -ext { - forgeVersion = "47.1.0" -} +apply from: "https://raw.githubusercontent.com/refinedmods/refinedarchitect/v0.11.4/helper.gradle" repositories { maven { @@ -32,34 +27,15 @@ enablePublishing() enableCurseForge(243076) enableModrinth("KDvYkUg3") enableJavadoc() -enableSonarQube("refinedmods_refinedstorage") dependencies { - compileOnly fg.deobf("mezz.jei:jei-1.20.1-common-api:15.2.0.22") - compileOnly fg.deobf("mezz.jei:jei-1.20.1-forge-api:15.2.0.22") - runtimeOnly fg.deobf("mezz.jei:jei-1.20.1-forge:15.2.0.22") + compileOnly "mezz.jei:jei-1.20.4-common-api:17.3.0.43" + compileOnly "mezz.jei:jei-1.20.4-neoforge-api:17.3.0.43" + runtimeOnly "mezz.jei:jei-1.20.4-neoforge:17.3.0.43" - compileOnly fg.deobf('curse.maven:mouse-tweaks-60089:4581240') + compileOnly "curse.maven:mouse-tweaks-60089:4776995" - compileOnly fg.deobf('curse.maven:crafting-tweaks-233071:4596466') + compileOnly 'curse.maven:crafting-tweaks-233071:4991559' - implementation fg.deobf("top.theillusivec4.curios:curios-forge:5.2.0-beta.3+1.20.1") + implementation "top.theillusivec4.curios:curios-neoforge:7.2.0+1.20.4" } - -// TODO: remove in 1.21 -minecraft { - runs { - server { - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" - } - client { - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" - } - data { - property 'mixin.env.remapRefMap', 'true' - property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg" - } - } -} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049a6..1af9e0930b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d index 7ea369eafa..0d57081b12 100644 --- a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d +++ b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d @@ -1,4 +1,4 @@ -// 1.20.1 2023-11-05T14:19:25.383214243 Loot Tables +// 1.20.4 2024-02-12T20:34:18.534056485 Loot Tables 24df81614f6b28c4c7e59589d79fd2c929d71727 data/refinedstorage/loot_tables/blocks/black_controller.json aadbec0f79a3fb95d39e866a453cfec0cbbacd36 data/refinedstorage/loot_tables/blocks/black_crafter.json a792eb6ac90ce775052c9c4a1b29bf9551477b5d data/refinedstorage/loot_tables/blocks/black_crafter_manager.json diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index f36e239f50..2ad61692e2 100644 --- a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -1,292 +1,292 @@ -// 1.20.1 2023-11-05T14:19:25.387472745 Recipes -1ccdc8b9da42fbc8d8c954215c76634af2d5254e data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_controller.json -b4936ab0116ecd65cc2ca1f8342b18d9019d9bf4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter.json -6632b2a29739b77ca01b29a33688640d63ba85fb data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter_manager.json -dfb6f96fee39c5ffbf7227302b424752bd96cb4e data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_grid.json -d03caf131a0dcd2942d54c66d10f921df05e149a data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_monitor.json -e49cb73e29615572656fc27c641451f3b2053673 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_detector.json -f9ebe5a81e03ff43985503ca425a575a64493a79 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_disk_manipulator.json -f8781871b25cb6a2e8f6ec42659690a474773f71 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_fluid_grid.json -f8c4ac736579666746b17f8301b60537a9b46833 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_grid.json -f4a26844fd0acceb68bee4b3de6c93dfd4ea9f28 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_receiver.json -50a7274debf31eafdcbf3103a58bbcd2c26ba060 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_transmitter.json -3c5aebd9a874b9c4d3156c38202c036d5b26bec7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_pattern_grid.json -778b87dbf016ca5a7a5fee3ce4526beda7439e23 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_relay.json -f06567303b4c2dee6f6100c260745f5d19dcb4c5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_security_manager.json -d734c8b60a3e35a9716b308706c692e8e983c285 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_wireless_transmitter.json -c755ceedb07b4af47c16126b443bac132d2e05a7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_controller.json -8be6a3c6f40769b0309ad247b243e39656318e79 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter.json -bb53afd105480032415f72f32e1634f5ef40f1a1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter_manager.json -7ade31d5936c05ab150ad9f14fdd21072406b4bc data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_grid.json -d12002c95a061d81f405689b460d64700fbb1b79 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_monitor.json -fa341e9a3e245a475fb9dffb234e3988d678d935 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_detector.json -7ebe98659edaf3d6ba1b285a450936e0fe6281c6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_disk_manipulator.json -87710a24f3a6e7397c6dc5e6222043ae34294956 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_fluid_grid.json -c04170319c90f5eadbb769217455b86654866674 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_grid.json -cc9737501f4382cdee9b1fae84b7b1b9594c2d91 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_receiver.json -7c7d01dadf2904fcdfb6bc5b1285382c92e23c8e data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_transmitter.json -759a4a5e27af0fdf244e86a248e725014af5a290 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_pattern_grid.json -2ebd01490a03143442c2fd66839c159c7cb8376e data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_relay.json -f073ceb7820ba2ea1bc70f4306fd217e686318d0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_security_manager.json -2ae9d5a36534c7e8d899a6ee83ce30b5f0d17c4e data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_wireless_transmitter.json -a962590bd43162299e488cda8128550e73a2abbb data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_controller.json -02db26c014c699618d90dab3fcd6d52cd3e9577b data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter.json -17049baf2ed41b59aa284523f00bfb154fb1c931 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter_manager.json -49fd7d990e90eff0f7537b6ebd5b10fc052f91ca data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_grid.json -08a262b821efbfb765119893e6292c698158a012 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_monitor.json -c4172a9d49c41cc4a8606f6b8e131b49c1e345fe data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_detector.json -83a9b7b5e28b95d00f32f6de0e31703c8908feb7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_disk_manipulator.json -3ad9edf8c93fb28841efc120a9a56600cb898394 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_fluid_grid.json -d164d3c222f46a879c44d42650991b14aa643648 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_grid.json -05564ecbe70a47ed7912a4f3218e9cae49dce528 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_receiver.json -321dbf56bb7d859b5e99e1517c544a9024ec6062 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_transmitter.json -a15d9917fbc85ec8b5185b08c8e263d17fb47092 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_pattern_grid.json -e675eb7b2c6b8d71db400fb1ea149b700b84f705 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_relay.json -f0e88f15d96163c5d9cc2e2817c5b9c499e61c2f data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_security_manager.json -b69d3de671fb3b746849bae11cee180ef79e5e0f data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_wireless_transmitter.json -2a55e44da7ef9b6a549c84a4ff25cd7a3ce7f312 data/refinedstorage/advancements/recipes/misc/coloring_recipes/controller.json -b42a44fb9c0667b93697b22e2eef1e65decfd8a3 data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter.json -2fd383dfa9b7fbce85c9f89e4d8af24197e24fdc data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter_manager.json -85ba23bc44ae70ec8ba527ed63cf8b3427dce466 data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_grid.json -73a18a5e2fcb6e1f744962ac7f7456f4ee6f5077 data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_monitor.json -02d1dbef0efde8ab54edba5f644e429b3649316d data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_controller.json -ba52982be0062793cf98da498a95c6a93b1e9f1c data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter.json -b93f769b6b476e231298aa733c60332ea3d8df46 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter_manager.json -d8a181a34c3731dc1e23b2127bc8857aef71eaa1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_grid.json -5c67bba3d3909b1ce4fdfb08016e59911199cd34 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_monitor.json -2668c3d0ce71dcfc0df44a7e90ea07e0d223126c data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_detector.json -995cb4a15cc7cff1dfe36ca75a47eb499b0d378b data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_disk_manipulator.json -2cddc5ef1e4dd28ac805c39ad1ee8f60f7351ef5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_fluid_grid.json -956abef1471d8013ae15653a41787cb6d3d151ee data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_grid.json -2be09373525ff8093b579540d71511e906d1bc31 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_receiver.json -cabae7c1c3a796fd25e33501f5079e6f4ac8e778 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_transmitter.json -3c2bbca788aa4f868c48cb4847c19c7b31558db2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_pattern_grid.json -5335e91909ff0d30c8bb9b83a9aa4cb4be25f2a1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_relay.json -c17be270ad3761c3c124590db795e89c6fa8d82d data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_security_manager.json -48af43bd8ff92c1796d7d204b51fc734a82b3177 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_wireless_transmitter.json -09e4bdac8cf9419ef4d3f40ae9cf86408dc2840e data/refinedstorage/advancements/recipes/misc/coloring_recipes/detector.json -ab8db3ddaf2f9a753c467cd00de6c588d9305998 data/refinedstorage/advancements/recipes/misc/coloring_recipes/disk_manipulator.json -51aa309ea61ff680d5bf0ec946552ffb5fd5316d data/refinedstorage/advancements/recipes/misc/coloring_recipes/fluid_grid.json -4fd054a312f4eb0a8b3a9bb56be3dbdb6d68c525 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_controller.json -db61afd3745ebc421148c22b434ef8281e915e94 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter.json -9b13889708f6db33997a7ed35ec927805d9e5107 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter_manager.json -54b0b535d8c4d617ca09fd3d861d1ca20bf7fdac data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_grid.json -1a2db04ced6fc1779aa256c52ac70b4ec6cddbc1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_monitor.json -2eca756e6ce9e186a22b34fd4a01f223089e2b95 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_detector.json -59af22598f6675242358b30e227646581d0e873b data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_disk_manipulator.json -78c4724488992e08cb082938fc910ec787afbe66 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_fluid_grid.json -d9fe2664981bdc3e45c64f75403b9b6fed5bedd3 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_grid.json -2fecb3c4e5d8cabd50e87de5fe6bb3c06d563ad1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_receiver.json -ba95b2e29f1533d80473787fbfd3a153a1de0a83 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_transmitter.json -72b99d2987d8b676123f0a3fd5340ab9f7d9c5da data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_pattern_grid.json -189cda08fbefd83bdde9dd4c134c466ecbc9926c data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_relay.json -bab9902be76f2fd373f8dbfd887014d747592ed0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_security_manager.json -90d2b60fa84e4a92c83c64dff5d68fcda6d66806 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_wireless_transmitter.json -699029e1d6b8df56b26268a2ac0ea3f33c8b8603 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_controller.json -7189e507d38ffb3f7464bf73f3c41eccf6464df0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter.json -40afbe52700e25895475941994e0c80a5ca285ef data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter_manager.json -a60727cbee9590245c0d164241e8eba4d58b6a90 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_grid.json -de1fc954196b0d8f2252a5d7dfcadcb8bda764e5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_monitor.json -c3f929ff17599ff9711858e7ec13d88e31836c19 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_detector.json -0316d3e1959064644d0634e210b1cc1e24093c47 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_disk_manipulator.json -634a44a191ed9d6aeafbb8d21829302c4d9ae1f5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_fluid_grid.json -56da4b8e41528e3a464bffec026fd6e9e74e265a data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_grid.json -0b4c0cbcf4ecffe9d3dcd77911e785af7bde7ed5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_receiver.json -36ae0dedb42a509c84ed248f5aedb5080cd90985 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_transmitter.json -77415d3217445c1a0339fe1a9ffdae26306068af data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_pattern_grid.json -dbdb0874c76b51c43946eca003889373d99a7b86 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_relay.json -bdb9efd5b1395d39bae15ac611d5f66d111ac15d data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_security_manager.json -4d2be8248b6e9efd7bd75d2d5f63c1ebb6ecf66d data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_wireless_transmitter.json -af2bc4406c4c60341b5e28bf65f4b2e7c4d0261f data/refinedstorage/advancements/recipes/misc/coloring_recipes/grid.json -b879554557bafdfd39bb57a9ecc6aaa2f2cfe307 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_controller.json -19605f469bf4528dca56858e55b604baf0f2eb39 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter.json -d7c210cf9d044ead0597e44b1d63bb83784e6a49 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter_manager.json -3c715dcc65cfa6de80c96dc550d0aca6d8460576 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_grid.json -444c4e9d072601dde3690d0c639eeeff892f5a99 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_monitor.json -5466e9b0aadc821af73ffdc7520f4f3cfc4421bd data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_detector.json -d770a4a3a3527dcd3cc909a3d17e7d81f3424429 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_disk_manipulator.json -604bf9ad3df20ee4f711e8f75130923a0e0a2b8b data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_fluid_grid.json -ca9685f1f9ad32b1f924fd135d2178e9be40bb32 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_grid.json -56823e07a537aadd9bd095d762dae28444afea19 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_receiver.json -36d5f0a9dc4e4961b03c7c930a35f1cecf5749f9 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_transmitter.json -804d06426c69215198c3b4948a87cb3e5912111e data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_pattern_grid.json -6add2b426e5491325152008443bad863fc04daef data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_relay.json -9bb39b418c11dc655b4b3cd516ee31b19d006fe7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_security_manager.json -c5897bb4707fbc6eaa48477fd5c59573f22fa9dd data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_wireless_transmitter.json -e490273ac7208440555bb7333e7ab24cc8cc9d80 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_controller.json -0614163b7b7655d414774c030ada737696f9c93b data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter.json -70deeabbf468d7f165ae5254f55b039bad8585dd data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter_manager.json -f2cbd6430988083a89b8c0f536cb19c70990a23f data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_grid.json -e910857dafcc27a411d3edb2a2167ffa0d8681b9 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_monitor.json -0361396d80fee4c9db88c50af70e9b04f9ae4cb6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_detector.json -9d73c4275266e65b17be19d1717f0451e0d2c949 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_disk_manipulator.json -3477ac09d2e3301f5deb58c883a06489f983f429 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_fluid_grid.json -8a4e1988875db560e6e5a6b481c7fc2e41b893ab data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_grid.json -cf79f45bbaf41497f5c12efdf0e55ba02a512023 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_receiver.json -fa1f79c714853119c3a7cda05bccf73ec86d0f20 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_transmitter.json -a39b9c44b438f03f809ebe3d8dda726197a5acce data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_pattern_grid.json -c4a94e9ece99c55662d029cb53438cec0ef7c420 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_relay.json -54c6bb830d659fa05f810d09ed3ddda1d6b66e98 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_security_manager.json -3470866b7f96df1fcbdc93078eafa4d6d27e988a data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_wireless_transmitter.json -c4d64ce24647bf739038ce0c3b457a0f836a185d data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_controller.json -97953ad5365a9155272cd4ea068c11d43b2b26d9 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter.json -5719b301c1503b26e3525601f930fc61b1912e0a data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter_manager.json -9706d3b8f740ee711628c48b663b8e3cc777daf5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_grid.json -4f13977b66a44c09644bdbe006e9dcfb3de72a47 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_monitor.json -a8a2b92d1a5e234baddc3ea6314f38bb46c780f6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_detector.json -03ca6efc1693208521a8d3c1209aed51745a1615 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_disk_manipulator.json -2eae278a2f561ca5959847a936eb74ae4785d6e8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_fluid_grid.json -a8243c9dc90661e5416471ff245dc412fc820747 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_grid.json -88ed49b3609565b5b6ecfd0709657603b6edddbe data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_receiver.json -3493050d89f527a02693c41af5865588da5e270d data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_transmitter.json -dbc7081a31195a49a23647059d6bcd8581dec29f data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_pattern_grid.json -be24bae310b62f6546762f520821905b30d8631e data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_relay.json -f308b488e9e71af8b23e244f0714eac5396b6cf1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_security_manager.json -e022cab4e77209c243944f557a526ac916ca08a0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_wireless_transmitter.json -52b4b5375c0324d2d8a40f9357b68c87f79df04a data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_receiver.json -862382143572c47cf50bc8bbccb4541f0b817f7a data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_transmitter.json -df24602e1c1c5d3d91fb46597ba799f204bac9ea data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_controller.json -d4618b2cdb01659cbe2b3031190e623e81dcf22e data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter.json -25e94414f3c14fbdd7180184a7d6aa365ea8464f data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter_manager.json -bdc0a38ca44158d5f8c817b3fe30e1ad9daa5158 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_grid.json -f3b377b67d7f1f8bdd656e587d226ff7a36e4d7e data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_monitor.json -0021989425af1537ec0ef53e2a525ab9c9b94f02 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_detector.json -576e3d0f691966df6766df9a32588ed2ba208396 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_disk_manipulator.json -29bd7853448c0c2fc0a049264bed1ea805737002 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_fluid_grid.json -081e3672fe8aa54a1946eb59b81ca8902448affd data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_grid.json -54c02681bd4ffd2e2fb3c68650d8a9e4f417308c data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_receiver.json -3cdd104d17d05d0fede9542f64d427a18658d40b data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_transmitter.json -7a0a1f51e073ca6484579511972204a8ab76969b data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_pattern_grid.json -e91db73dfe9ad4b78d91b689f82d1b3c233d7cc5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_relay.json -9445173b11608182944ea45123f27391a8294b8a data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_security_manager.json -88d61e9428e53267f7edd048e08fdd658cac9131 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_wireless_transmitter.json -f684cb1751a6b036a66136b61b2a5fb24406ab30 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pattern_grid.json -617817f73fdc6d5e72bde4ba2e5f08f7b286d7c1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_controller.json -e03f4775054d6497f51cca12ee0476e2b4f5c34d data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter.json -a2acc3ed31696c0d61f306adc7545a0d03f24078 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter_manager.json -3f2ad02fbc5330ae4927db57185b42967f09c3d6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_grid.json -bd7fc663ca4208b36c1666dc62b0a45ee96ba7ac data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_monitor.json -d98c7510828fc1b6c3c8612d418fb108200f2ed0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_detector.json -ecb2320154336f33491cf130a930580ffc9b7323 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_disk_manipulator.json -e442045d3d4e66789d5dccaa3b285fbef7cfa33a data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_fluid_grid.json -f3a231743120b2810984af017a299c41e4e00dfb data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_grid.json -908754201a278d836911d60d3d02f6f727442367 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_receiver.json -ec34f0708c2652a3cd6d77b6cd01f217fc6c4940 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_transmitter.json -232e7e5ce602dd5f1006800dfce32c3687aae425 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_pattern_grid.json -a16db207cb78778a363725424383c60bfb49db8e data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_relay.json -1d3856b4b21618211dd0d1083ad75b0a90a59c8f data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_security_manager.json -16bb828d0a348eaf5cffd9975ffd22b5274d473b data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_wireless_transmitter.json -4eb43764eff9d1b06bbf4485b7489021e337dc2b data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_controller.json -bd921dc82b484cd6d3cf76ce05d063fa6e740093 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter.json -5819d28c054ec6dbab0e84302e12a5b7978d7e00 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter_manager.json -9a1a926064acda161def7c59ea6885e01df09ca4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_grid.json -160e81d20baaee77c90a87c496213b52cbfdb7b8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_monitor.json -126b4e2197e57df8c1c4716af163108b4275d0e6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_detector.json -c5e54d4c7865581a72f291a6b3d04402ae8e5d78 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_disk_manipulator.json -904e836e3626651fd7420b2f67c221112b30c377 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_fluid_grid.json -029c065a27503cecc81d303a45af23b1a7daf787 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_grid.json -d602d4ac45eddc124cd79fc141a55b5f0f144d1c data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_receiver.json -fecaf6a5c5449164c9225d913ee53807cf81edc4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_transmitter.json -2db942785bbce5ec8c07c664dafb5f7e8bbe369e data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_pattern_grid.json -3d8131ea7f8988f8c27ba74706a511d78237d2a6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_relay.json -c54a211d3531658c6ba9bd0eb90aaa48ca51e443 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_security_manager.json -cf0e7d9373c3f430235947b6d224702245cdba08 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_wireless_transmitter.json -66b08a96e305d24c56353bba057a008c58e9e48f data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_controller.json -35fba66c17086789574d8d62d8c8c18f588664c1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter.json -4f6b19c1321488f3336493d5c5ffe8a0d0315650 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter_manager.json -600e0dfb0e9c017057513f6e0b78d4d2a7a1c3c8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_grid.json -734703b80957a93b0066a9e682dae219284a697d data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_monitor.json -f52a36f19ec0345c48913dfd73415e9fc1636c8c data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_detector.json -a9ef187ded9964021b101abab322540c5d83070f data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_disk_manipulator.json -05302283273bcc5e51a4987ae471ea2311d3039a data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_fluid_grid.json -b54d0ec218296a963e630b4555385cf9add9260f data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_grid.json -d9bd8f7831d1d4d182044fa9dbf3f12610d565be data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_receiver.json -03c625999d65e0566343d1aea36bc8b695564b7c data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_transmitter.json -81d67e0a1de3c6c3b31aee2f3b00a198a5bada7c data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_pattern_grid.json -1190663774ffe5073bcbef474514968129aa10f8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_relay.json -a090e13eaa23db5bd8d32ee503eca0041ec7361a data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_security_manager.json -807746a3f4e939d20b7135f0148dc633364e9b3d data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_wireless_transmitter.json -75974f2c006691bef16f8efe2a6d63274a9d78fe data/refinedstorage/advancements/recipes/misc/coloring_recipes/relay.json -5d0c3266f6cdb465a5c19c552ac5fba4c7cde68a data/refinedstorage/advancements/recipes/misc/coloring_recipes/security_manager.json -7e559b0cb8a411c0edba159b642bc731a9f2f38f data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_controller.json -a4c4968ca66146409eff18594cdbfef2aec3699d data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter.json -6300765005ed782bd98e6bd1830745132e910c85 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter_manager.json -079b9e4c700caf048c40bf183ac3016c632345ec data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_grid.json -7a5ef65d5ea2a4e7caf1458837c83d7e469b4883 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_monitor.json -3d387cec08633612e8d8cadf7a0eacab1dd10303 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_detector.json -8f7db0273cd114ad9106ec8d4475089a964a2e08 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_disk_manipulator.json -fd314e1043ed70a9096fcea2a4d4e8ac7e72441b data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_fluid_grid.json -6b40be8890f069f45b5b19f063c430cd65e0f858 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_grid.json -38eae4009978b81bc6fec1507f2bcd6f4ca5b46a data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_receiver.json -c13bbe7e47941e94a5a5ae2091d33bb8aed8f2fe data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_transmitter.json -8653e6982c7c3a64427f2ccec2afaefa53f7de43 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_pattern_grid.json -5bab7e83a3bd425758f3a8c239f63961bd3ac949 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_relay.json -b3be48c1b1e587efc0e0f512dcce48ff1e5116dd data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_security_manager.json -7234d5f762c86442ddee18d705a119c13573f79b data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_wireless_transmitter.json -f59a4e2908dbb825bdcef3208263e3df48df760b data/refinedstorage/advancements/recipes/misc/coloring_recipes/wireless_transmitter.json -2fcddbf4c50c7f52d91b008d0866c566bedca3bc data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_controller.json -0fa365d5a96bf9f0f3d1b6a776fc35ed3b0893cd data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter.json -475c68795098be03f5a404dfd5e261a93a69f123 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter_manager.json -95118ff17f8dfdbd672475050f2ea5319e9208fc data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_grid.json -f0e12984a37434c19d9b65701ecf5804b1f963c7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_monitor.json -0816417040e1a4919d20db8c3f99d8ddd77710f7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_detector.json -eae49d7931f88dbf52b9b6402cfee5c46a7d4cc6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_disk_manipulator.json -ae5ebdb3b556b67e0175cba8d9daa15d2e164db6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_fluid_grid.json -24176fe9e4d3fb783ba39b69a2c20e8b8e7f99e1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_grid.json -3ca0bdd3d90dca9b7581446c72d37add6b9f13c2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_receiver.json -c4b2a8bbf30835842836aa9887fa56c82b2e807f data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_transmitter.json -3a813110425a79a68c5ef0f60752b1ca0ff7ef55 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_pattern_grid.json -098d4e5a83437f6d0e5d3745dfbd7f54e0be6294 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_relay.json -0e8fb2bd4a6dbba7d9673cbbd9747f917d983d9b data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_security_manager.json -247094b5916ba8f2e77ca1c1329ae18446ae6823 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_wireless_transmitter.json -c278e82a523f0bde1dc7e962acf28e026c6914a4 data/refinedstorage/advancements/recipes/misc/crafting_grid/black_crafting_grid.json -cba2456ea48766262a52530c56117c02af77b4c3 data/refinedstorage/advancements/recipes/misc/crafting_grid/blue_crafting_grid.json -7240a29ca09be1128603f29e7baa8e663010c261 data/refinedstorage/advancements/recipes/misc/crafting_grid/brown_crafting_grid.json -37cd10fc6c848954777919cdf3eb5b2ff8032c28 data/refinedstorage/advancements/recipes/misc/crafting_grid/crafting_grid.json -cba30f93946a4032b3565a95d4b55c1a2efd0080 data/refinedstorage/advancements/recipes/misc/crafting_grid/cyan_crafting_grid.json -92005a46776d1cd4bb0b0ccd63682c6cee9e8039 data/refinedstorage/advancements/recipes/misc/crafting_grid/gray_crafting_grid.json -f08f02320eb125413d070f7a6540dad9c2349806 data/refinedstorage/advancements/recipes/misc/crafting_grid/green_crafting_grid.json -8d08b717a5cb964344555acf3f20440b8f83bae5 data/refinedstorage/advancements/recipes/misc/crafting_grid/light_gray_crafting_grid.json -2f520f3301dc223607645e87a504757f30942701 data/refinedstorage/advancements/recipes/misc/crafting_grid/lime_crafting_grid.json -ab8065e18037b2edd54b30f1eb756750e3909e93 data/refinedstorage/advancements/recipes/misc/crafting_grid/magenta_crafting_grid.json -dce8d97b2c11f963955fc20ebabc5f91bc7eede8 data/refinedstorage/advancements/recipes/misc/crafting_grid/orange_crafting_grid.json -1ffc1d3dc31e4ebce2f6a91daa1f5e8efb03bfa9 data/refinedstorage/advancements/recipes/misc/crafting_grid/pink_crafting_grid.json -d16aafd0145f791eb7866af313c3750553a99923 data/refinedstorage/advancements/recipes/misc/crafting_grid/purple_crafting_grid.json -9fd78da8cd719cf5ea0d10e07c792d4f622a2348 data/refinedstorage/advancements/recipes/misc/crafting_grid/red_crafting_grid.json -38170e3578eacbf40af3328ab4f83f48aa5cbf8b data/refinedstorage/advancements/recipes/misc/crafting_grid/white_crafting_grid.json -13451b84c28e54f613acbb6dc4b05645feeecd6a data/refinedstorage/advancements/recipes/misc/crafting_grid/yellow_crafting_grid.json -d8f038336881dbbcb8dbc40c2ebb1cdb5e6451e9 data/refinedstorage/advancements/recipes/misc/fluid_grid/black_fluid_grid.json -6839dd7c6ba57cbb403cf6e514c2e11b3dc1fb7c data/refinedstorage/advancements/recipes/misc/fluid_grid/blue_fluid_grid.json -2b464c95d08a3a0090d6c3806b9d012b6d0cfa18 data/refinedstorage/advancements/recipes/misc/fluid_grid/brown_fluid_grid.json -89eb673877c24960ca7621cf591b2b9327e55545 data/refinedstorage/advancements/recipes/misc/fluid_grid/cyan_fluid_grid.json -c95223c8e79e76488b4f4f580655d751c5de1394 data/refinedstorage/advancements/recipes/misc/fluid_grid/fluid_grid.json -82171367532f884c939a16172fac036775ecf938 data/refinedstorage/advancements/recipes/misc/fluid_grid/gray_fluid_grid.json -59e1f7d684ed762a4eb01f70aa9c9f10cd889579 data/refinedstorage/advancements/recipes/misc/fluid_grid/green_fluid_grid.json -3adffdc0ea1601e4f291e7aa12ee1f4be8a945ca data/refinedstorage/advancements/recipes/misc/fluid_grid/light_gray_fluid_grid.json -bfd57337bb7815c010fefcf181349f5d4002c48e data/refinedstorage/advancements/recipes/misc/fluid_grid/lime_fluid_grid.json -1c56b7fa8747564b7c0ef894d50f1991ee48538a data/refinedstorage/advancements/recipes/misc/fluid_grid/magenta_fluid_grid.json -73b0f5a2a02d8ec4903df6f04a8ef2e498298315 data/refinedstorage/advancements/recipes/misc/fluid_grid/orange_fluid_grid.json -3663e13f857557edb6b55e47abb125d90be4623c data/refinedstorage/advancements/recipes/misc/fluid_grid/pink_fluid_grid.json -f262028ad077f74030bd4edfbbe3b78a427f7d5f data/refinedstorage/advancements/recipes/misc/fluid_grid/purple_fluid_grid.json -a69a13878382bd9f7c18819fe673e9e2ebbe79b3 data/refinedstorage/advancements/recipes/misc/fluid_grid/red_fluid_grid.json -3610edeaf6f345fd26f29bbfe7792ef2fd730e49 data/refinedstorage/advancements/recipes/misc/fluid_grid/white_fluid_grid.json -955db7cb08d1c76c0d73fbf1afb5bdd4d5eb9b70 data/refinedstorage/advancements/recipes/misc/fluid_grid/yellow_fluid_grid.json -d828b990c35bb65bbc98cfd8b17e54dd7004bcdb data/refinedstorage/advancements/recipes/misc/pattern_grid/black_pattern_grid.json -cac073d4400a67e258679dde739edcc93fc17bb0 data/refinedstorage/advancements/recipes/misc/pattern_grid/blue_pattern_grid.json -6b03eb2affdf19243411630f5ba215fa96302982 data/refinedstorage/advancements/recipes/misc/pattern_grid/brown_pattern_grid.json -4e8f2fcf76069e9ad40c6391da05724290b22485 data/refinedstorage/advancements/recipes/misc/pattern_grid/cyan_pattern_grid.json -0348c20cd109493000abae61f69a4271126bc743 data/refinedstorage/advancements/recipes/misc/pattern_grid/gray_pattern_grid.json -911af972906ac33b035be5c08718e34578b3bfa7 data/refinedstorage/advancements/recipes/misc/pattern_grid/green_pattern_grid.json -ec5acdaf46cf7f941c1b9dac5c611e394558e103 data/refinedstorage/advancements/recipes/misc/pattern_grid/light_gray_pattern_grid.json -6a612c8ba02289414f0adb5ab1e10d6e264ba51c data/refinedstorage/advancements/recipes/misc/pattern_grid/lime_pattern_grid.json -45b2f9d529c1837cac47c9a8c6b14bc8751e2d56 data/refinedstorage/advancements/recipes/misc/pattern_grid/magenta_pattern_grid.json -6b9ff2c5785e403b9404aed9cbaa30e65154f6b7 data/refinedstorage/advancements/recipes/misc/pattern_grid/orange_pattern_grid.json -2ea839bcfc17011a62f43291be4a73be4251deb9 data/refinedstorage/advancements/recipes/misc/pattern_grid/pattern_grid.json -84ab4c4711dc5b2ac41091efa36bd3e7528915a8 data/refinedstorage/advancements/recipes/misc/pattern_grid/pink_pattern_grid.json -4d2b2422136aaa5b353088648cd5717ee85e608e data/refinedstorage/advancements/recipes/misc/pattern_grid/purple_pattern_grid.json -c09b30d89b1cffa81abd224f5249f520ced536b9 data/refinedstorage/advancements/recipes/misc/pattern_grid/red_pattern_grid.json -7d0da920f6891ec150ab41ac1cb165d40be1bb40 data/refinedstorage/advancements/recipes/misc/pattern_grid/white_pattern_grid.json -4d80986fe46f228e235c020ea19ebee019e10e41 data/refinedstorage/advancements/recipes/misc/pattern_grid/yellow_pattern_grid.json +// 1.20.4 2024-02-12T20:34:18.538076766 Recipes +d350b2771bd4ad63c80d048da51e610005d6daca data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_controller.json +54840c4b526d0652d376bc75f06930142b6ee47e data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter.json +23b7a5b786b618c8061202dba92bf6751510b15b data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter_manager.json +b15e62f2c4fe216e157e898b53c0465d4f173a84 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_grid.json +97005bdb24b1113ec6b6d89749122d223dfa9356 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_monitor.json +55622084b126567c34634c919496ad17b9bf90f2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_detector.json +fcf26564563a2e04e74f411d4d7bf7f3f459e193 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_disk_manipulator.json +d7bef08a9c37f96bd17943d97489ff4b758f0608 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_fluid_grid.json +2b443003f3344edf2b0d7822868a6cc8fcd16089 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_grid.json +43455ac450834a527402617e5e57a4017ebf0316 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_receiver.json +f51c17ad3c15121e2ecac366ee763cd448b3c4bf data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_transmitter.json +30fc6bc4416522b5478ec7f45fda0444cf677b05 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_pattern_grid.json +c4f162dee00f9d2f0c3d067c6c392873432bc20f data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_relay.json +9dcbbdb26e0c2e2a5365c65e86d5975c233d7cbf data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_security_manager.json +529c5dd81a44add1cdad7fe4535f379532fc68b5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_wireless_transmitter.json +d26368b812c74eef2c0cd62398d00b749dbeab32 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_controller.json +444ae3b86d615aae2c496cd8a4ea4b5ad72d265f data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter.json +b35122d76b4bb806a71934b073749208072acc25 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter_manager.json +db19bc28ee75d480ce92a6fc8378c4050cee63c1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_grid.json +62f2936fba8519e449a2025bcfc2ef0a34586b79 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_monitor.json +a2eb10818ed380108e7baed01fc01fb29958cee6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_detector.json +c9ee2feb3892a37a097d2ed726913138ca2ddcde data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_disk_manipulator.json +e42c45ebfda407bc8a63b6707736f1d9fc5d0ba7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_fluid_grid.json +aba1df8aef34cd1d4c65784f1b85735b716167db data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_grid.json +399944bc9e7249d69b21dc76cc6efb43e60746d1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_receiver.json +9552d403b622ceffaa8adbb67c1ccdd994c5761c data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_transmitter.json +f1ae7f1ceb705970b9f3b6069d09d23a14c3ea83 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_pattern_grid.json +11777e4d00ad8cd996669a38771bd6107cf9e218 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_relay.json +558e83123713433b9218a73e5d73fb77319955ea data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_security_manager.json +8bd0fd506e240f8f52722203d3ef0b2e991eb7c2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_wireless_transmitter.json +f331f32959b42fd8ec8b029f6280db5ccd3cb2b1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_controller.json +fd01b544422d143849c67deda5ca42837c1ca398 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter.json +54ca4eb21f728930d7ec85f0c71751098df068e0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter_manager.json +0abe0f9c101ef02e32e5bd156788019fb84b9033 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_grid.json +defa0fd4df43b104b12ddbe58fe4143388a1fb37 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_monitor.json +2286d49a53f5e9e9950f7b3493bc36d21b8156f0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_detector.json +d1c01332b1d6d71471307d8ed317b7e4af5faa8a data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_disk_manipulator.json +326b68bbffd81f01702f92cccf2f2cc30b905c40 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_fluid_grid.json +efef6095e9e358abedd58e5a30aebfa730b61b93 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_grid.json +82cf9f104a4f196a41a4623c4374e948ac790231 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_receiver.json +58255d690b0900e394de5db9d5bfcce218121398 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_transmitter.json +4aaa821eab15d6e1797db5e11c1b1aedd1531c57 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_pattern_grid.json +45a34a412a792f74b6a2a1110343879329a888eb data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_relay.json +17292d3a1960cf27224ff3be2f0d489c994616b0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_security_manager.json +120cea1d066a276ead272fd65f6c87d67a4c51a9 data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_wireless_transmitter.json +ec1f6d949021b377481cc85f3c467ce0a22773de data/refinedstorage/advancements/recipes/misc/coloring_recipes/controller.json +f308296bcfd82dbe8ec0b16fd8676695b5507b05 data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter.json +c2799d9f2a96b93ae0a5a44a3ca19f8b3d118829 data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter_manager.json +08fa572f80f7950cd44f45226e6674277d6302c1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_grid.json +d04b75de8d7beed6a9fb4b95c76fb2e7372879d2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_monitor.json +7279fc15ca132eed3ec3b98d8d8b4000a8b946e0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_controller.json +81d170036872e1aa35773cfe1a54e9ae25e3c8bd data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter.json +22d75217a257c2bfde3faa9042016391fdd1a881 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter_manager.json +0c1d56d7620d98e018103bb8bd6a1ac4a6ba8f8a data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_grid.json +a049e2fa95f344d566a3b4e9a8bb723f361d3b22 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_monitor.json +46e2401b27b24f2daa3f92be57bd0917efc1cd17 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_detector.json +69361419882d5b0beb1e2c97dca3fb5333e96006 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_disk_manipulator.json +38e3aba8366c111c322c25f33afd1e05db0495cd data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_fluid_grid.json +4df118e5e0a7f3d44b13c29b6e17fdc74375e4f3 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_grid.json +fd921c19c96c88f248cb72066bcdaef5244d0e29 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_receiver.json +78b6a92c183db89ec7ed784752821da4663c53f5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_transmitter.json +e41899b7a205cc933ddbae98de06b2eb56d7fc61 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_pattern_grid.json +dac4aa9f73456bfa0d589a997980f7cccbca01f9 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_relay.json +e29e96cf471a1f3751358cb4847fa34e95d02ca5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_security_manager.json +cb4c05ab919c0bc0a83def453f74e6f783b9dff5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_wireless_transmitter.json +d55193c421a69c24dd64d98ac3154a433a537325 data/refinedstorage/advancements/recipes/misc/coloring_recipes/detector.json +3e89a210043d9e41dd2165f0e73548e1884c2232 data/refinedstorage/advancements/recipes/misc/coloring_recipes/disk_manipulator.json +81d30c747d62a729c195c55435283dbf9ec3ccc6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/fluid_grid.json +e8cf20a95b3bf091612098b3c516a5189b8d6799 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_controller.json +e77cdb0c96a755fab508295cbc021a4198a73a32 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter.json +8655e0374baeecefd17e45b8b3bdd500d898497f data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter_manager.json +29049edb4edc8f183401d42fe90e56e796b9f524 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_grid.json +74feb00efdaa6bdec68d6d98fbdfe20d66f89178 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_monitor.json +2361ea074be45b6d5bc156d92765cfe95d005927 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_detector.json +80a4d154d21b70a184eac395a5a7b72d209de429 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_disk_manipulator.json +a25f5655c5b77acadc21f13bb6386738d5bfbbd2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_fluid_grid.json +b0e993da2cae346c1314ede633f8e01b88000a9c data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_grid.json +b47265fad6beae6b7e8902c8b8711b8c4b1c3f67 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_receiver.json +8c1027dfd8d0f024c4cff7888a06f4bf28ff2ceb data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_transmitter.json +2b14eef6f0640ef29b10b0496b3b2e03a8401efb data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_pattern_grid.json +b9ba15b383fc750bd8f51fbe757ac398be229979 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_relay.json +ba0ff95eb1d047d4045d27cd67ed2b74e1faade2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_security_manager.json +93194bde577130f3aafd15968ccef34fdcaa0994 data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_wireless_transmitter.json +5b494d4de2d8e760868080a3a47e6d9ffa6d2d97 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_controller.json +23166b7d06c90415a904b874ecec4ef3b76d376b data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter.json +bb271c810fd9010232efca4a44faad9d4a9cd90c data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter_manager.json +081abe762fb4198d49a0baf0858b5d2fe37a1595 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_grid.json +fa2567877f0fb5bb02a5831ee137aa66ac47dfe4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_monitor.json +0e6a77a42153aa2bba05e96c5c553114c4c718b1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_detector.json +43321a147268c573478497f2aaf5e26baa044859 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_disk_manipulator.json +e08307b008e993464bfa52815a2673fc057c6d49 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_fluid_grid.json +504bb9ddda37a8ef76c7765de0f2a2e24f7b0171 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_grid.json +5d72547ae9d1d014cd8f922dc045eafac843698e data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_receiver.json +ff769707888be7b3d0233f664ba7129f37c9f5bc data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_transmitter.json +ce4880ad86cacb787dfb3c20eab27c01b0a7f3f1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_pattern_grid.json +1b5141b4908766b25af9b1d4a2cf5018957f25d7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_relay.json +33854d93ce3dc17717ad234d3dc875a69841c9ad data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_security_manager.json +7008d4ec46c9c0995e603648d347438232749296 data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_wireless_transmitter.json +bf27477c47f4f5af6b5a8adc4e177fdf5794afcd data/refinedstorage/advancements/recipes/misc/coloring_recipes/grid.json +3541bc5c522700de1004183d7dbeb9721749f99d data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_controller.json +c4c71c447d0170c3ff20d777fe7983d9bcc799bc data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter.json +702b34d1c0dbec4956f82a622d95f581135a5cc1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter_manager.json +5926515e95f7faa6e81bdb539f1da4b7922bdc22 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_grid.json +7113c0865a37a843238c0bd618656575f5b8613e data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_monitor.json +d9de193424b692af7724bfa428dde79463c94083 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_detector.json +beaa78d1ca605357c665cb6c077a1aa1695eb2c7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_disk_manipulator.json +0d62c18cd86e523a197e84ffe15fdb2fe6444668 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_fluid_grid.json +4a92ca1f1cb915269db078ed1bd14d90b024a7a0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_grid.json +212af37ca0be812f405238fe913bcdc33fdee9a5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_receiver.json +e6a7aed89254fcaaf24eb42897e6d853fa9cbbdc data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_transmitter.json +9afae748bf4f8539db59bdfe6bc77ca7d1f94a8e data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_pattern_grid.json +a83096cbd33db7938aaf28cfadedcc6227d1dfab data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_relay.json +196951d09482eba275eea65407da6f3f9ef659a2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_security_manager.json +6862bcabca8ac284dec0ca21113d2a47fe2a25c4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_wireless_transmitter.json +8920ad0af9501e05ae67a18c185422ea3f2d494f data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_controller.json +4f744de464eeab733def439030ec568704dbdfc5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter.json +704dc694a1392918c9df6f1bcb711cae74d09bf7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter_manager.json +65f7d805a7fa684271d1232f532886c31caf08b8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_grid.json +b665f849378bcded92f27612b5ee4714a2bdb3c8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_monitor.json +1d2b1bde350c014d31a47e2acd64344aaf39f006 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_detector.json +a2fc75ed0e55da1a09b5e4f7d0d3d1f932b20296 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_disk_manipulator.json +6e48a78e9a261f218bcc530f4f2f9bf8d1f5b7b0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_fluid_grid.json +382df921efdc89d06e6570d96456200893701847 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_grid.json +0e2f9c833b32dbbb9cc994d5331e201f646e2260 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_receiver.json +340e02a24ca341d029fe6eb0edf54527456b6fca data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_transmitter.json +7ae8303f3b8d083ac253629732fe5843d98a46ef data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_pattern_grid.json +a9d8202520a2eeb40036b4f08b2906a235b26c7e data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_relay.json +d76d10c59fdf4c3faf6736f788d88eeb1c361fb3 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_security_manager.json +b7468157902e6a9f332b038e0b6a104243ed3824 data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_wireless_transmitter.json +d5e5099a140396ad770fc1e080b06ae58e5bab53 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_controller.json +0d738a1bcb7f70d0c8a2fb8ddc58106cf1f1af56 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter.json +e71700d2067eda969cff274b75fa06abe55e5456 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter_manager.json +8cdad9ed6a81ae38b39ff89e3c8b8a3162591ec4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_grid.json +e889eb8c665ecde9fd814aeae186c33fa9fe774c data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_monitor.json +ed8f2c1dfbb3efdaf9a17abd528ddc4fa9c4351b data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_detector.json +a1eaf5560aa797a920c6d859e1da12f26df70ba0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_disk_manipulator.json +9337dd604b42c894ec795ea4d933494eb6cd3ffa data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_fluid_grid.json +3b5787043fdf9470c94c55a1ec4e2332ec7e92f8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_grid.json +f47530ed35d85cff56678f2848f508e16d5d754e data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_receiver.json +75c0c87f36745c83d7d7afe95ace7fab776bf049 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_transmitter.json +6480e36774a962568474a4ebace57436f841d105 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_pattern_grid.json +e637d70e432940ff585c3bff26e9883ab61243c8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_relay.json +cfe2c6806954fa84c96a886883617ade1920cba4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_security_manager.json +27590375ef521bd3dac015c46483e8a14e6d518a data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_wireless_transmitter.json +edf871954047dc82a5baa504f093c8bd95bc9e4f data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_receiver.json +ff22d01d0549186d21c65245d7a8647cb3e8d831 data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_transmitter.json +7a1e7c7acf6c5e517a825c416354b1c52993e8e8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_controller.json +146baa694f6912ec9b34d0f9f0c94fb49b7a66c6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter.json +b53f5da5a6745f0ab4479284a5b238e52d23af31 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter_manager.json +c6a0b5ad7a2701caa7f185b2445730d8de2d8231 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_grid.json +77ab4c02e39cf139fa110a5543e6c4121d095959 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_monitor.json +5464c441ae2378ff8cf655bf092698e8e5cc6698 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_detector.json +6212064e3078df7b4b2f0eaf2c66b2351afb8d75 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_disk_manipulator.json +9fa3953437f41825a1a94cfd8b26ad0deba512c4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_fluid_grid.json +3da19d71780bb0dd8b598680f0f6cdf51d095a5b data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_grid.json +e8c6ea5c6321cb3f0c0818a7f20bb34dd19d6b8b data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_receiver.json +599372e90c5525ba6965d85bad3dc598684cbce8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_transmitter.json +c89d2ab0fc65018f61c6e0db371d1b91fa0dc304 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_pattern_grid.json +acc414b2be65c1bd89fb1236627d418eb3359095 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_relay.json +50b1bbd95f32b7f79fca433d06c7cf9d312ff635 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_security_manager.json +c6e2ba623ce6e0ecc93357415ed1c33190cc9416 data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_wireless_transmitter.json +1bfff6f3c7fef860a7813bb3f6196605b47de77b data/refinedstorage/advancements/recipes/misc/coloring_recipes/pattern_grid.json +230c5ac17bd397b63dd54c22a6b1f4d5abb1f6c2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_controller.json +64ae49fdeadba8df9bc5cfc01aaf84c757265fa1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter.json +d49b9aa96ca0b53f42f13c133141c903608ca66e data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter_manager.json +787fb6d515ef4e04abe1ef518634b93d862642ae data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_grid.json +1920557334d4fa98a37d154f4bc8ddc242d3c278 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_monitor.json +13223e633b19fdaaaded08f0a645b352cc2ad754 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_detector.json +13f2066a6766b5eb76eaeb9b8c2b443ae8ceabde data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_disk_manipulator.json +b6531737768efdf4fd516609f5b7e26c3c626995 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_fluid_grid.json +3102d2be9e0ebbbfbf433b6758fb26cd538f8f3a data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_grid.json +13a94375a8af3ef1752f87fe175a4004b1f222ed data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_receiver.json +3c60279b49941739ee15d5ec8300e0509afca26d data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_transmitter.json +d3839fb0c7a92432e930bc3a9a45dc4b93afddf0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_pattern_grid.json +0b690f7621a8a70fe15da08d0c5b4353f132a510 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_relay.json +96915b3461232a2b27887fdbba7752c8dc14d532 data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_security_manager.json +7c308ed13a18f4ce573e1d335ace88f8785fbfdb data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_wireless_transmitter.json +8c81dd70017507b21aa84af1d133c5bb9e0354b1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_controller.json +b70a31b425cd286d3e5852c67c35b3c5cc8f1204 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter.json +a63197c094c15d3d07f6dadcedc5cd5cacbcc6d6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter_manager.json +38928bc5a96a0b17e98957e5fdaa09315ecea8fe data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_grid.json +239fb41ac609b312e47800ab6b244ad2ec011694 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_monitor.json +4088a819616dc7de931babe577ab852184335f5b data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_detector.json +19084ac15e80de9255f57ec6f50efe9f287ad47e data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_disk_manipulator.json +6e020575b9eeef96eb31cec01440853d292a78b3 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_fluid_grid.json +ab76e99e048aa7a507bc2ee71238195f42df1f52 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_grid.json +b551e2e756475c031a49169b8cdb7bb1478d5690 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_receiver.json +faa57612200a9f95fb0c03bbd00bf3ba07971b10 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_transmitter.json +1b362ecad4b8c539f36bfc93055f0c3396ffbaea data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_pattern_grid.json +2c6093b322f2836d4902537d90fae35df6b2785c data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_relay.json +cab4f5742b5bbebd870dc64f4617ac1023b02b2b data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_security_manager.json +b3778f099b387d2fa457070572b2b55931c8ee73 data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_wireless_transmitter.json +2c7559a6e8746c6f4b47c006a70b165d181b8c80 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_controller.json +78a4b901f4a3c0a186bbcbe9881bbf9fe0fa4da2 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter.json +a5dd747b9b93ea4393fcf401768d1cf521595983 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter_manager.json +584abaeac9f96f87185a65cb221dd5dc94f2e67f data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_grid.json +dcb775ecd844a7c9e30d501bef8caa0fc09f5b07 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_monitor.json +fb6ae6665e14807c2690f71504c9b26da92142ae data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_detector.json +f40b82c9a1bed8dba73353dd8d6104c2744bf5e5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_disk_manipulator.json +577f50cc70ed05e6bb5c1f88cd4f36e6ffdc38a3 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_fluid_grid.json +0b295fa3bdc3a126cfb16cdab106eeef65f88077 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_grid.json +1587e589c213f567966fdc5c3009771e51cc83d0 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_receiver.json +ed6cf3e3917a03bf1d7d3305297e3d3a5f16f47c data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_transmitter.json +ca1ca09f9ea4351c754030e3ca05f7f3a4b45e93 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_pattern_grid.json +f5716311b802fd0dbf1c5e56fe7c6936fc35d1fe data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_relay.json +1472f516a95d9e6a7c698acc741c439383eefcbe data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_security_manager.json +83a709b3f2b2d077ece8315b4cd0d414b4d03706 data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_wireless_transmitter.json +193f0653ac14aead77cd82b381bf005527cf710d data/refinedstorage/advancements/recipes/misc/coloring_recipes/relay.json +fcb727e6a921c3005c42965f9487ebd1ad5fed72 data/refinedstorage/advancements/recipes/misc/coloring_recipes/security_manager.json +dddb4b444133f4c7b25ce0f61a3a99115bf6e34f data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_controller.json +090ff26f519be45f17cd26bbd0a4bffac8788d9f data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter.json +0fab47854d53df7e11046062d079ee2907f45542 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter_manager.json +f680b3d58426290b96582ec6c503ed67d70fb76a data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_grid.json +ed146018b0984f5b0d1a8268967faaef19137b8c data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_monitor.json +efc126ddb87d193a0da48e463b1491c55bc2acd4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_detector.json +f5330852a980dc96909fb7d8d0e5fc041f7b7746 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_disk_manipulator.json +5647b0161acd0c3ba7c9be2bb4dbe16a189da2e6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_fluid_grid.json +22e149a387a8f312ba9418a2560a9d90491bbd13 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_grid.json +03d901c37cf4325431dee4b42383821819aeafe5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_receiver.json +e972d1fb5200ad4d76e81acca1f0981ffcd3ecd7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_transmitter.json +d30354bd77cfe54177d401bac7f3fae3b43a7358 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_pattern_grid.json +885e79474ecd484200a4c74c5b9b5793d3af5f54 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_relay.json +40ebabe8d88e40f05dbd884955e03e6c9874e8fc data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_security_manager.json +fe956edaee3a34348d624d99ddd549f40d3643e1 data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_wireless_transmitter.json +6eecfd13553d104c093c3822c148cc7f08d2bd0a data/refinedstorage/advancements/recipes/misc/coloring_recipes/wireless_transmitter.json +6a754b8300dd0e23f9b996cee593916c057ca3d3 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_controller.json +9c632320c99a245a3ecadf9236e6910549e76e54 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter.json +adccd41abbcfb9b1bd5deb9f9c1f0ed94fa063ce data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter_manager.json +68e92c065a5f08c8b497c4c383c9430f8cc8e8ba data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_grid.json +b5f5f31089375ade9a47c63d3885a83422a1b23b data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_monitor.json +45c6aab891bdd10105893ecfc0f07d0b811083d9 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_detector.json +7c384cda09300a12f85bc22dd004c3e03b6242f5 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_disk_manipulator.json +51916964e73f4ba5bcb2d4f3119b9fb8816753c6 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_fluid_grid.json +659328b91541f94cf9266c43a18dd0f94dc5c415 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_grid.json +d29f87c0cf06922d65e8b04de93ab19d29c45001 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_receiver.json +d3bb694cf85ff441ba6fa29a6f4c16378a598094 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_transmitter.json +b9fee6c5a251fe8294772e0dd0ed3378e79133f8 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_pattern_grid.json +2cfbe64c72ad2fd07d4004a9c099a0c855e621e4 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_relay.json +fc362a4803693a183950d7e373153cf802a4ff2b data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_security_manager.json +3b3b450e9af59ba31397fb93c198f57208a243d7 data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_wireless_transmitter.json +9996c185802c040d7454b1cfcfd822605d56b79b data/refinedstorage/advancements/recipes/misc/crafting_grid/black_crafting_grid.json +b4a51061a225e0ee4c52af75b79668e2b731b86c data/refinedstorage/advancements/recipes/misc/crafting_grid/blue_crafting_grid.json +fc16827a50393291982a6e0e19da4b7e440942f3 data/refinedstorage/advancements/recipes/misc/crafting_grid/brown_crafting_grid.json +05a059a165244eb944688123206078edf380bd35 data/refinedstorage/advancements/recipes/misc/crafting_grid/crafting_grid.json +f759470c704e5bf08ddd19d6e0fc738dc22d7256 data/refinedstorage/advancements/recipes/misc/crafting_grid/cyan_crafting_grid.json +9b544ac54835cd3717af3cfa78fc99c626ed857c data/refinedstorage/advancements/recipes/misc/crafting_grid/gray_crafting_grid.json +610cd12ad1fd27af1d428898077a6c1e604dc33f data/refinedstorage/advancements/recipes/misc/crafting_grid/green_crafting_grid.json +5ffe1397bf0f3d666c452303216d3389e4e634c4 data/refinedstorage/advancements/recipes/misc/crafting_grid/light_gray_crafting_grid.json +cf48c0c9e45bedfaa2dfc28414ae77b4589bb058 data/refinedstorage/advancements/recipes/misc/crafting_grid/lime_crafting_grid.json +4114ead8379196e77b74d5c91aae72426664944c data/refinedstorage/advancements/recipes/misc/crafting_grid/magenta_crafting_grid.json +323efa415a91a1a57327d2f9f37d85924f59b08b data/refinedstorage/advancements/recipes/misc/crafting_grid/orange_crafting_grid.json +b399c6d4a3344a6835d5f869ee2e423369a9a148 data/refinedstorage/advancements/recipes/misc/crafting_grid/pink_crafting_grid.json +e99cfcfdb579bca6a1ee5f051f49ddb90e5ff53c data/refinedstorage/advancements/recipes/misc/crafting_grid/purple_crafting_grid.json +81cd4d1b9defdfec2977c5c54fd1d6acdaada81c data/refinedstorage/advancements/recipes/misc/crafting_grid/red_crafting_grid.json +3be49d30bfd65404d73d0a028f8037128ae79f2b data/refinedstorage/advancements/recipes/misc/crafting_grid/white_crafting_grid.json +35df545e58407a3b84abb737ddbc50680da66899 data/refinedstorage/advancements/recipes/misc/crafting_grid/yellow_crafting_grid.json +5705ee4e85e94edf72a96de2dc3fb6ecb60b6729 data/refinedstorage/advancements/recipes/misc/fluid_grid/black_fluid_grid.json +e2bf1c90dea3f8e4f67fda2747237da7ba540213 data/refinedstorage/advancements/recipes/misc/fluid_grid/blue_fluid_grid.json +525cfca4916fcc674e741fada4cc606abb745f7c data/refinedstorage/advancements/recipes/misc/fluid_grid/brown_fluid_grid.json +ece66d6ed3ee6b031f495034bfa4c38c4a1ae5cc data/refinedstorage/advancements/recipes/misc/fluid_grid/cyan_fluid_grid.json +9e4b7cb2fdfa2805a53cf7dbc496dba36151caed data/refinedstorage/advancements/recipes/misc/fluid_grid/fluid_grid.json +37b3fc51d47c365088514a703cc5fcf11bd6837c data/refinedstorage/advancements/recipes/misc/fluid_grid/gray_fluid_grid.json +eaa9e19285209fe2d5bb68953892748b8433cd19 data/refinedstorage/advancements/recipes/misc/fluid_grid/green_fluid_grid.json +2d2a94c20cd953005d4483a0af18af9498006128 data/refinedstorage/advancements/recipes/misc/fluid_grid/light_gray_fluid_grid.json +6217e87d976a2d97f137debe4b7af117bb0d9946 data/refinedstorage/advancements/recipes/misc/fluid_grid/lime_fluid_grid.json +c6faf936615279617b893d8a2b8c197f1cdc1922 data/refinedstorage/advancements/recipes/misc/fluid_grid/magenta_fluid_grid.json +e1bea619d01e04e61c2295535840a294bda4e46f data/refinedstorage/advancements/recipes/misc/fluid_grid/orange_fluid_grid.json +69f1805039706b422b733e743addcd165452d7eb data/refinedstorage/advancements/recipes/misc/fluid_grid/pink_fluid_grid.json +38d16b36b2c8c1e0dabb778bcf03b967f262739b data/refinedstorage/advancements/recipes/misc/fluid_grid/purple_fluid_grid.json +d067044876223011f3e9736673ca67435e9a66e2 data/refinedstorage/advancements/recipes/misc/fluid_grid/red_fluid_grid.json +0d47235aa57900ddca60c8599d92f4a1a79877d0 data/refinedstorage/advancements/recipes/misc/fluid_grid/white_fluid_grid.json +1ffaa363c95cff7d00cad878af9c42015b4bfa1b data/refinedstorage/advancements/recipes/misc/fluid_grid/yellow_fluid_grid.json +b4445540f30612fd4ac460c83b20d6adef72c619 data/refinedstorage/advancements/recipes/misc/pattern_grid/black_pattern_grid.json +2aa9e0e19a41b6996a84b9a7ec2416ad0e0f4ab9 data/refinedstorage/advancements/recipes/misc/pattern_grid/blue_pattern_grid.json +d75032ae87285c3a4d1924d0655ca50748a40eb7 data/refinedstorage/advancements/recipes/misc/pattern_grid/brown_pattern_grid.json +f624f44cf7e80933b2f8351701adfbf2212a8fc5 data/refinedstorage/advancements/recipes/misc/pattern_grid/cyan_pattern_grid.json +03a3dbfb06c413572b93c5426873bddbb32924a2 data/refinedstorage/advancements/recipes/misc/pattern_grid/gray_pattern_grid.json +95614af1e6d8694b29bae065e43e2afce8e252e4 data/refinedstorage/advancements/recipes/misc/pattern_grid/green_pattern_grid.json +905018dec1c9f5224aeb72407967b6983f1f7ed8 data/refinedstorage/advancements/recipes/misc/pattern_grid/light_gray_pattern_grid.json +c854b76d5c75b4936394bb331441457aa3a5356f data/refinedstorage/advancements/recipes/misc/pattern_grid/lime_pattern_grid.json +12f393c295bb60814be1bd29ad9e07d5343106fe data/refinedstorage/advancements/recipes/misc/pattern_grid/magenta_pattern_grid.json +1c19ef9067c2ea223a419ce5f6d0967169fe44ea data/refinedstorage/advancements/recipes/misc/pattern_grid/orange_pattern_grid.json +e53eb701016f00c8c727a36ccd0d41d6d6ff1cf3 data/refinedstorage/advancements/recipes/misc/pattern_grid/pattern_grid.json +caa14b841c970d31a9247387ab7690f17f92f626 data/refinedstorage/advancements/recipes/misc/pattern_grid/pink_pattern_grid.json +ce6ed82f788fa0e8fe471971c590b36c5582969a data/refinedstorage/advancements/recipes/misc/pattern_grid/purple_pattern_grid.json +05ed2ae9497d2ff40398d9da5f8c7e2e584536c3 data/refinedstorage/advancements/recipes/misc/pattern_grid/red_pattern_grid.json +82c53eb4b9d9ff5f7ae26b59aafef71c90712006 data/refinedstorage/advancements/recipes/misc/pattern_grid/white_pattern_grid.json +28c917f48693b907454319c6d7f04c56cd9a5e04 data/refinedstorage/advancements/recipes/misc/pattern_grid/yellow_pattern_grid.json 1e484115999fa62d482da0ba86c36e3a7568513c data/refinedstorage/recipes/coloring_recipes/black_controller.json 837df99fec4b00d059e5f258c8c51040989fd59b data/refinedstorage/recipes/coloring_recipes/black_crafter.json cc777c1de15ee96706565e3032d8a17962452316 data/refinedstorage/recipes/coloring_recipes/black_crafter_manager.json diff --git a/src/generated/resources/.cache/c52895b732924e707cb6e5ddd1c6b6962039449c b/src/generated/resources/.cache/c52895b732924e707cb6e5ddd1c6b6962039449c index a21f9e8f59..f985a3621b 100644 --- a/src/generated/resources/.cache/c52895b732924e707cb6e5ddd1c6b6962039449c +++ b/src/generated/resources/.cache/c52895b732924e707cb6e5ddd1c6b6962039449c @@ -1,2 +1,2 @@ -// 1.20.1 2023-11-05T14:19:25.380203046 Block Entity Type Tags +// 1.20.4 2024-02-12T20:34:18.531158825 Block Entity Type Tags 98555d946827da8ddb7a7c451a1c99f4d0184ad3 data/packingtape/tags/block_entity_type/blacklist/problematic.json diff --git a/src/generated/resources/.cache/cb654f100e416ac39358630d6623170b9bfdc5d2 b/src/generated/resources/.cache/cb654f100e416ac39358630d6623170b9bfdc5d2 index a4d61d0989..2b827b4af0 100644 --- a/src/generated/resources/.cache/cb654f100e416ac39358630d6623170b9bfdc5d2 +++ b/src/generated/resources/.cache/cb654f100e416ac39358630d6623170b9bfdc5d2 @@ -1,4 +1,4 @@ -// 1.20.1 2023-11-05T14:19:25.382491537 Tags for minecraft:item mod id refinedstorage +// 1.20.4 2024-02-12T20:34:18.533198729 Tags for minecraft:item mod id refinedstorage 061bf4c2f3bdd530115615f2b04e55c2602908bd data/refinedstorage/tags/items/controller.json 407a16e5d941c69915f75b135a13e9144cc9c43e data/refinedstorage/tags/items/crafter.json dc1342f1d3e6a4cd8eaaa52429a011c10c6c2d96 data/refinedstorage/tags/items/crafter_manager.json diff --git a/src/generated/resources/.cache/f481442ce31db2c3b3dabb5b6d85f9a78568164e b/src/generated/resources/.cache/f481442ce31db2c3b3dabb5b6d85f9a78568164e index 13fd2c89a0..fb6cb7f3da 100644 --- a/src/generated/resources/.cache/f481442ce31db2c3b3dabb5b6d85f9a78568164e +++ b/src/generated/resources/.cache/f481442ce31db2c3b3dabb5b6d85f9a78568164e @@ -1,5 +1,5 @@ -// 1.20.1 2023-11-05T14:52:30.007687009 Tags for minecraft:block mod id refinedstorage -885d292a69d67240dbf2e57e951bf4fff5c7a064 data/forge/tags/blocks/relocation_not_supported.json +// 1.20.4 2024-02-12T20:34:18.553572165 Tags for minecraft:block mod id refinedstorage +7af8948adf9214476b9b2995799c32277c960c55 data/forge/tags/blocks/relocation_not_supported.json 061bf4c2f3bdd530115615f2b04e55c2602908bd data/refinedstorage/tags/blocks/controller.json 407a16e5d941c69915f75b135a13e9144cc9c43e data/refinedstorage/tags/blocks/crafter.json dc1342f1d3e6a4cd8eaaa52429a011c10c6c2d96 data/refinedstorage/tags/blocks/crafter_manager.json diff --git a/src/generated/resources/.cache/fd27170b6bf91459ed2598d25721edfeafc82e0a b/src/generated/resources/.cache/fd27170b6bf91459ed2598d25721edfeafc82e0a index 22654df4c5..1a204fc237 100644 --- a/src/generated/resources/.cache/fd27170b6bf91459ed2598d25721edfeafc82e0a +++ b/src/generated/resources/.cache/fd27170b6bf91459ed2598d25721edfeafc82e0a @@ -1,4 +1,4 @@ -// 1.20.1 2023-11-05T14:52:29.995381618 Block States: refinedstorage +// 1.20.4 2024-02-12T20:34:18.545348794 Block States: refinedstorage 7b69e3ab3a7471a50e264579d36c04adb8acad35 assets/refinedstorage/blockstates/black_controller.json c87045bd089212825bdd0f06b0d25e7bcf0e3f5d assets/refinedstorage/blockstates/black_crafter.json 999fe91e1661d6b45f9c29878f06438b3b5919dc assets/refinedstorage/blockstates/black_crafter_manager.json diff --git a/src/generated/resources/data/forge/tags/blocks/relocation_not_supported.json b/src/generated/resources/data/forge/tags/blocks/relocation_not_supported.json index 1e66d23797..d0f9598fbc 100644 --- a/src/generated/resources/data/forge/tags/blocks/relocation_not_supported.json +++ b/src/generated/resources/data/forge/tags/blocks/relocation_not_supported.json @@ -1,21 +1,21 @@ { "values": [ - "#refinedstorage:creative_controller", "#refinedstorage:detector", - "#refinedstorage:pattern_grid", - "#refinedstorage:network_transmitter", - "#refinedstorage:security_manager", "#refinedstorage:disk_manipulator", + "#refinedstorage:network_transmitter", + "#refinedstorage:fluid_grid", + "#refinedstorage:controller", + "#refinedstorage:crafting_monitor", + "#refinedstorage:pattern_grid", "#refinedstorage:wireless_transmitter", - "#refinedstorage:crafter_manager", + "#refinedstorage:relay", + "#refinedstorage:network_receiver", "#refinedstorage:grid", - "#refinedstorage:crafting_monitor", - "#refinedstorage:controller", - "#refinedstorage:crafting_grid", "#refinedstorage:crafter", - "#refinedstorage:fluid_grid", - "#refinedstorage:network_receiver", - "#refinedstorage:relay", + "#refinedstorage:crafter_manager", + "#refinedstorage:crafting_grid", + "#refinedstorage:security_manager", + "#refinedstorage:creative_controller", "refinedstorage:1k_storage_block", "refinedstorage:4k_storage_block", "refinedstorage:16k_storage_block", diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_controller.json index 943e6d0be9..4d32507bed 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter.json index c1e9b9330d..037e2b7b80 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter_manager.json index 9fb7b8b834..842b61096e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_grid.json index fd7bacb8d3..f83e62906f 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_monitor.json index 504d1c7fff..45b9176eb1 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_detector.json index a240b86eec..5eb6a8fb6c 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_disk_manipulator.json index 5b152a71da..670b913ae4 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_fluid_grid.json index 68c45dbd91..a972f95d85 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_grid.json index 653cbeb33f..69802530f6 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_receiver.json index d8f26f4a7f..49e6590cce 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_transmitter.json index 8e9a95cbc3..2d0120e33e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_pattern_grid.json index f9cd2be0f1..a5f7a02987 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_relay.json index 187204a535..d4b2e935de 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_security_manager.json index f0892752ce..b293f98829 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_wireless_transmitter.json index 6ea6182e1e..46757dc839 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/black_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/black_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_controller.json index 4da8ddf8eb..7bff529ceb 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter.json index 5edeedcf5a..da663a534a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter_manager.json index 1080266d55..1fd84e5bba 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_grid.json index 190bb2efaf..9fad3e50d3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_monitor.json index 8274cafb6f..50b85e4262 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_detector.json index f2fd4f375e..44af8d8eb4 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_disk_manipulator.json index 88fcf43d19..bd42fdcef2 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_fluid_grid.json index 4efd90908a..1eb207309b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_grid.json index 09e12054b0..96a71834b1 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_receiver.json index 5e10453f71..8596c644d8 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_transmitter.json index e970f18c93..69a41f2bdc 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_pattern_grid.json index b7483ecab9..b536759c17 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_relay.json index 1595b34749..cc486d6e7e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_security_manager.json index ed00edc6c0..fc2b420042 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_wireless_transmitter.json index 2feebcf0f7..fd245f51f0 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/blue_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/blue_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_controller.json index 0fa2ca98b3..9668ca33f7 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter.json index 54eb5493ac..170ca5f108 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter_manager.json index ffcf536571..bd00a5d836 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_grid.json index bb82a74fc9..39081c9680 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_monitor.json index 907075817c..d55b30967b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_detector.json index 1a6e231e80..1a5e7265dd 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_disk_manipulator.json index 9550042504..9a46f53c64 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_fluid_grid.json index e2080a2a5c..542df1c5ee 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_grid.json index fd277d1426..58acaed0e7 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_receiver.json index dce4351fb0..e1851d2ca6 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_transmitter.json index d3c26f8bb2..97d4b0c94c 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_pattern_grid.json index 38c549a763..4eb00990ba 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_relay.json index 6373f70292..dbd95f71f5 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_security_manager.json index e538cfdb01..5c58a7f21a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_wireless_transmitter.json index b7d3446825..ec7aa03840 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/brown_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/brown_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/controller.json index a476b14d51..dfe50daee4 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter.json index f8883891ff..f8c9588581 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter_manager.json index f98fd1cf16..e04f2b8ed6 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_grid.json index 09cdc05337..0da471bb38 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_monitor.json index e702098323..3e0a355bb1 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_controller.json index 3fc1262147..03c8efb398 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter.json index 78f3375086..8cb35a9fc9 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter_manager.json index aa75c6783e..cab4b0d7e0 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_grid.json index 14ab6ecc05..b6865c3d73 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_monitor.json index cc799921e1..343771166a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_detector.json index 61fa799073..f198003feb 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_disk_manipulator.json index e11863e566..5bac81e54e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_fluid_grid.json index 9a3343c47e..ac6a735d98 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_grid.json index 976449e42f..fe807a5376 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_receiver.json index 08a1bcba34..0bc3c55d5c 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_transmitter.json index b743a4da0f..07bf25db09 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_pattern_grid.json index e5921fb85e..3cf8358d62 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_relay.json index 93f637fd5c..74493e7786 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_security_manager.json index 20ae1a6cf2..f20573d6ea 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_wireless_transmitter.json index 24616abec0..4af3a4ddee 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/cyan_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/cyan_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/detector.json index 1a498700de..102872e2d3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/disk_manipulator.json index 6b79fb44b0..6cf2091f66 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/fluid_grid.json index 74b6e0baf4..1736bb1265 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_controller.json index f7c6acf226..75ddb8cdbb 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter.json index 156da358f6..36f90717c8 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter_manager.json index 1ce137e4ed..e4158abead 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_grid.json index 7bb2a5151c..84646b23fd 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_monitor.json index 6fee4c3143..ba9b15842f 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_detector.json index 18fc9fa0f3..e9ec3f8b7a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_disk_manipulator.json index 1bbfe23421..5b5f6511aa 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_fluid_grid.json index a0418fd3ae..81b28348cd 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_grid.json index fa1626188a..d21f8b4a9a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_receiver.json index e9f584832c..03b9773062 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_transmitter.json index 24e3807a78..2748450edc 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_pattern_grid.json index b84e7fa629..46e7211c74 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_relay.json index 2818d351c8..06bca5ff5c 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_security_manager.json index e8d93f380a..468b9834b4 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_wireless_transmitter.json index 8dd9dc4987..f99271640e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/gray_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/gray_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_controller.json index d25cf36784..3bc3ea1241 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter.json index 481b2d3fe3..55b92b7113 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter_manager.json index ab69eab435..4c0a75d519 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_grid.json index 04499777fb..f785a7d2c3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_monitor.json index ef23ab490d..f4752fc9c6 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_detector.json index 432cf89baa..d22f2ce758 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_disk_manipulator.json index 1788ff0d2b..4d41b45b44 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_fluid_grid.json index 6b19343799..79fb68548f 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_grid.json index 77e1274db9..3c323287d7 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_receiver.json index a9e7ba1f89..25a03d9da1 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_transmitter.json index c286d7fd4c..d3367e482c 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_pattern_grid.json index f60c7c8790..27e4608bac 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_relay.json index 7020d209c5..7b5d4d536e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_security_manager.json index 3b787a40d5..c45462a7ab 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_wireless_transmitter.json index ad94ddcd23..228945ca33 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/green_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/green_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/grid.json index a8640a8692..18119ff188 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_controller.json index 830633d42b..8fa356d148 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter.json index 8343f4d5ba..b68476de57 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter_manager.json index 990dc6d903..96be7131bc 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_grid.json index 370a275318..c414ffa98d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_monitor.json index 6cb6306587..6e51751acc 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_detector.json index 058b29cbff..42ceaf8835 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_disk_manipulator.json index 70bcaf99ae..17283560c5 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_fluid_grid.json index eeba9397f2..2444b1260a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_grid.json index a95c6d8512..3d23f6d3ae 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_receiver.json index 2cfdd43a85..346444f599 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_transmitter.json index 296def1888..f1e72ae9d3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_pattern_grid.json index fe8a0adba0..7dbf6d4a5d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_relay.json index 082b3b55b8..7f895a0489 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_security_manager.json index 68c6b5d54a..efe95487de 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_wireless_transmitter.json index 6faaa3a2df..56f1a54e48 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/light_gray_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/light_gray_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_controller.json index f2f77eb2d5..b73095f21f 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter.json index e9de923a55..eae7425591 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter_manager.json index fe91928715..e3409872ec 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_grid.json index 2e5cd7d083..7fe31e0952 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_monitor.json index 18c2a440a0..bc9a56bb7e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_detector.json index 20694ac106..149d0798d9 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_disk_manipulator.json index 3387cd0d8c..622cc8819a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_fluid_grid.json index d55c21d5f8..27978685a3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_grid.json index 4ab135403f..28ba60293a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_receiver.json index 6cb3f04ed0..e68345e06b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_transmitter.json index f4059f2f88..78eda4630c 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_pattern_grid.json index d4d2f2df32..9023cdc11b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_relay.json index bbdb6e31b3..8ef6cff3ba 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_security_manager.json index ab650e8efb..b410d96d09 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_wireless_transmitter.json index 444b887f3a..2cebea224b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/lime_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/lime_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_controller.json index b8aa9a9c45..93842c1638 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter.json index 1709618bb6..195f4af0b0 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter_manager.json index a50ad2a0e1..6cb4451528 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_grid.json index 4f7a19e1dc..903f4ecb34 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_monitor.json index 77ec2980e8..62fe0938fb 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_detector.json index e6884afd5b..3b53ad0f7a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_disk_manipulator.json index c649c04fbe..d713457722 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_fluid_grid.json index 9a1a24b123..19f81e7612 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_grid.json index 7fe727387a..f4824394a3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_receiver.json index 96f9ba2475..925dd159b4 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_transmitter.json index c000f42458..fc8122b54b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_pattern_grid.json index a37cae2e37..e5fee6ae8a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_relay.json index 3b593b30be..d9ef549403 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_security_manager.json index dd3d8a4c02..177ecffb73 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_wireless_transmitter.json index 368991cab4..2cfd3ef31d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/magenta_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/magenta_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_receiver.json index 1c255b5675..b4a13108db 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_transmitter.json index 8d83cbbe5d..9461204308 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_controller.json index e48328e403..1aba0abb1b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter.json index 62b9680c5d..bd655d0260 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter_manager.json index b6621ab34c..edbbbf3d7e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_grid.json index d892e68e0a..9c3f1451d2 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_monitor.json index f9d8f45cb2..2f726bf06e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_detector.json index 92992a2bb3..93267a1486 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_disk_manipulator.json index 0911b7866f..e6b2c4db21 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_fluid_grid.json index 57650363cf..5c54f6a08e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_grid.json index 7aee7a99b1..c9a40e5269 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_receiver.json index 664bcccb60..6db069632a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_transmitter.json index 76b60611e9..c2549ca3d3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_pattern_grid.json index bc66b1550d..7a896881e0 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_relay.json index 1264d49937..a557d36f20 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_security_manager.json index aa7b33361f..6c78b2c9b1 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_wireless_transmitter.json index bf645187f2..d56595bcc9 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/orange_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/orange_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pattern_grid.json index 5fbf51e231..ee2bf00e7b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_controller.json index 4688e4c160..948cd225cb 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter.json index fe027a5707..8bd8168815 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter_manager.json index 10003592d7..3cc417854a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_grid.json index 73f262d45c..a18f3721d6 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_monitor.json index f2d35d9600..98b292d0ec 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_detector.json index 010029c8ee..25beac38d2 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_disk_manipulator.json index 2c9bc7545e..30d2b6c24f 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_fluid_grid.json index 186d1eae0a..db9c8569b0 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_grid.json index 708a2a83d7..b518688e51 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_receiver.json index e4ae6f08fc..820713333b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_transmitter.json index dbe09ad4a7..10e0270fcc 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_pattern_grid.json index 80cb6af639..0273f79308 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_relay.json index 23eb701a63..89b4eeab67 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_security_manager.json index a41416864d..cbd8a0176b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_wireless_transmitter.json index 1f840b6424..bdec5ca6b9 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/pink_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/pink_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_controller.json index d035e302f2..470aa81414 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter.json index ccddf5ba16..c878292909 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter_manager.json index 6d4a4bf80f..c04ffcc11d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_grid.json index e7563b5854..94d47fc428 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_monitor.json index 642cbcd704..2a1add8bb4 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_detector.json index abdb73dbb5..bc4c2768d8 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_disk_manipulator.json index b3ca1d00b3..c8aa19694a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_fluid_grid.json index f5a45cc8eb..1a07d5ef27 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_grid.json index 5842f6597a..430cb1a2ec 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_receiver.json index b6e4069419..3710312d68 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_transmitter.json index 5b3d1593c9..6b1547f0f5 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_pattern_grid.json index 75aba897b8..96fb8fa0e2 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_relay.json index 1b1e4dfbdc..36a940450c 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_security_manager.json index 9c59f63555..d1aa136bc8 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_wireless_transmitter.json index 0d688967f5..0065cb6b10 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/purple_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/purple_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_controller.json index e4de4461e0..cea9bfaf68 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter.json index b3ca2e64b7..b025dd4f6d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter_manager.json index 3bf5ef754d..d68ae97191 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_grid.json index be2d50d3de..2493d8e607 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_monitor.json index 609e66a6c3..be94bacc79 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_detector.json index c21e81cf26..98a577eecc 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_disk_manipulator.json index 3dec357e35..abb8e5fd35 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_fluid_grid.json index e2f2b0e0dc..478d71c4f9 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_grid.json index 2013ded14f..2db72332a1 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_receiver.json index e829e5d058..ab0bf6bcb9 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_transmitter.json index 59295343df..fd10462f7d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_pattern_grid.json index ef715751ab..62720054ee 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_relay.json index 7ea752f02c..bb4721852d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_security_manager.json index f5edeb103f..44398bd993 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_wireless_transmitter.json index ae92ad79a0..09a246c8c1 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/red_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/red_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/relay.json index fffc1ec357..391c34ca3e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/security_manager.json index 2f9aeee747..b26041c7ae 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_controller.json index a9b5a913e9..ba37b94be0 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter.json index a4220032da..1756ce31fc 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter_manager.json index c9b4d8cd88..de3f1f4fc4 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_grid.json index 11474ce843..e1a25ce915 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_monitor.json index 5b7b72d873..df8b3e0476 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_detector.json index daff237120..416014307d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_disk_manipulator.json index 983ce9ae94..fdb38049f3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_fluid_grid.json index 11e903947e..fecafaafb3 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_grid.json index 8c8bd0eca9..0ece8ee29d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_receiver.json index e29f0bee53..b63be9b10a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_transmitter.json index 2a53487126..1e5fed154f 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_pattern_grid.json index 341e9a94a6..3f30bc9dd0 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_relay.json index 2043e50eed..f9fe1235ae 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_security_manager.json index 0b3f3890cb..429801afda 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_wireless_transmitter.json index 4c85e4a7b3..80f57b2fe9 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/white_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/white_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/wireless_transmitter.json index 56f2939446..c915a93a51 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_controller.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_controller.json index 845b953b2f..4ea4091cce 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_controller.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_controller.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_controller" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter.json index 63b59d4775..d803b0b51d 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_crafter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter_manager.json index 6aa8245bee..f809aaab28 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafter_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_crafter_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_grid.json index 261226f43c..3a5ffa0634 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_monitor.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_monitor.json index 9b8bc02989..67d9606787 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_monitor.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_crafting_monitor.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_crafting_monitor" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_detector.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_detector.json index c83a5cfd74..914b793a47 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_detector.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_detector.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_detector" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_disk_manipulator.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_disk_manipulator.json index 508e756897..9c96827976 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_disk_manipulator.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_disk_manipulator.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_disk_manipulator" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_fluid_grid.json index cbccf2bd95..ce81214104 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_grid.json index 02967dbdd6..a2e101324b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_receiver.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_receiver.json index e95f024424..9763105282 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_receiver.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_receiver.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_network_receiver" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_transmitter.json index 2a721480d7..6792451c76 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_network_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_network_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_pattern_grid.json index 2155c83162..d115d6fff7 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_relay.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_relay.json index 4faa9d6cd5..41d73aa6fa 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_relay.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_relay.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_relay" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_security_manager.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_security_manager.json index 554b3943c3..9c2b3a3084 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_security_manager.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_security_manager.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_security_manager" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_wireless_transmitter.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_wireless_transmitter.json index ac81a788f2..dd6edbc43b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_wireless_transmitter.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/coloring_recipes/yellow_wireless_transmitter.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:controller", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:controller" ] ], "rewards": { "recipes": [ "refinedstorage:coloring_recipes/yellow_wireless_transmitter" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/black_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/black_crafting_grid.json index 9aed9e4f25..fd66e6924e 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/black_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/black_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/black_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/blue_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/blue_crafting_grid.json index f698b0d6e6..97b8d9da1a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/blue_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/blue_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/blue_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/brown_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/brown_crafting_grid.json index 4dfc23b3e6..d3eede1065 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/brown_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/brown_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/brown_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/crafting_grid.json index 23aafc0906..fb53955be7 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/cyan_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/cyan_crafting_grid.json index 22e7615b2b..7b5ecdc63f 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/cyan_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/cyan_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/cyan_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/gray_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/gray_crafting_grid.json index 4c30dc5f0f..d7649933ba 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/gray_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/gray_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/gray_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/green_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/green_crafting_grid.json index 935e908f24..6b03c25c85 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/green_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/green_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/green_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/light_gray_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/light_gray_crafting_grid.json index 72b0314310..0ccde9b5b5 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/light_gray_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/light_gray_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/light_gray_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/lime_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/lime_crafting_grid.json index 124737e1a4..a81c219e10 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/lime_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/lime_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/lime_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/magenta_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/magenta_crafting_grid.json index e0df377872..2505249bee 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/magenta_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/magenta_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/magenta_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/orange_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/orange_crafting_grid.json index d6026bf5ca..31a86a82f9 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/orange_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/orange_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/orange_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/pink_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/pink_crafting_grid.json index 47d2d207a6..f5c1f5964b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/pink_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/pink_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/pink_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/purple_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/purple_crafting_grid.json index d6f88189d3..75185a4f12 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/purple_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/purple_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/purple_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/red_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/red_crafting_grid.json index 1fefe4e403..f61bc0b275 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/red_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/red_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/red_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/white_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/white_crafting_grid.json index 5c7036b874..0923a22c13 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/white_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/white_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/white_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/yellow_crafting_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/yellow_crafting_grid.json index d3085747f8..267edc0394 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/yellow_crafting_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/crafting_grid/yellow_crafting_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:crafting_grid/yellow_crafting_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/black_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/black_fluid_grid.json index 884f0a486c..ac87c539f4 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/black_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/black_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/black_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/blue_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/blue_fluid_grid.json index 85c9cdd9db..ae7c385636 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/blue_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/blue_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/blue_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/brown_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/brown_fluid_grid.json index 4597d7d0dc..2023cc4d37 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/brown_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/brown_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/brown_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/cyan_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/cyan_fluid_grid.json index 52b0533d72..a75c3a7440 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/cyan_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/cyan_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/cyan_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/fluid_grid.json index 6f34d5bac1..1bbf7466be 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/gray_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/gray_fluid_grid.json index 278ccb8734..7846ac7c5b 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/gray_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/gray_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/gray_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/green_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/green_fluid_grid.json index f476562853..aad16ecfad 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/green_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/green_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/green_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/light_gray_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/light_gray_fluid_grid.json index 06c1b792f5..3c5643cf0c 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/light_gray_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/light_gray_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/light_gray_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/lime_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/lime_fluid_grid.json index ac1e4a3a06..dc7b8f1aa6 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/lime_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/lime_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/lime_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/magenta_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/magenta_fluid_grid.json index 3eb4578bd2..3033504e11 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/magenta_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/magenta_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/magenta_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/orange_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/orange_fluid_grid.json index a641781bb1..f650c4dffb 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/orange_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/orange_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/orange_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/pink_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/pink_fluid_grid.json index c2703ae867..fdfe3db9d1 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/pink_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/pink_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/pink_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/purple_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/purple_fluid_grid.json index f217dbb1c5..e2a6c0fae2 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/purple_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/purple_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/purple_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/red_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/red_fluid_grid.json index 4f0bcb79fc..6e65376266 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/red_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/red_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/red_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/white_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/white_fluid_grid.json index 6cea5615dd..b632f917ab 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/white_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/white_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/white_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/yellow_fluid_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/yellow_fluid_grid.json index 7057ed452f..820bbef908 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/yellow_fluid_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/fluid_grid/yellow_fluid_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:fluid_grid/yellow_fluid_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/black_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/black_pattern_grid.json index 0e2c8cc568..a645b8d096 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/black_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/black_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/black_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/blue_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/blue_pattern_grid.json index 58c454f236..b34d2ff075 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/blue_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/blue_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/blue_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/brown_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/brown_pattern_grid.json index 8dc5d9b248..5509b3a3da 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/brown_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/brown_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/brown_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/cyan_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/cyan_pattern_grid.json index 5cb6e12b6b..c9371205c0 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/cyan_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/cyan_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/cyan_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/gray_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/gray_pattern_grid.json index 4db996efab..03c7ddc24a 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/gray_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/gray_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/gray_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/green_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/green_pattern_grid.json index b91e69a777..f6dc3456c6 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/green_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/green_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/green_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/light_gray_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/light_gray_pattern_grid.json index ce09a40f65..4160ef6e28 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/light_gray_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/light_gray_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/light_gray_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/lime_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/lime_pattern_grid.json index 9f6f72a1e7..fcdb8c8dce 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/lime_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/lime_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/lime_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/magenta_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/magenta_pattern_grid.json index 0f162fd64b..a73b2d3303 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/magenta_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/magenta_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/magenta_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/orange_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/orange_pattern_grid.json index 52d617a9e9..cb8b0b7f06 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/orange_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/orange_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/orange_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/pattern_grid.json index 47d0014581..dbb3bc5906 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/pink_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/pink_pattern_grid.json index b83cf01661..95404fa2b8 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/pink_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/pink_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/pink_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/purple_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/purple_pattern_grid.json index 2b03a5acd9..2cd7c98429 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/purple_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/purple_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/purple_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/red_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/red_pattern_grid.json index cbabf89cc5..b559d3e85f 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/red_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/red_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/red_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/white_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/white_pattern_grid.json index 80596be5bf..256c711451 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/white_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/white_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/white_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/yellow_pattern_grid.json b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/yellow_pattern_grid.json index 3e2b7b3895..99bd90d9fb 100644 --- a/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/yellow_pattern_grid.json +++ b/src/generated/resources/data/refinedstorage/advancements/recipes/misc/pattern_grid/yellow_pattern_grid.json @@ -22,14 +22,13 @@ }, "requirements": [ [ - "refinedstorage:grid", - "has_the_recipe" + "has_the_recipe", + "refinedstorage:grid" ] ], "rewards": { "recipes": [ "refinedstorage:pattern_grid/yellow_pattern_grid" ] - }, - "sends_telemetry_event": false + } } \ No newline at end of file diff --git a/src/main/java/com/refinedmods/refinedstorage/RS.java b/src/main/java/com/refinedmods/refinedstorage/RS.java index 37c19572b3..8c2e05f321 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RS.java +++ b/src/main/java/com/refinedmods/refinedstorage/RS.java @@ -9,13 +9,14 @@ import com.refinedmods.refinedstorage.setup.ClientSetup; import com.refinedmods.refinedstorage.setup.CommonSetup; import com.refinedmods.refinedstorage.setup.ServerSetup; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.DistExecutor; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.config.ModConfig; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; + +import net.neoforged.api.distmarker.Dist; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.ModLoadingContext; +import net.neoforged.fml.common.Mod; +import net.neoforged.fml.config.ModConfig; +import net.neoforged.fml.loading.FMLEnvironment; +import net.neoforged.neoforge.common.NeoForge; @Mod(RS.ID) public final class RS { @@ -26,34 +27,36 @@ public final class RS { public static final ServerConfig SERVER_CONFIG = new ServerConfig(); public static final ClientConfig CLIENT_CONFIG = new ClientConfig(); - public RS() { - DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { - FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientSetup::onClientSetup); - FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientSetup::onModelBake); - FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientSetup::onRegisterAdditionalModels); - FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientSetup::onRegisterModelGeometry); - FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientSetup::onRegisterKeymappings); - FMLJavaModLoadingContext.get().getModEventBus().addListener(ClientSetup::onRegisterColorBindings); - MinecraftForge.EVENT_BUS.addListener(ClientSetup::addReloadListener); - }); + public RS(IEventBus eventBus) { + if (FMLEnvironment.dist == Dist.CLIENT) { + eventBus.addListener(ClientSetup::onClientSetup); + eventBus.addListener(ClientSetup::registerMenuScreens); + eventBus.addListener(ClientSetup::onModelBake); + eventBus.addListener(ClientSetup::onRegisterAdditionalModels); + eventBus.addListener(ClientSetup::onRegisterModelGeometry); + eventBus.addListener(ClientSetup::onRegisterKeymappings); + eventBus.addListener(ClientSetup::onRegisterColorBindings); + NeoForge.EVENT_BUS.addListener(ClientSetup::addReloadListener); + } - MinecraftForge.EVENT_BUS.register(new ServerSetup()); + NeoForge.EVENT_BUS.register(new ServerSetup()); ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, SERVER_CONFIG.getSpec()); ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, CLIENT_CONFIG.getSpec()); - RSBlocks.register(); - RSItems.register(); + RSBlocks.register(eventBus); + RSItems.register(eventBus); - FMLJavaModLoadingContext.get().getModEventBus().addListener(CommonSetup::onCommonSetup); - FMLJavaModLoadingContext.get().getModEventBus().addListener(CommonSetup::onRegister); - FMLJavaModLoadingContext.get().getModEventBus().addListener(CommonSetup::onRegisterCapabilities); - FMLJavaModLoadingContext.get().getModEventBus().register(new DataGenerators()); - FMLJavaModLoadingContext.get().getModEventBus().register(new CuriosIntegration()); + eventBus.addListener(CommonSetup::onCommonSetup); + eventBus.addListener(CommonSetup::onRegister); + eventBus.addListener(CommonSetup::onRegisterCapabilities); + eventBus.addListener(CommonSetup::onRegisterNetworkPackets); + eventBus.register(new DataGenerators()); + eventBus.register(new CuriosIntegration()); - RSContainerMenus.REGISTRY.register(FMLJavaModLoadingContext.get().getModEventBus()); - RSBlockEntities.REGISTRY.register(FMLJavaModLoadingContext.get().getModEventBus()); - RSRecipeSerializers.REGISTRY.register(FMLJavaModLoadingContext.get().getModEventBus()); + RSContainerMenus.REGISTRY.register(eventBus); + RSBlockEntities.REGISTRY.register(eventBus); + RSRecipeSerializers.REGISTRY.register(eventBus); API.deliver(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/RSBlockEntities.java b/src/main/java/com/refinedmods/refinedstorage/RSBlockEntities.java index 3217fe7cf4..1df39d8e70 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSBlockEntities.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSBlockEntities.java @@ -11,90 +11,91 @@ import com.refinedmods.refinedstorage.blockentity.grid.GridBlockEntity; import com.refinedmods.refinedstorage.blockentity.grid.portable.PortableGridBlockEntity; import com.refinedmods.refinedstorage.item.blockitem.PortableGridBlockItem; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.RegistryObject; +import net.neoforged.neoforge.registries.DeferredRegister; +import net.neoforged.neoforge.registries.DeferredHolder; public final class RSBlockEntities { - public static final DeferredRegister> REGISTRY = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, RS.ID); + public static final DeferredRegister> REGISTRY = DeferredRegister.create(BuiltInRegistries.BLOCK_ENTITY_TYPE, RS.ID); - public static final RegistryObject> CONTROLLER = + public static final DeferredHolder, BlockEntityType> CONTROLLER = REGISTRY.register("controller", () -> registerSynchronizationParameters(ControllerBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new ControllerBlockEntity(NetworkType.NORMAL, pos, state), RSBlocks.CONTROLLER.getBlocks()).build(null))); - public static final RegistryObject> CREATIVE_CONTROLLER = + public static final DeferredHolder, BlockEntityType> CREATIVE_CONTROLLER = REGISTRY.register("creative_controller", () -> registerSynchronizationParameters(ControllerBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new ControllerBlockEntity(NetworkType.CREATIVE, pos, state), RSBlocks.CREATIVE_CONTROLLER.getBlocks()).build(null))); - public static final RegistryObject> DETECTOR = + public static final DeferredHolder, BlockEntityType> DETECTOR = REGISTRY.register("detector", () -> registerSynchronizationParameters(DetectorBlockEntity.SPEC, BlockEntityType.Builder.of(DetectorBlockEntity::new, RSBlocks.DETECTOR.getBlocks()).build(null))); - public static final RegistryObject> DISK_DRIVE = + public static final DeferredHolder, BlockEntityType> DISK_DRIVE = REGISTRY.register("disk_drive", () -> registerSynchronizationParameters(DiskDriveBlockEntity.SPEC, BlockEntityType.Builder.of(DiskDriveBlockEntity::new, RSBlocks.DISK_DRIVE.get()).build(null))); - public static final RegistryObject> EXPORTER = + public static final DeferredHolder, BlockEntityType> EXPORTER = REGISTRY.register("exporter", () -> registerSynchronizationParameters(ExporterBlockEntity.SPEC, BlockEntityType.Builder.of(ExporterBlockEntity::new, RSBlocks.EXPORTER.get()).build(null))); - public static final RegistryObject> EXTERNAL_STORAGE = + public static final DeferredHolder, BlockEntityType> EXTERNAL_STORAGE = REGISTRY.register("external_storage", () -> registerSynchronizationParameters(ExternalStorageBlockEntity.SPEC, BlockEntityType.Builder.of(ExternalStorageBlockEntity::new, RSBlocks.EXTERNAL_STORAGE.get()).build(null))); - public static final RegistryObject> GRID = + public static final DeferredHolder, BlockEntityType> GRID = REGISTRY.register("grid", () -> registerSynchronizationParameters(GridBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new GridBlockEntity(GridType.NORMAL, pos, state), RSBlocks.GRID.getBlocks()).build(null))); - public static final RegistryObject> CRAFTING_GRID = + public static final DeferredHolder, BlockEntityType> CRAFTING_GRID = REGISTRY.register("crafting_grid", () -> registerSynchronizationParameters(GridBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new GridBlockEntity(GridType.CRAFTING, pos, state), RSBlocks.CRAFTING_GRID.getBlocks()).build(null))); - public static final RegistryObject> PATTERN_GRID = + public static final DeferredHolder, BlockEntityType> PATTERN_GRID = REGISTRY.register("pattern_grid", () -> registerSynchronizationParameters(GridBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new GridBlockEntity(GridType.PATTERN, pos, state), RSBlocks.PATTERN_GRID.getBlocks()).build(null))); - public static final RegistryObject> FLUID_GRID = + public static final DeferredHolder, BlockEntityType> FLUID_GRID = REGISTRY.register("fluid_grid", () -> registerSynchronizationParameters(GridBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new GridBlockEntity(GridType.FLUID, pos, state), RSBlocks.FLUID_GRID.getBlocks()).build(null))); - public static final RegistryObject> IMPORTER = + public static final DeferredHolder, BlockEntityType> IMPORTER = REGISTRY.register("importer", () -> registerSynchronizationParameters(ImporterBlockEntity.SPEC, BlockEntityType.Builder.of(ImporterBlockEntity::new, RSBlocks.IMPORTER.get()).build(null))); - public static final RegistryObject> NETWORK_TRANSMITTER = + public static final DeferredHolder, BlockEntityType> NETWORK_TRANSMITTER = REGISTRY.register("network_transmitter", () -> registerSynchronizationParameters(NetworkTransmitterBlockEntity.SPEC, BlockEntityType.Builder.of(NetworkTransmitterBlockEntity::new, RSBlocks.NETWORK_TRANSMITTER.getBlocks()).build(null))); - public static final RegistryObject> NETWORK_RECEIVER = + public static final DeferredHolder, BlockEntityType> NETWORK_RECEIVER = REGISTRY.register("network_receiver", () -> registerSynchronizationParameters(NetworkReceiverBlockEntity.SPEC, BlockEntityType.Builder.of(NetworkReceiverBlockEntity::new, RSBlocks.NETWORK_RECEIVER.getBlocks()).build(null))); - public static final RegistryObject> RELAY = + public static final DeferredHolder, BlockEntityType> RELAY = REGISTRY.register("relay", () -> registerSynchronizationParameters(RelayBlockEntity.SPEC, BlockEntityType.Builder.of(RelayBlockEntity::new, RSBlocks.RELAY.getBlocks()).build(null))); - public static final RegistryObject> CABLE = + public static final DeferredHolder, BlockEntityType> CABLE = REGISTRY.register("cable", () -> registerSynchronizationParameters(CableBlockEntity.SPEC, BlockEntityType.Builder.of(CableBlockEntity::new, RSBlocks.CABLE.get()).build(null))); - public static final RegistryObject> ONE_K_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> ONE_K_STORAGE_BLOCK = REGISTRY.register("1k_storage_block", () -> registerSynchronizationParameters(StorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new StorageBlockEntity(ItemStorageType.ONE_K, pos, state), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.ONE_K).get()).build(null))); - public static final RegistryObject> FOUR_K_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> FOUR_K_STORAGE_BLOCK = REGISTRY.register("4k_storage_block", () -> registerSynchronizationParameters(StorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new StorageBlockEntity(ItemStorageType.FOUR_K, pos, state), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.FOUR_K).get()).build(null))); - public static final RegistryObject> SIXTEEN_K_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> SIXTEEN_K_STORAGE_BLOCK = REGISTRY.register("16k_storage_block", () -> registerSynchronizationParameters(StorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new StorageBlockEntity(ItemStorageType.SIXTEEN_K, pos, state), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.SIXTEEN_K).get()).build(null))); - public static final RegistryObject> SIXTY_FOUR_K_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> SIXTY_FOUR_K_STORAGE_BLOCK = REGISTRY.register("64k_storage_block", () -> registerSynchronizationParameters(StorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new StorageBlockEntity(ItemStorageType.SIXTY_FOUR_K, pos, state), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.SIXTY_FOUR_K).get()).build(null))); - public static final RegistryObject> CREATIVE_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> CREATIVE_STORAGE_BLOCK = REGISTRY.register("creative_storage_block", () -> registerSynchronizationParameters(StorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new StorageBlockEntity(ItemStorageType.CREATIVE, pos, state), RSBlocks.STORAGE_BLOCKS.get(ItemStorageType.CREATIVE).get()).build(null))); - public static final RegistryObject> SIXTY_FOUR_K_FLUID_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> SIXTY_FOUR_K_FLUID_STORAGE_BLOCK = REGISTRY.register("64k_fluid_storage_block", () -> registerSynchronizationParameters(FluidStorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new FluidStorageBlockEntity(FluidStorageType.SIXTY_FOUR_K, pos, state), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.SIXTY_FOUR_K).get()).build(null))); - public static final RegistryObject> TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_BLOCK = REGISTRY.register("256k_fluid_storage_block", () -> registerSynchronizationParameters(FluidStorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new FluidStorageBlockEntity(FluidStorageType.TWO_HUNDRED_FIFTY_SIX_K, pos, state), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.TWO_HUNDRED_FIFTY_SIX_K).get()).build(null))); - public static final RegistryObject> THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_BLOCK = REGISTRY.register("1024k_fluid_storage_block", () -> registerSynchronizationParameters(FluidStorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new FluidStorageBlockEntity(FluidStorageType.THOUSAND_TWENTY_FOUR_K, pos, state), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.THOUSAND_TWENTY_FOUR_K).get()).build(null))); - public static final RegistryObject> FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_BLOCK = REGISTRY.register("4096k_fluid_storage_block", () -> registerSynchronizationParameters(FluidStorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new FluidStorageBlockEntity(FluidStorageType.FOUR_THOUSAND_NINETY_SIX_K, pos, state), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.FOUR_THOUSAND_NINETY_SIX_K).get()).build(null))); - public static final RegistryObject> CREATIVE_FLUID_STORAGE_BLOCK = + public static final DeferredHolder, BlockEntityType> CREATIVE_FLUID_STORAGE_BLOCK = REGISTRY.register("creative_fluid_storage_block", () -> registerSynchronizationParameters(FluidStorageBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new FluidStorageBlockEntity(FluidStorageType.CREATIVE, pos, state), RSBlocks.FLUID_STORAGE_BLOCKS.get(FluidStorageType.CREATIVE).get()).build(null))); - public static final RegistryObject> SECURITY_MANAGER = + public static final DeferredHolder, BlockEntityType> SECURITY_MANAGER = REGISTRY.register("security_manager", () -> registerSynchronizationParameters(SecurityManagerBlockEntity.SPEC, BlockEntityType.Builder.of(SecurityManagerBlockEntity::new, RSBlocks.SECURITY_MANAGER.getBlocks()).build(null))); - public static final RegistryObject> INTERFACE = + public static final DeferredHolder, BlockEntityType> INTERFACE = REGISTRY.register("interface", () -> registerSynchronizationParameters(InterfaceBlockEntity.SPEC, BlockEntityType.Builder.of(InterfaceBlockEntity::new, RSBlocks.INTERFACE.get()).build(null))); - public static final RegistryObject> FLUID_INTERFACE = + public static final DeferredHolder, BlockEntityType> FLUID_INTERFACE = REGISTRY.register("fluid_interface", () -> registerSynchronizationParameters(FluidInterfaceBlockEntity.SPEC, BlockEntityType.Builder.of(FluidInterfaceBlockEntity::new, RSBlocks.FLUID_INTERFACE.get()).build(null))); - public static final RegistryObject> WIRELESS_TRANSMITTER = + public static final DeferredHolder, BlockEntityType> WIRELESS_TRANSMITTER = REGISTRY.register("wireless_transmitter", () -> registerSynchronizationParameters(WirelessTransmitterBlockEntity.SPEC, BlockEntityType.Builder.of(WirelessTransmitterBlockEntity::new, RSBlocks.WIRELESS_TRANSMITTER.getBlocks()).build(null))); - public static final RegistryObject> STORAGE_MONITOR = + public static final DeferredHolder, BlockEntityType> STORAGE_MONITOR = REGISTRY.register("storage_monitor", () -> registerSynchronizationParameters(StorageMonitorBlockEntity.SPEC, BlockEntityType.Builder.of(StorageMonitorBlockEntity::new, RSBlocks.STORAGE_MONITOR.get()).build(null))); - public static final RegistryObject> CONSTRUCTOR = + public static final DeferredHolder, BlockEntityType> CONSTRUCTOR = REGISTRY.register("constructor", () -> registerSynchronizationParameters(ConstructorBlockEntity.SPEC, BlockEntityType.Builder.of(ConstructorBlockEntity::new, RSBlocks.CONSTRUCTOR.get()).build(null))); - public static final RegistryObject> DESTRUCTOR = + public static final DeferredHolder, BlockEntityType> DESTRUCTOR = REGISTRY.register("destructor", () -> registerSynchronizationParameters(DestructorBlockEntity.SPEC, BlockEntityType.Builder.of(DestructorBlockEntity::new, RSBlocks.DESTRUCTOR.get()).build(null))); - public static final RegistryObject> DISK_MANIPULATOR = + public static final DeferredHolder, BlockEntityType> DISK_MANIPULATOR = REGISTRY.register("disk_manipulator", () -> registerSynchronizationParameters(DiskManipulatorBlockEntity.SPEC, BlockEntityType.Builder.of(DiskManipulatorBlockEntity::new, RSBlocks.DISK_MANIPULATOR.getBlocks()).build(null))); - public static final RegistryObject> PORTABLE_GRID = + public static final DeferredHolder, BlockEntityType> PORTABLE_GRID = REGISTRY.register("portable_grid", () -> registerSynchronizationParameters(PortableGridBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new PortableGridBlockEntity(PortableGridBlockItem.Type.NORMAL, pos, state), RSBlocks.PORTABLE_GRID.get()).build(null))); - public static final RegistryObject> CREATIVE_PORTABLE_GRID = + public static final DeferredHolder, BlockEntityType> CREATIVE_PORTABLE_GRID = REGISTRY.register("creative_portable_grid", () -> registerSynchronizationParameters(PortableGridBlockEntity.SPEC, BlockEntityType.Builder.of((pos, state) -> new PortableGridBlockEntity(PortableGridBlockItem.Type.CREATIVE, pos, state), RSBlocks.CREATIVE_PORTABLE_GRID.get()).build(null))); - public static final RegistryObject> CRAFTER = + public static final DeferredHolder, BlockEntityType> CRAFTER = REGISTRY.register("crafter", () -> registerSynchronizationParameters(CrafterBlockEntity.SPEC, BlockEntityType.Builder.of(CrafterBlockEntity::new, RSBlocks.CRAFTER.getBlocks()).build(null))); - public static final RegistryObject> CRAFTER_MANAGER = + public static final DeferredHolder, BlockEntityType> CRAFTER_MANAGER = REGISTRY.register("crafter_manager", () -> registerSynchronizationParameters(CrafterManagerBlockEntity.SPEC, BlockEntityType.Builder.of(CrafterManagerBlockEntity::new, RSBlocks.CRAFTER_MANAGER.getBlocks()).build(null))); - public static final RegistryObject> CRAFTING_MONITOR = + public static final DeferredHolder, BlockEntityType> CRAFTING_MONITOR = REGISTRY.register("crafting_monitor", () -> registerSynchronizationParameters(CraftingMonitorBlockEntity.SPEC, BlockEntityType.Builder.of(CraftingMonitorBlockEntity::new, RSBlocks.CRAFTING_MONITOR.getBlocks()).build(null))); private static BlockEntityType registerSynchronizationParameters(BlockEntitySynchronizationSpec spec, BlockEntityType t) { diff --git a/src/main/java/com/refinedmods/refinedstorage/RSBlocks.java b/src/main/java/com/refinedmods/refinedstorage/RSBlocks.java index 89c6c7cbf8..9392ce001b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSBlocks.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSBlocks.java @@ -6,14 +6,14 @@ import com.refinedmods.refinedstorage.apiimpl.storage.ItemStorageType; import com.refinedmods.refinedstorage.block.*; import com.refinedmods.refinedstorage.item.blockitem.PortableGridBlockItem; -import com.refinedmods.refinedstorage.util.ColorMap; +import com.refinedmods.refinedstorage.util.BlockColorMap; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.tags.TagKey; import net.minecraft.world.level.block.Block; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.RegistryObject; - +import net.neoforged.bus.api.IEventBus; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; import java.util.ArrayList; import java.util.EnumMap; import java.util.HashMap; @@ -21,41 +21,41 @@ import java.util.Map; public final class RSBlocks { - public static final RegistryObject IMPORTER; - public static final RegistryObject EXPORTER; - public static final RegistryObject QUARTZ_ENRICHED_IRON; - public static final RegistryObject MACHINE_CASING; - public static final RegistryObject CABLE; - public static final RegistryObject DISK_DRIVE; - public static final RegistryObject EXTERNAL_STORAGE; - public static final Map> STORAGE_BLOCKS = new EnumMap<>(ItemStorageType.class); - public static final Map> FLUID_STORAGE_BLOCKS = new EnumMap<>(FluidStorageType.class); - public static final Map, ColorMap> COLORED_BLOCK_TAGS = new HashMap<>(); - public static final RegistryObject INTERFACE; - public static final RegistryObject FLUID_INTERFACE; - public static final RegistryObject STORAGE_MONITOR; - public static final RegistryObject CONSTRUCTOR; - public static final RegistryObject DESTRUCTOR; - public static final RegistryObject PORTABLE_GRID; - public static final RegistryObject CREATIVE_PORTABLE_GRID; - public static final List> COLORED_BLOCKS = new ArrayList<>(); - private static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, RS.ID); - public static final ColorMap CRAFTER = new ColorMap<>(BLOCKS); - public static final ColorMap RELAY = new ColorMap<>(BLOCKS); - public static final ColorMap NETWORK_TRANSMITTER = new ColorMap<>(BLOCKS); - public static final ColorMap NETWORK_RECEIVER = new ColorMap<>(BLOCKS); - public static final ColorMap CONTROLLER = new ColorMap<>(BLOCKS); - public static final ColorMap CREATIVE_CONTROLLER = new ColorMap<>(BLOCKS); - public static final ColorMap GRID = new ColorMap<>(BLOCKS); - public static final ColorMap CRAFTING_GRID = new ColorMap<>(BLOCKS); - public static final ColorMap PATTERN_GRID = new ColorMap<>(BLOCKS); - public static final ColorMap FLUID_GRID = new ColorMap<>(BLOCKS); - public static final ColorMap SECURITY_MANAGER = new ColorMap<>(BLOCKS); - public static final ColorMap WIRELESS_TRANSMITTER = new ColorMap<>(BLOCKS); - public static final ColorMap DISK_MANIPULATOR = new ColorMap<>(BLOCKS); - public static final ColorMap CRAFTER_MANAGER = new ColorMap<>(BLOCKS); - public static final ColorMap CRAFTING_MONITOR = new ColorMap<>(BLOCKS); - public static final ColorMap DETECTOR = new ColorMap<>(BLOCKS); + public static final DeferredHolder IMPORTER; + public static final DeferredHolder EXPORTER; + public static final DeferredHolder QUARTZ_ENRICHED_IRON; + public static final DeferredHolder MACHINE_CASING; + public static final DeferredHolder CABLE; + public static final DeferredHolder DISK_DRIVE; + public static final DeferredHolder EXTERNAL_STORAGE; + public static final Map> STORAGE_BLOCKS = new EnumMap<>(ItemStorageType.class); + public static final Map> FLUID_STORAGE_BLOCKS = new EnumMap<>(FluidStorageType.class); + public static final Map, BlockColorMap> COLORED_BLOCK_TAGS = new HashMap<>(); + public static final DeferredHolder INTERFACE; + public static final DeferredHolder FLUID_INTERFACE; + public static final DeferredHolder STORAGE_MONITOR; + public static final DeferredHolder CONSTRUCTOR; + public static final DeferredHolder DESTRUCTOR; + public static final DeferredHolder PORTABLE_GRID; + public static final DeferredHolder CREATIVE_PORTABLE_GRID; + public static final List> COLORED_BLOCKS = new ArrayList<>(); + private static final DeferredRegister BLOCKS = DeferredRegister.create(BuiltInRegistries.BLOCK, RS.ID); + public static final BlockColorMap CRAFTER = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap RELAY = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap NETWORK_TRANSMITTER = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap NETWORK_RECEIVER = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap CONTROLLER = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap CREATIVE_CONTROLLER = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap GRID = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap CRAFTING_GRID = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap PATTERN_GRID = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap FLUID_GRID = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap SECURITY_MANAGER = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap WIRELESS_TRANSMITTER = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap DISK_MANIPULATOR = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap CRAFTER_MANAGER = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap CRAFTING_MONITOR = new BlockColorMap<>(BLOCKS); + public static final BlockColorMap DETECTOR = new BlockColorMap<>(BLOCKS); private static final String GRID_SUFFIX = "_grid"; static { @@ -103,7 +103,7 @@ public final class RSBlocks { private RSBlocks() { } - public static void register() { - BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); + public static void register(IEventBus bus) { + BLOCKS.register(bus); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/RSContainerMenus.java b/src/main/java/com/refinedmods/refinedstorage/RSContainerMenus.java index f9218d60db..4de2c83f62 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSContainerMenus.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSContainerMenus.java @@ -3,39 +3,41 @@ import com.refinedmods.refinedstorage.blockentity.*; import com.refinedmods.refinedstorage.container.*; import com.refinedmods.refinedstorage.container.factory.*; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.inventory.MenuType; -import net.minecraftforge.common.extensions.IForgeMenuType; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.RegistryObject; +import net.neoforged.neoforge.common.extensions.IMenuTypeExtension; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; public final class RSContainerMenus { - public static final DeferredRegister> REGISTRY = DeferredRegister.create(ForgeRegistries.MENU_TYPES, RS.ID); + public static final DeferredRegister> REGISTRY = DeferredRegister.create(BuiltInRegistries.MENU, RS.ID); - public static final RegistryObject> CONTROLLER = REGISTRY.register("controller", () -> IForgeMenuType.create(((windowId, inv, data) -> new ControllerContainerMenu(null, inv.player, windowId)))); - public static final RegistryObject> GRID = REGISTRY.register("grid", () -> IForgeMenuType.create(new GridContainerFactory())); - public static final RegistryObject> DETECTOR = REGISTRY.register("detector", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new DetectorContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> EXPORTER = REGISTRY.register("exporter", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new ExporterContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> EXTERNAL_STORAGE = REGISTRY.register("external_storage", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new ExternalStorageContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> FILTER = REGISTRY.register("filter", () -> IForgeMenuType.create((windowId, inv, data) -> new FilterContainerMenu(inv.player, inv.getSelected(), windowId))); - public static final RegistryObject> IMPORTER = REGISTRY.register("importer", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new ImporterContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> NETWORK_TRANSMITTER = REGISTRY.register("network_transmitter", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new NetworkTransmitterContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> RELAY = REGISTRY.register("relay", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new RelayContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> DISK_DRIVE = REGISTRY.register("disk_drive", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new DiskDriveContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> STORAGE_BLOCK = REGISTRY.register("storage_block", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new StorageContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> FLUID_STORAGE_BLOCK = REGISTRY.register("fluid_storage_block", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new FluidStorageContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> SECURITY_MANAGER = REGISTRY.register("security_manager", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new SecurityManagerContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> INTERFACE = REGISTRY.register("interface", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new InterfaceContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> FLUID_INTERFACE = REGISTRY.register("fluid_interface", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new FluidInterfaceContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> WIRELESS_TRANSMITTER = REGISTRY.register("wireless_transmitter", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new WirelessTransmitterContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> STORAGE_MONITOR = REGISTRY.register("storage_monitor", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new StorageMonitorContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> CONSTRUCTOR = REGISTRY.register("constructor", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new ConstructorContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> DESTRUCTOR = REGISTRY.register("destructor", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new DestructorContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> DISK_MANIPULATOR = REGISTRY.register("disk_manipulator", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new DiskManipulatorContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> CRAFTER = REGISTRY.register("crafter", () -> IForgeMenuType.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new CrafterContainerMenu(blockEntity, inv.player, windowId)))); - public static final RegistryObject> CRAFTER_MANAGER = REGISTRY.register("crafter_manager", () -> IForgeMenuType.create(new CrafterManagerContainerFactory())); - public static final RegistryObject> CRAFTING_MONITOR = REGISTRY.register("crafting_monitor", () -> IForgeMenuType.create(new CraftingMonitorContainerFactory())); - public static final RegistryObject> WIRELESS_CRAFTING_MONITOR = REGISTRY.register("wireless_crafting_monitor", () -> IForgeMenuType.create(new WirelessCraftingMonitorContainerFactory())); + public static final DeferredHolder, MenuType> + CONTROLLER = REGISTRY.register("controller", () -> IMenuTypeExtension.create(((windowId, inv, data) -> new ControllerContainerMenu(null, inv.player, windowId)))); + public static final DeferredHolder, MenuType> GRID = REGISTRY.register("grid", () -> IMenuTypeExtension.create(new GridContainerFactory())); + public static final DeferredHolder, MenuType> DETECTOR = REGISTRY.register("detector", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new DetectorContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> EXPORTER = REGISTRY.register("exporter", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new ExporterContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> EXTERNAL_STORAGE = REGISTRY.register("external_storage", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new ExternalStorageContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> FILTER = REGISTRY.register("filter", () -> IMenuTypeExtension.create((windowId, inv, data) -> new FilterContainerMenu(inv.player, inv.getSelected(), windowId))); + public static final DeferredHolder, MenuType> IMPORTER = REGISTRY.register("importer", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new ImporterContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> NETWORK_TRANSMITTER = REGISTRY.register("network_transmitter", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new NetworkTransmitterContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> RELAY = REGISTRY.register("relay", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new RelayContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> DISK_DRIVE = REGISTRY.register("disk_drive", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new DiskDriveContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> STORAGE_BLOCK = REGISTRY.register("storage_block", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new StorageContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> FLUID_STORAGE_BLOCK = REGISTRY.register("fluid_storage_block", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new FluidStorageContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> SECURITY_MANAGER = REGISTRY.register("security_manager", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new SecurityManagerContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> INTERFACE = REGISTRY.register("interface", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new InterfaceContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> FLUID_INTERFACE = REGISTRY.register("fluid_interface", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new FluidInterfaceContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> WIRELESS_TRANSMITTER = REGISTRY.register("wireless_transmitter", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new WirelessTransmitterContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> STORAGE_MONITOR = REGISTRY.register("storage_monitor", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new StorageMonitorContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> CONSTRUCTOR = REGISTRY.register("constructor", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new ConstructorContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> DESTRUCTOR = REGISTRY.register("destructor", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new DestructorContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> DISK_MANIPULATOR = REGISTRY.register("disk_manipulator", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new DiskManipulatorContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> CRAFTER = REGISTRY.register("crafter", () -> IMenuTypeExtension.create(new BlockEntityContainerFactory((windowId, inv, blockEntity) -> new CrafterContainerMenu(blockEntity, inv.player, windowId)))); + public static final DeferredHolder, MenuType> CRAFTER_MANAGER = REGISTRY.register("crafter_manager", () -> IMenuTypeExtension.create(new CrafterManagerContainerFactory())); + public static final DeferredHolder, MenuType> CRAFTING_MONITOR = REGISTRY.register("crafting_monitor", () -> IMenuTypeExtension.create(new CraftingMonitorContainerFactory())); + public static final DeferredHolder, MenuType> WIRELESS_CRAFTING_MONITOR = REGISTRY.register("wireless_crafting_monitor", () -> IMenuTypeExtension.create(new WirelessCraftingMonitorContainerFactory())); private RSContainerMenus() { } diff --git a/src/main/java/com/refinedmods/refinedstorage/RSCreativeModeTabItems.java b/src/main/java/com/refinedmods/refinedstorage/RSCreativeModeTabItems.java index afb7132236..02fc09a42e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSCreativeModeTabItems.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSCreativeModeTabItems.java @@ -5,20 +5,22 @@ import com.refinedmods.refinedstorage.apiimpl.storage.ItemStorageType; import com.refinedmods.refinedstorage.item.*; import com.refinedmods.refinedstorage.util.ColorMap; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.*; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.RegisterEvent; -import net.minecraftforge.registries.RegistryObject; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.RegisterEvent; public class RSCreativeModeTabItems { private RSCreativeModeTabItems() { } public static void register(RegisterEvent.RegisterHelper helper) { - helper.register("general", CreativeModeTab.builder() + helper.register(new ResourceLocation(RS.ID, "general"), CreativeModeTab.builder() .title(Component.translatable("itemGroup.refinedstorage")) .icon(() -> new ItemStack(RSBlocks.CREATIVE_CONTROLLER.get(ColorMap.DEFAULT_COLOR).get())) .displayItems((params, output) -> RSCreativeModeTabItems.append(output)) @@ -129,7 +131,7 @@ private static void addCovers(CreativeModeTab.Output output) { addCovers(output, coverExampleStack); return; } - for (Block block : ForgeRegistries.BLOCKS.getValues()) { + for (Block block : BuiltInRegistries.BLOCK) { Item item = Item.byBlock(block); if (item == Items.AIR) { continue; @@ -150,12 +152,12 @@ private static void addCovers(CreativeModeTab.Output output, ItemStack coverExam output.accept(hollowCoverStack); } - private static void add(CreativeModeTab.Output output, ColorMap cm) { + private static void add(CreativeModeTab.Output output, ColorMap cm) { cm.values().forEach(c -> add(output, c)); } private static void add(CreativeModeTab.Output output, ItemStorageType type) { - RegistryObject part = RSItems.ITEM_STORAGE_PARTS.get(type); + DeferredHolder part = RSItems.ITEM_STORAGE_PARTS.get(type); if (part != null) { add(output, part); } @@ -171,7 +173,7 @@ private static void addStorageBlock(CreativeModeTab.Output output, FluidStorageT } private static void add(CreativeModeTab.Output output, FluidStorageType type) { - RegistryObject part = RSItems.FLUID_STORAGE_PARTS.get(type); + DeferredHolder part = RSItems.FLUID_STORAGE_PARTS.get(type); if (part != null) { add(output, part); } @@ -182,7 +184,7 @@ private static void add(CreativeModeTab.Output output, UpgradeItem.Type type) { add(output, RSItems.UPGRADE_ITEMS.get(type)); } - private static void add(CreativeModeTab.Output output, RegistryObject ro) { + private static void add(CreativeModeTab.Output output, DeferredHolder ro) { output.accept(ro.get()); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/RSItems.java b/src/main/java/com/refinedmods/refinedstorage/RSItems.java index f28b162aa3..e93a60fa32 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSItems.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSItems.java @@ -3,93 +3,131 @@ import com.refinedmods.refinedstorage.apiimpl.storage.FluidStorageType; import com.refinedmods.refinedstorage.apiimpl.storage.ItemStorageType; import com.refinedmods.refinedstorage.block.BaseBlock; -import com.refinedmods.refinedstorage.item.*; -import com.refinedmods.refinedstorage.item.blockitem.*; +import com.refinedmods.refinedstorage.item.CoreItem; +import com.refinedmods.refinedstorage.item.CoverItem; +import com.refinedmods.refinedstorage.item.FilterItem; +import com.refinedmods.refinedstorage.item.FluidStorageDiskItem; +import com.refinedmods.refinedstorage.item.FluidStoragePartItem; +import com.refinedmods.refinedstorage.item.HollowCoverItem; +import com.refinedmods.refinedstorage.item.NetworkCardItem; +import com.refinedmods.refinedstorage.item.PatternItem; +import com.refinedmods.refinedstorage.item.ProcessorBindingItem; +import com.refinedmods.refinedstorage.item.ProcessorItem; +import com.refinedmods.refinedstorage.item.QuartzEnrichedIronItem; +import com.refinedmods.refinedstorage.item.SecurityCardItem; +import com.refinedmods.refinedstorage.item.SiliconItem; +import com.refinedmods.refinedstorage.item.StorageDiskItem; +import com.refinedmods.refinedstorage.item.StorageHousingItem; +import com.refinedmods.refinedstorage.item.StoragePartItem; +import com.refinedmods.refinedstorage.item.UpgradeItem; +import com.refinedmods.refinedstorage.item.WirelessCraftingMonitorItem; +import com.refinedmods.refinedstorage.item.WirelessFluidGridItem; +import com.refinedmods.refinedstorage.item.WirelessGridItem; +import com.refinedmods.refinedstorage.item.WrenchItem; +import com.refinedmods.refinedstorage.item.blockitem.BaseBlockItem; +import com.refinedmods.refinedstorage.item.blockitem.ControllerBlockItem; +import com.refinedmods.refinedstorage.item.blockitem.FluidStorageBlockItem; +import com.refinedmods.refinedstorage.item.blockitem.PortableGridBlockItem; +import com.refinedmods.refinedstorage.item.blockitem.StorageBlockItem; import com.refinedmods.refinedstorage.util.BlockUtils; import com.refinedmods.refinedstorage.util.ColorMap; +import com.refinedmods.refinedstorage.util.ItemColorMap; +import java.util.ArrayList; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.RegistryObject; - -import java.util.*; +import net.minecraft.world.level.block.Block; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; public final class RSItems { - public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, RS.ID); - - public static final RegistryObject QUARTZ_ENRICHED_IRON; - public static final RegistryObject SILICON; - public static final RegistryObject PROCESSOR_BINDING; - public static final RegistryObject WRENCH; - public static final RegistryObject PATTERN; - public static final RegistryObject FILTER; - public static final RegistryObject STORAGE_HOUSING; - public static final RegistryObject NETWORK_CARD; - public static final RegistryObject SECURITY_CARD; - public static final RegistryObject CONSTRUCTION_CORE; - public static final RegistryObject DESTRUCTION_CORE; - public static final RegistryObject WIRELESS_GRID; - public static final RegistryObject CREATIVE_WIRELESS_GRID; - public static final RegistryObject WIRELESS_FLUID_GRID; - public static final RegistryObject CREATIVE_WIRELESS_FLUID_GRID; - public static final RegistryObject PORTABLE_GRID; - public static final RegistryObject CREATIVE_PORTABLE_GRID; - public static final RegistryObject WIRELESS_CRAFTING_MONITOR; - public static final RegistryObject CREATIVE_WIRELESS_CRAFTING_MONITOR; - public static final RegistryObject MACHINE_CASING; - public static final RegistryObject COVER; - public static final RegistryObject HOLLOW_COVER; - public static final RegistryObject QUARTZ_ENRICHED_IRON_BLOCK; - public static final RegistryObject CABLE; - public static final RegistryObject DISK_DRIVE; - public static final RegistryObject EXTERNAL_STORAGE; - public static final RegistryObject IMPORTER; - public static final RegistryObject EXPORTER; - public static final RegistryObject INTERFACE; - public static final RegistryObject FLUID_INTERFACE; - public static final RegistryObject STORAGE_MONITOR; - public static final RegistryObject CONSTRUCTOR; - public static final RegistryObject DESTRUCTOR; - - public static final Map> PROCESSORS = new EnumMap<>(ProcessorItem.Type.class); - - public static final Map> ITEM_STORAGE_PARTS = new EnumMap<>(ItemStorageType.class); - public static final Map> ITEM_STORAGE_DISKS = new EnumMap<>(ItemStorageType.class); - public static final Map> STORAGE_BLOCKS = new EnumMap<>(ItemStorageType.class); - - public static final Map> FLUID_STORAGE_PARTS = new EnumMap<>(FluidStorageType.class); - public static final Map> FLUID_STORAGE_DISKS = new EnumMap<>(FluidStorageType.class); - public static final Map> FLUID_STORAGE_BLOCKS = new EnumMap<>(FluidStorageType.class); - - public static final Map> UPGRADE_ITEMS = new EnumMap<>(UpgradeItem.Type.class); - - public static final Map, ColorMap> COLORED_ITEM_TAGS = new HashMap<>(); + public static final DeferredRegister ITEMS = DeferredRegister.create(BuiltInRegistries.ITEM, RS.ID); + + public static final DeferredHolder QUARTZ_ENRICHED_IRON; + public static final DeferredHolder SILICON; + public static final DeferredHolder PROCESSOR_BINDING; + public static final DeferredHolder WRENCH; + public static final DeferredHolder PATTERN; + public static final DeferredHolder FILTER; + public static final DeferredHolder STORAGE_HOUSING; + public static final DeferredHolder NETWORK_CARD; + public static final DeferredHolder SECURITY_CARD; + public static final DeferredHolder CONSTRUCTION_CORE; + public static final DeferredHolder DESTRUCTION_CORE; + public static final DeferredHolder WIRELESS_GRID; + public static final DeferredHolder CREATIVE_WIRELESS_GRID; + public static final DeferredHolder WIRELESS_FLUID_GRID; + public static final DeferredHolder CREATIVE_WIRELESS_FLUID_GRID; + public static final DeferredHolder PORTABLE_GRID; + public static final DeferredHolder CREATIVE_PORTABLE_GRID; + public static final DeferredHolder WIRELESS_CRAFTING_MONITOR; + public static final DeferredHolder CREATIVE_WIRELESS_CRAFTING_MONITOR; + public static final DeferredHolder MACHINE_CASING; + public static final DeferredHolder COVER; + public static final DeferredHolder HOLLOW_COVER; + public static final DeferredHolder QUARTZ_ENRICHED_IRON_BLOCK; + public static final DeferredHolder CABLE; + public static final DeferredHolder DISK_DRIVE; + public static final DeferredHolder EXTERNAL_STORAGE; + public static final DeferredHolder IMPORTER; + public static final DeferredHolder EXPORTER; + public static final DeferredHolder INTERFACE; + public static final DeferredHolder FLUID_INTERFACE; + public static final DeferredHolder STORAGE_MONITOR; + public static final DeferredHolder CONSTRUCTOR; + public static final DeferredHolder DESTRUCTOR; + + public static final Map> PROCESSORS = + new EnumMap<>(ProcessorItem.Type.class); + + public static final Map> ITEM_STORAGE_PARTS = + new EnumMap<>(ItemStorageType.class); + public static final Map> ITEM_STORAGE_DISKS = + new EnumMap<>(ItemStorageType.class); + public static final Map> STORAGE_BLOCKS = + new EnumMap<>(ItemStorageType.class); + + public static final Map> FLUID_STORAGE_PARTS = + new EnumMap<>(FluidStorageType.class); + public static final Map> FLUID_STORAGE_DISKS = + new EnumMap<>(FluidStorageType.class); + public static final Map> FLUID_STORAGE_BLOCKS = + new EnumMap<>(FluidStorageType.class); + + public static final Map> UPGRADE_ITEMS = + new EnumMap<>(UpgradeItem.Type.class); + + public static final Map, ColorMap> COLORED_ITEM_TAGS = new HashMap<>(); private static final List LATE_REGISTRATION = new ArrayList<>(); - public static final ColorMap CRAFTER = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap RELAY = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap NETWORK_TRANSMITTER = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap NETWORK_RECEIVER = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap CONTROLLER = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap CREATIVE_CONTROLLER = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap GRID = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap CRAFTING_GRID = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap PATTERN_GRID = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap FLUID_GRID = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap SECURITY_MANAGER = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap WIRELESS_TRANSMITTER = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap DISK_MANIPULATOR = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap CRAFTER_MANAGER = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap CRAFTING_MONITOR = new ColorMap<>(ITEMS, LATE_REGISTRATION); - public static final ColorMap DETECTOR = new ColorMap<>(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap CRAFTER = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap RELAY = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap NETWORK_TRANSMITTER = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap NETWORK_RECEIVER = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ColorMap CONTROLLER = new ColorMap<>(ITEMS, LATE_REGISTRATION); + public static final ColorMap CREATIVE_CONTROLLER = new ColorMap<>(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap GRID = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap CRAFTING_GRID = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap PATTERN_GRID = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap FLUID_GRID = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap SECURITY_MANAGER = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap WIRELESS_TRANSMITTER = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap DISK_MANIPULATOR = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap CRAFTER_MANAGER = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap CRAFTING_MONITOR = new ItemColorMap(ITEMS, LATE_REGISTRATION); + public static final ItemColorMap DETECTOR = new ItemColorMap(ITEMS, LATE_REGISTRATION); static { CONSTRUCTION_CORE = ITEMS.register("construction_core", CoreItem::new); @@ -110,28 +148,35 @@ public final class RSItems { ITEM_STORAGE_PARTS.put(type, ITEMS.register(type.getName() + "_storage_part", StoragePartItem::new)); } - ITEM_STORAGE_DISKS.put(type, ITEMS.register(type.getName() + "_storage_disk", () -> new StorageDiskItem(type))); + ITEM_STORAGE_DISKS.put(type, + ITEMS.register(type.getName() + "_storage_disk", () -> new StorageDiskItem(type))); } for (FluidStorageType type : FluidStorageType.values()) { if (type != FluidStorageType.CREATIVE) { - FLUID_STORAGE_PARTS.put(type, ITEMS.register(type.getName() + "_fluid_storage_part", FluidStoragePartItem::new)); + FLUID_STORAGE_PARTS.put(type, + ITEMS.register(type.getName() + "_fluid_storage_part", FluidStoragePartItem::new)); } - FLUID_STORAGE_DISKS.put(type, ITEMS.register(type.getName() + "_fluid_storage_disk", () -> new FluidStorageDiskItem(type))); + FLUID_STORAGE_DISKS.put(type, + ITEMS.register(type.getName() + "_fluid_storage_disk", () -> new FluidStorageDiskItem(type))); } STORAGE_HOUSING = ITEMS.register("storage_housing", StorageHousingItem::new); for (UpgradeItem.Type type : UpgradeItem.Type.values()) { - UPGRADE_ITEMS.put(type, ITEMS.register(type == UpgradeItem.Type.NORMAL ? "upgrade" : type.getName() + "_upgrade", () -> new UpgradeItem(type))); + UPGRADE_ITEMS.put(type, + ITEMS.register(type == UpgradeItem.Type.NORMAL ? "upgrade" : type.getName() + "_upgrade", + () -> new UpgradeItem(type))); } WRENCH = ITEMS.register("wrench", WrenchItem::new); PATTERN = ITEMS.register("pattern", PatternItem::new); FILTER = ITEMS.register("filter", FilterItem::new); - PORTABLE_GRID = ITEMS.register("portable_grid", () -> new PortableGridBlockItem(PortableGridBlockItem.Type.NORMAL)); - CREATIVE_PORTABLE_GRID = ITEMS.register("creative_portable_grid", () -> new PortableGridBlockItem(PortableGridBlockItem.Type.CREATIVE)); + PORTABLE_GRID = + ITEMS.register("portable_grid", () -> new PortableGridBlockItem(PortableGridBlockItem.Type.NORMAL)); + CREATIVE_PORTABLE_GRID = ITEMS.register("creative_portable_grid", + () -> new PortableGridBlockItem(PortableGridBlockItem.Type.CREATIVE)); QUARTZ_ENRICHED_IRON_BLOCK = registerBlockItemFor(RSBlocks.QUARTZ_ENRICHED_IRON); MACHINE_CASING = registerBlockItemFor(RSBlocks.MACHINE_CASING); @@ -141,11 +186,13 @@ public final class RSItems { DISK_DRIVE = registerBlockItemFor(RSBlocks.DISK_DRIVE); for (ItemStorageType type : ItemStorageType.values()) { - STORAGE_BLOCKS.put(type, ITEMS.register(RSBlocks.STORAGE_BLOCKS.get(type).getId().getPath(), () -> new StorageBlockItem(RSBlocks.STORAGE_BLOCKS.get(type).get()))); + STORAGE_BLOCKS.put(type, ITEMS.register(RSBlocks.STORAGE_BLOCKS.get(type).getId().getPath(), + () -> new StorageBlockItem(RSBlocks.STORAGE_BLOCKS.get(type).get()))); } for (FluidStorageType type : FluidStorageType.values()) { - FLUID_STORAGE_BLOCKS.put(type, ITEMS.register(RSBlocks.FLUID_STORAGE_BLOCKS.get(type).getId().getPath(), () -> new FluidStorageBlockItem(RSBlocks.FLUID_STORAGE_BLOCKS.get(type).get()))); + FLUID_STORAGE_BLOCKS.put(type, ITEMS.register(RSBlocks.FLUID_STORAGE_BLOCKS.get(type).getId().getPath(), + () -> new FluidStorageBlockItem(RSBlocks.FLUID_STORAGE_BLOCKS.get(type).get()))); } EXTERNAL_STORAGE = registerBlockItemFor(RSBlocks.EXTERNAL_STORAGE); @@ -174,18 +221,28 @@ public final class RSItems { ) )); - COLORED_ITEM_TAGS.put(ItemTags.create(new ResourceLocation(RS.ID, CONTROLLER.get(ColorMap.DEFAULT_COLOR).getId().getPath())), CONTROLLER); + COLORED_ITEM_TAGS.put( + ItemTags.create(new ResourceLocation(RS.ID, CONTROLLER.get(ColorMap.DEFAULT_COLOR).getId().getPath())), + CONTROLLER + ); LATE_REGISTRATION.add(() -> { RSBlocks.CONTROLLER.forEach((color, block) -> { if (color != ColorMap.DEFAULT_COLOR) { - CONTROLLER.put(color, ITEMS.register(RSBlocks.CONTROLLER.get(color).getId().getPath(), () -> new ControllerBlockItem(RSBlocks.CONTROLLER.get(color).get(), color, Component.translatable(RSBlocks.CONTROLLER.get(ColorMap.DEFAULT_COLOR).get().getDescriptionId())))); + CONTROLLER.put(color, ITEMS.register(RSBlocks.CONTROLLER.get(color).getId().getPath(), + () -> new ControllerBlockItem(RSBlocks.CONTROLLER.get(color).get(), color, + Component.translatable( + RSBlocks.CONTROLLER.get(ColorMap.DEFAULT_COLOR).get().getDescriptionId())))); } }); RSBlocks.CREATIVE_CONTROLLER.forEach((color, block) -> { if (color != ColorMap.DEFAULT_COLOR) { - CREATIVE_CONTROLLER.put(color, ITEMS.register(RSBlocks.CREATIVE_CONTROLLER.get(color).getId().getPath(), () -> new ControllerBlockItem(RSBlocks.CREATIVE_CONTROLLER.get(color).get(), color, Component.translatable(RSBlocks.CREATIVE_CONTROLLER.get(ColorMap.DEFAULT_COLOR).get().getDescriptionId())))); + CREATIVE_CONTROLLER.put(color, + ITEMS.register(RSBlocks.CREATIVE_CONTROLLER.get(color).getId().getPath(), + () -> new ControllerBlockItem(RSBlocks.CREATIVE_CONTROLLER.get(color).get(), color, + Component.translatable(RSBlocks.CREATIVE_CONTROLLER.get(ColorMap.DEFAULT_COLOR).get() + .getDescriptionId())))); } }); }); @@ -206,11 +263,16 @@ public final class RSItems { CRAFTING_MONITOR.registerItemsFromBlocks(RSBlocks.CRAFTING_MONITOR); WIRELESS_GRID = ITEMS.register("wireless_grid", () -> new WirelessGridItem(WirelessGridItem.Type.NORMAL)); - CREATIVE_WIRELESS_GRID = ITEMS.register("creative_wireless_grid", () -> new WirelessGridItem(WirelessGridItem.Type.CREATIVE)); - WIRELESS_FLUID_GRID = ITEMS.register("wireless_fluid_grid", () -> new WirelessFluidGridItem(WirelessFluidGridItem.Type.NORMAL)); - CREATIVE_WIRELESS_FLUID_GRID = ITEMS.register("creative_wireless_fluid_grid", () -> new WirelessFluidGridItem(WirelessFluidGridItem.Type.CREATIVE)); - WIRELESS_CRAFTING_MONITOR = ITEMS.register("wireless_crafting_monitor", () -> new WirelessCraftingMonitorItem(WirelessCraftingMonitorItem.Type.NORMAL)); - CREATIVE_WIRELESS_CRAFTING_MONITOR = ITEMS.register("creative_wireless_crafting_monitor", () -> new WirelessCraftingMonitorItem(WirelessCraftingMonitorItem.Type.CREATIVE)); + CREATIVE_WIRELESS_GRID = + ITEMS.register("creative_wireless_grid", () -> new WirelessGridItem(WirelessGridItem.Type.CREATIVE)); + WIRELESS_FLUID_GRID = + ITEMS.register("wireless_fluid_grid", () -> new WirelessFluidGridItem(WirelessFluidGridItem.Type.NORMAL)); + CREATIVE_WIRELESS_FLUID_GRID = ITEMS.register("creative_wireless_fluid_grid", + () -> new WirelessFluidGridItem(WirelessFluidGridItem.Type.CREATIVE)); + WIRELESS_CRAFTING_MONITOR = ITEMS.register("wireless_crafting_monitor", + () -> new WirelessCraftingMonitorItem(WirelessCraftingMonitorItem.Type.NORMAL)); + CREATIVE_WIRELESS_CRAFTING_MONITOR = ITEMS.register("creative_wireless_crafting_monitor", + () -> new WirelessCraftingMonitorItem(WirelessCraftingMonitorItem.Type.CREATIVE)); LATE_REGISTRATION.forEach(Runnable::run); } @@ -218,11 +280,12 @@ public final class RSItems { private RSItems() { } - private static RegistryObject registerBlockItemFor(RegistryObject block) { + private static DeferredHolder registerBlockItemFor( + DeferredHolder block) { return ITEMS.register(block.getId().getPath(), () -> new BaseBlockItem(block.get(), new Item.Properties())); } - public static void register() { - ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus()); + public static void register(IEventBus bus) { + ITEMS.register(bus); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/RSKeyBindings.java b/src/main/java/com/refinedmods/refinedstorage/RSKeyBindings.java index 71eb85c9ce..858779596b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSKeyBindings.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSKeyBindings.java @@ -2,8 +2,8 @@ import com.mojang.blaze3d.platform.InputConstants; import net.minecraft.client.KeyMapping; -import net.minecraftforge.client.settings.KeyConflictContext; -import net.minecraftforge.client.settings.KeyModifier; +import net.neoforged.neoforge.client.settings.KeyConflictContext; +import net.neoforged.neoforge.client.settings.KeyModifier; import org.lwjgl.glfw.GLFW; public final class RSKeyBindings { diff --git a/src/main/java/com/refinedmods/refinedstorage/RSLootFunctions.java b/src/main/java/com/refinedmods/refinedstorage/RSLootFunctions.java index 0c8c38d813..bc3db50248 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSLootFunctions.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSLootFunctions.java @@ -4,6 +4,8 @@ import com.refinedmods.refinedstorage.loottable.CrafterLootFunction; import com.refinedmods.refinedstorage.loottable.PortableGridBlockLootFunction; import com.refinedmods.refinedstorage.loottable.StorageBlockLootFunction; + +import com.mojang.serialization.Codec; import net.minecraft.core.Registry; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; @@ -19,9 +21,16 @@ private RSLootFunctions() { } public static void register() { - STORAGE_BLOCK = Registry.register(BuiltInRegistries.LOOT_FUNCTION_TYPE, new ResourceLocation(RS.ID, "storage_block"), new LootItemFunctionType(new StorageBlockLootFunction.Serializer())); - PORTABLE_GRID = Registry.register(BuiltInRegistries.LOOT_FUNCTION_TYPE, new ResourceLocation(RS.ID, "portable_grid"), new LootItemFunctionType(new PortableGridBlockLootFunction.Serializer())); - CRAFTER = Registry.register(BuiltInRegistries.LOOT_FUNCTION_TYPE, new ResourceLocation(RS.ID, "crafter"), new LootItemFunctionType(new CrafterLootFunction.Serializer())); - CONTROLLER = Registry.register(BuiltInRegistries.LOOT_FUNCTION_TYPE, new ResourceLocation(RS.ID, "controller"), new LootItemFunctionType(new ControllerLootFunction.Serializer())); + STORAGE_BLOCK = + Registry.register(BuiltInRegistries.LOOT_FUNCTION_TYPE, new ResourceLocation(RS.ID, "storage_block"), + new LootItemFunctionType(Codec.unit(new StorageBlockLootFunction()))); + PORTABLE_GRID = + Registry.register(BuiltInRegistries.LOOT_FUNCTION_TYPE, new ResourceLocation(RS.ID, "portable_grid"), + new LootItemFunctionType( + Codec.unit(new PortableGridBlockLootFunction()))); + CRAFTER = Registry.register(BuiltInRegistries.LOOT_FUNCTION_TYPE, new ResourceLocation(RS.ID, "crafter"), + new LootItemFunctionType(Codec.unit(new CrafterLootFunction()))); + CONTROLLER = Registry.register(BuiltInRegistries.LOOT_FUNCTION_TYPE, new ResourceLocation(RS.ID, "controller"), + new LootItemFunctionType(Codec.unit(new ControllerLootFunction()))); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/RSRecipeSerializers.java b/src/main/java/com/refinedmods/refinedstorage/RSRecipeSerializers.java index 3f8cdf4b6f..70b2789440 100644 --- a/src/main/java/com/refinedmods/refinedstorage/RSRecipeSerializers.java +++ b/src/main/java/com/refinedmods/refinedstorage/RSRecipeSerializers.java @@ -3,12 +3,13 @@ import com.refinedmods.refinedstorage.recipe.CoverRecipe; import com.refinedmods.refinedstorage.recipe.HollowCoverRecipe; import com.refinedmods.refinedstorage.recipe.UpgradeWithEnchantedBookRecipeSerializer; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; +import net.neoforged.neoforge.registries.DeferredRegister; public final class RSRecipeSerializers { - public static final DeferredRegister> REGISTRY = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, RS.ID); + public static final DeferredRegister> REGISTRY = DeferredRegister.create(BuiltInRegistries.RECIPE_SERIALIZER, RS.ID); static { REGISTRY.register("upgrade_with_enchanted_book", UpgradeWithEnchantedBookRecipeSerializer::new); diff --git a/src/main/java/com/refinedmods/refinedstorage/api/IRSAPI.java b/src/main/java/com/refinedmods/refinedstorage/api/IRSAPI.java index b36710c9ec..73bb08001b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/IRSAPI.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/IRSAPI.java @@ -26,8 +26,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingManager.java b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingManager.java index c5d8d43514..6ebd90e923 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingManager.java @@ -6,9 +6,8 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.*; diff --git a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingPattern.java b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingPattern.java index 0ac124e142..7169088d78 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingPattern.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingPattern.java @@ -6,8 +6,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingPatternContainer.java b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingPatternContainer.java index 12759c578a..3cf95eedc7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingPatternContainer.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/ICraftingPatternContainer.java @@ -6,10 +6,10 @@ import net.minecraft.network.chat.Component; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import org.apache.logging.log4j.LogManager; import javax.annotation.Nullable; diff --git a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/craftingmonitor/ICraftingMonitorElement.java b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/craftingmonitor/ICraftingMonitorElement.java index bf619963cb..addae1be0d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/craftingmonitor/ICraftingMonitorElement.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/craftingmonitor/ICraftingMonitorElement.java @@ -6,9 +6,8 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; - +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; import java.util.Collections; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/ICraftingPreviewElement.java b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/ICraftingPreviewElement.java index d6de2f6c1e..7fac152330 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/ICraftingPreviewElement.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/ICraftingPreviewElement.java @@ -4,8 +4,8 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; /** * Represents a crafting preview element. diff --git a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/task/ICraftingRequestInfo.java b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/task/ICraftingRequestInfo.java index 2e2dd66db7..81f3a44f05 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/task/ICraftingRequestInfo.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/task/ICraftingRequestInfo.java @@ -2,8 +2,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; /** diff --git a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/task/ICraftingTask.java b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/task/ICraftingTask.java index 0b9a9e0f1e..c144932e5c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/task/ICraftingTask.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/task/ICraftingTask.java @@ -5,8 +5,7 @@ import com.refinedmods.refinedstorage.api.network.INetwork; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.List; import java.util.UUID; diff --git a/src/main/java/com/refinedmods/refinedstorage/api/network/INetwork.java b/src/main/java/com/refinedmods/refinedstorage/api/network/INetwork.java index 5d61ac0f8d..81a524068c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/network/INetwork.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/network/INetwork.java @@ -14,9 +14,8 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.energy.IEnergyStorage; +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import java.util.function.Predicate; diff --git a/src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGrid.java b/src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGrid.java index 6267710b2e..57e908c228 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGrid.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGrid.java @@ -12,8 +12,7 @@ import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nullable; import java.util.List; @@ -29,9 +28,6 @@ public interface IGrid { int SORTING_TYPE_QUANTITY = 0; int SORTING_TYPE_NAME = 1; int SORTING_TYPE_ID = 2; - // todo: remove in 1.21.x - @Deprecated - int SORTING_TYPE_INVENTORYTWEAKS = 3; int SORTING_TYPE_LAST_MODIFIED = 4; int SEARCH_BOX_MODE_NORMAL = 0; @@ -82,7 +78,6 @@ static boolean isValidSortingType(int type) { return type == SORTING_TYPE_QUANTITY || type == SORTING_TYPE_NAME || type == SORTING_TYPE_ID || - type == SORTING_TYPE_INVENTORYTWEAKS || type == SORTING_TYPE_LAST_MODIFIED; } diff --git a/src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGridTab.java b/src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGridTab.java index 6b18dfbeb8..5282247578 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGridTab.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/network/grid/IGridTab.java @@ -5,8 +5,7 @@ import net.minecraft.client.gui.Font; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.List; /** diff --git a/src/main/java/com/refinedmods/refinedstorage/api/render/IElementDrawer.java b/src/main/java/com/refinedmods/refinedstorage/api/render/IElementDrawer.java index a42d215d7e..7c67b16167 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/render/IElementDrawer.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/render/IElementDrawer.java @@ -6,7 +6,7 @@ * This {@link FunctionalInterface} is used to define a draw/render function. * This function use x and y coords and the element to draw. * - * @param the element to draw, usually {@link String}, {@link net.minecraft.world.item.ItemStack} or {@link net.minecraftforge.fluids.FluidStack} + * @param the element to draw, usually {@link String}, {@link net.minecraft.world.item.ItemStack} or {@link net.neoforged.neoforge.fluids.FluidStack} */ @FunctionalInterface public interface IElementDrawer { diff --git a/src/main/java/com/refinedmods/refinedstorage/api/render/IElementDrawers.java b/src/main/java/com/refinedmods/refinedstorage/api/render/IElementDrawers.java index 16b3607ba1..ec21cc40ab 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/render/IElementDrawers.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/render/IElementDrawers.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.api.render; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; /** * Interface specifying default element drawers. diff --git a/src/main/java/com/refinedmods/refinedstorage/api/storage/IStorageProvider.java b/src/main/java/com/refinedmods/refinedstorage/api/storage/IStorageProvider.java index 672bbb50dd..04f227bcc4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/storage/IStorageProvider.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/storage/IStorageProvider.java @@ -1,8 +1,7 @@ package com.refinedmods.refinedstorage.api.storage; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.List; /** diff --git a/src/main/java/com/refinedmods/refinedstorage/api/storage/cache/IStorageCache.java b/src/main/java/com/refinedmods/refinedstorage/api/storage/cache/IStorageCache.java index 193edfb69e..d7d63df90d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/storage/cache/IStorageCache.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/storage/cache/IStorageCache.java @@ -5,6 +5,7 @@ import com.refinedmods.refinedstorage.api.storage.IStorageProvider; import com.refinedmods.refinedstorage.api.util.Action; import com.refinedmods.refinedstorage.api.util.IStackList; +import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; import javax.annotation.Nonnull; import java.util.List; @@ -94,6 +95,11 @@ public interface IStorageCache { */ IStackList getCraftablesList(); + /** + * @return grid stacks to sync initially + */ + List getGridStacks(); + /** * @return the storages connected to this network */ diff --git a/src/main/java/com/refinedmods/refinedstorage/api/storage/externalstorage/IExternalStorageContext.java b/src/main/java/com/refinedmods/refinedstorage/api/storage/externalstorage/IExternalStorageContext.java index 8c0afd066b..4533409257 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/storage/externalstorage/IExternalStorageContext.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/storage/externalstorage/IExternalStorageContext.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage.api.storage.AccessType; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; /** * Provides information about an external storage. diff --git a/src/main/java/com/refinedmods/refinedstorage/api/storage/externalstorage/IExternalStorageProvider.java b/src/main/java/com/refinedmods/refinedstorage/api/storage/externalstorage/IExternalStorageProvider.java index 9e642dfd0b..9c9cb360f4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/storage/externalstorage/IExternalStorageProvider.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/storage/externalstorage/IExternalStorageProvider.java @@ -1,10 +1,12 @@ package com.refinedmods.refinedstorage.api.storage.externalstorage; +import javax.annotation.Nonnull; + +import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; -import javax.annotation.Nonnull; - /** * Provides an external storage handler to the external storage block. * @@ -12,11 +14,11 @@ */ public interface IExternalStorageProvider { /** - * @param blockEntity the block entity - * @param direction the direction of the external storage + * @param level the level + * @param pos the position * @return true if the provider can provide, false otherwise */ - boolean canProvide(BlockEntity blockEntity, Direction direction); + boolean canProvide(Level level, BlockPos pos, Direction direction); /** * @param context the context of the external storage @@ -30,7 +32,7 @@ public interface IExternalStorageProvider { /** * Returns the priority of this external storage provider. * The one with the highest priority is chosen. - * Refined Storage's default handlers for {@link net.minecraftforge.items.IItemHandler} and {@link net.minecraftforge.fluids.capability.IFluidHandler} return 0. + * Refined Storage's default handlers for {@link net.neoforged.neoforge.items.IItemHandler} and {@link net.neoforged.neoforge.fluids.capability.IFluidHandler} return 0. * This value can't be dynamic (only fixed), since the sorted order is cached. * * @return the priority diff --git a/src/main/java/com/refinedmods/refinedstorage/api/util/IComparer.java b/src/main/java/com/refinedmods/refinedstorage/api/util/IComparer.java index f2f57fae58..0569eef447 100644 --- a/src/main/java/com/refinedmods/refinedstorage/api/util/IComparer.java +++ b/src/main/java/com/refinedmods/refinedstorage/api/util/IComparer.java @@ -1,8 +1,7 @@ package com.refinedmods.refinedstorage.api.util; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; /** diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/API.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/API.java index 97e8af8eb9..1583f4ed2b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/API.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/API.java @@ -34,32 +34,45 @@ import com.refinedmods.refinedstorage.apiimpl.network.NetworkNodeRegistry; import com.refinedmods.refinedstorage.apiimpl.network.grid.CraftingGridBehavior; import com.refinedmods.refinedstorage.apiimpl.network.grid.GridManager; -import com.refinedmods.refinedstorage.apiimpl.storage.disk.*; +import com.refinedmods.refinedstorage.apiimpl.storage.disk.FluidStorageDisk; +import com.refinedmods.refinedstorage.apiimpl.storage.disk.ItemStorageDisk; +import com.refinedmods.refinedstorage.apiimpl.storage.disk.StorageDiskManager; +import com.refinedmods.refinedstorage.apiimpl.storage.disk.StorageDiskRegistry; +import com.refinedmods.refinedstorage.apiimpl.storage.disk.StorageDiskSync; import com.refinedmods.refinedstorage.apiimpl.storage.tracker.StorageTrackerManager; import com.refinedmods.refinedstorage.apiimpl.util.Comparer; import com.refinedmods.refinedstorage.apiimpl.util.FluidStackList; import com.refinedmods.refinedstorage.apiimpl.util.ItemStackList; import com.refinedmods.refinedstorage.apiimpl.util.QuantityFormatter; import com.refinedmods.refinedstorage.util.StackUtils; + +import java.lang.reflect.Field; +import java.util.Collection; +import java.util.Collections; +import java.util.EnumMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fml.ModList; -import net.minecraftforge.forgespi.language.ModFileScanData; -import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraft.world.level.saveddata.SavedData; +import net.neoforged.fml.ModList; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.ItemHandlerHelper; +import net.neoforged.neoforgespi.language.ModFileScanData; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.objectweb.asm.Type; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.lang.reflect.Field; -import java.util.*; - public class API implements IRSAPI { private static final Logger LOGGER = LogManager.getLogger(API.class); @@ -75,7 +88,8 @@ public class API implements IRSAPI { private final ICraftingGridBehavior craftingGridBehavior = new CraftingGridBehavior(); private final IStorageDiskRegistry storageDiskRegistry = new StorageDiskRegistry(); private final IStorageDiskSync storageDiskSync = new StorageDiskSync(); - private final Map>> externalStorageProviders = new EnumMap<>(StorageType.class); + private final Map>> externalStorageProviders = + new EnumMap<>(StorageType.class); private final List patternRenderHandlers = new LinkedList<>(); public static IRSAPI instance() { @@ -103,8 +117,10 @@ public static void deliver() { } LOGGER.info("Injected RS API in {} {}", annotation.clazz().getClassName(), annotation.memberName()); - } catch (ClassNotFoundException | IllegalAccessException | IllegalArgumentException | NoSuchFieldException | SecurityException e) { - LOGGER.error("Could not inject RS API in {} {}", annotation.clazz().getClassName(), annotation.memberName(), e); + } catch (ClassNotFoundException | IllegalAccessException | IllegalArgumentException | NoSuchFieldException | + SecurityException e) { + LOGGER.error("Could not inject RS API in {} {}", annotation.clazz().getClassName(), + annotation.memberName(), e); } } } @@ -129,20 +145,26 @@ public INetworkNodeRegistry getNetworkNodeRegistry() { @Override public INetworkNodeManager getNetworkNodeManager(ServerLevel level) { - return level.getDataStorage().computeIfAbsent(tag -> { - NetworkNodeManager manager = new NetworkNodeManager(level); - manager.load(tag); - return manager; - }, () -> new NetworkNodeManager(level), NetworkNodeManager.NAME); + return level.getDataStorage().computeIfAbsent(new SavedData.Factory<>( + () -> new NetworkNodeManager(level), + tag -> { + NetworkNodeManager manager = new NetworkNodeManager(level); + manager.load(tag); + return manager; + } + ), NetworkNodeManager.NAME); } @Override public INetworkManager getNetworkManager(ServerLevel level) { - return level.getDataStorage().computeIfAbsent(tag -> { - NetworkManager manager = new NetworkManager(level); - manager.load(tag); - return manager; - }, () -> new NetworkManager(level), NetworkManager.NAME); + return level.getDataStorage().computeIfAbsent(new SavedData.Factory<>( + () -> new NetworkManager(level), + tag -> { + NetworkManager manager = new NetworkManager(level); + manager.load(tag); + return manager; + } + ), NetworkManager.NAME); } @Override @@ -204,11 +226,14 @@ public IStorageDiskRegistry getStorageDiskRegistry() { public IStorageDiskManager getStorageDiskManager(ServerLevel level) { ServerLevel overworld = level.getServer().overworld(); // Get the overworld - return overworld.getDataStorage().computeIfAbsent(tag -> { - StorageDiskManager manager = new StorageDiskManager(overworld); - manager.load(tag); - return manager; - }, () -> new StorageDiskManager(overworld), StorageDiskManager.NAME); + return overworld.getDataStorage().computeIfAbsent(new SavedData.Factory<>( + () -> new StorageDiskManager(overworld), + tag -> { + StorageDiskManager manager = new StorageDiskManager(overworld); + manager.load(tag); + return manager; + } + ), StorageDiskManager.NAME); } @Nonnull @@ -221,17 +246,20 @@ public IStorageDiskSync getStorageDiskSync() { @Override public IStorageTrackerManager getStorageTrackerManager(ServerLevel level) { ServerLevel overworld = level.getServer().overworld(); // Get the overworld - - return overworld.getDataStorage().computeIfAbsent(tag -> { - StorageTrackerManager manager = new StorageTrackerManager(); - manager.load(tag); - return manager; - }, StorageTrackerManager::new, StorageTrackerManager.NAME); + return overworld.getDataStorage().computeIfAbsent(new SavedData.Factory<>( + StorageTrackerManager::new, + tag -> { + StorageTrackerManager manager = new StorageTrackerManager(); + manager.load(tag); + return manager; + } + ), StorageTrackerManager.NAME); } @Override public void addExternalStorageProvider(StorageType type, IExternalStorageProvider provider) { - externalStorageProviders.computeIfAbsent(type, k -> new TreeSet<>((a, b) -> Integer.compare(b.getPriority(), a.getPriority()))).add(provider); + externalStorageProviders.computeIfAbsent(type, + k -> new TreeSet<>((a, b) -> Integer.compare(b.getPriority(), a.getPriority()))).add(provider); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingManager.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingManager.java index a9f9460f3a..4a61a0095d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingManager.java @@ -18,8 +18,8 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.material.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPattern.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPattern.java index 271359091f..14ad3cb133 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPattern.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPattern.java @@ -15,8 +15,7 @@ import net.minecraft.world.inventory.TransientCraftingContainer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingRecipe; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternFactory.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternFactory.java index f09ed03a1b..e7f3ea4d40 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternFactory.java @@ -4,7 +4,20 @@ import com.refinedmods.refinedstorage.api.autocrafting.ICraftingPatternContainer; import com.refinedmods.refinedstorage.apiimpl.network.node.GridNetworkNode; import com.refinedmods.refinedstorage.item.PatternItem; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +import net.minecraft.core.Holder; import net.minecraft.core.NonNullList; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; @@ -12,16 +25,11 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingRecipe; +import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.tags.IReverseTag; - -import javax.annotation.Nullable; -import java.util.*; -import java.util.stream.Collectors; +import net.neoforged.neoforge.fluids.FluidStack; public class CraftingPatternFactory { public static final CraftingPatternFactory INSTANCE = new CraftingPatternFactory(); @@ -48,7 +56,8 @@ public ICraftingPattern create(Level level, ICraftingPatternContainer container, } if (outputs.isEmpty() && fluidOutputs.isEmpty()) { - throw new CraftingPatternFactoryException(Component.translatable("misc.refinedstorage.pattern.error.processing_no_outputs")); + throw new CraftingPatternFactoryException( + Component.translatable("misc.refinedstorage.pattern.error.processing_no_outputs")); } } else { CraftingContainer craftingContainer = new CraftingPattern.DummyCraftingContainer(); @@ -57,7 +66,9 @@ public ICraftingPattern create(Level level, ICraftingPatternContainer container, fillCraftingInputs(craftingContainer, stack, inputs, i); } - Optional foundRecipe = level.getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingContainer, level); + Optional foundRecipe = + level.getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftingContainer, level) + .map(RecipeHolder::value); if (foundRecipe.isPresent()) { recipe = foundRecipe.get(); @@ -72,10 +83,12 @@ public ICraftingPattern create(Level level, ICraftingPatternContainer container, modifyCraftingInputsToUseAlternatives(recipe, inputs); } } else { - throw new CraftingPatternFactoryException(Component.translatable("misc.refinedstorage.pattern.error.no_output")); + throw new CraftingPatternFactoryException( + Component.translatable("misc.refinedstorage.pattern.error.no_output")); } } else { - throw new CraftingPatternFactoryException(Component.translatable("misc.refinedstorage.pattern.error.recipe_does_not_exist")); + throw new CraftingPatternFactoryException( + Component.translatable("misc.refinedstorage.pattern.error.recipe_does_not_exist")); } } } catch (CraftingPatternFactoryException e) { @@ -93,7 +106,9 @@ public ICraftingPattern create(Level level, ICraftingPatternContainer container, ); } - private void fillProcessingInputs(int i, ItemStack stack, List> inputs, NonNullList outputs, @Nullable AllowedTagList allowedTagList) throws CraftingPatternFactoryException { + private void fillProcessingInputs(int i, ItemStack stack, List> inputs, + NonNullList outputs, @Nullable AllowedTagList allowedTagList) + throws CraftingPatternFactoryException { ItemStack input = PatternItem.getInputSlot(stack, i); if (input.isEmpty()) { @@ -104,13 +119,12 @@ private void fillProcessingInputs(int i, ItemStack stack, List tagsOfItem = ForgeRegistries.ITEMS - .tags() - .getReverseTag(input.getItem()) - .stream() - .flatMap(IReverseTag::getTagKeys) - .map(TagKey::location) - .collect(Collectors.toSet()); + Collection tagsOfItem = BuiltInRegistries.ITEM.getResourceKey(input.getItem()) + .flatMap(k -> BuiltInRegistries.ITEM.getHolder(k) + .map(holder -> holder.tags() + .map(TagKey::location) + .collect(Collectors.toSet()))) + .orElse(Collections.emptySet()); Set declaredAllowedTags = allowedTagList.getAllowedItemTags().get(i); for (ResourceLocation declaredAllowedTag : declaredAllowedTags) { @@ -123,8 +137,8 @@ private void fillProcessingInputs(int i, ItemStack stack, List tagKey = TagKey.create(ForgeRegistries.ITEMS.getRegistryKey(), declaredAllowedTag); - for (Item element : ForgeRegistries.ITEMS.tags().getTag(tagKey)) { + TagKey tagKey = TagKey.create(Registries.ITEM, declaredAllowedTag); + for (Holder element : BuiltInRegistries.ITEM.getTagOrEmpty(tagKey)) { possibilities.add(new ItemStack(element, input.getCount())); } } @@ -140,7 +154,10 @@ private void fillProcessingInputs(int i, ItemStack stack, List> fluidInputs, NonNullList fluidOutputs, @Nullable AllowedTagList allowedTagList) throws CraftingPatternFactoryException { + private void fillProcessingFluidInputs(int i, ItemStack stack, List> fluidInputs, + NonNullList fluidOutputs, + @Nullable AllowedTagList allowedTagList) + throws CraftingPatternFactoryException { FluidStack input = PatternItem.getFluidInputSlot(stack, i); if (input.isEmpty()) { fluidInputs.add(NonNullList.create()); @@ -150,13 +167,12 @@ private void fillProcessingFluidInputs(int i, ItemStack stack, List tagsOfFluid = ForgeRegistries.FLUIDS - .tags() - .getReverseTag(input.getFluid()) - .stream() - .flatMap(IReverseTag::getTagKeys) - .map(TagKey::location) - .collect(Collectors.toSet()); + Collection tagsOfFluid = BuiltInRegistries.FLUID.getResourceKey(input.getFluid()) + .flatMap(k -> BuiltInRegistries.FLUID.getHolder(k) + .map(holder -> holder.tags() + .map(TagKey::location) + .collect(Collectors.toSet()))) + .orElse(Collections.emptySet()); Set declaredAllowedTags = allowedTagList.getAllowedFluidTags().get(i); for (ResourceLocation declaredAllowedTag : declaredAllowedTags) { @@ -169,8 +185,9 @@ private void fillProcessingFluidInputs(int i, ItemStack stack, List tagKey = TagKey.create(ForgeRegistries.FLUIDS.getRegistryKey(), declaredAllowedTag); - for (Fluid element : ForgeRegistries.FLUIDS.tags().getTag(tagKey)) { + TagKey tagKey = + TagKey.create(Registries.FLUID, declaredAllowedTag); + for (Holder element : BuiltInRegistries.FLUID.getTagOrEmpty(tagKey)) { possibilities.add(new FluidStack(element, input.getAmount())); } } @@ -186,7 +203,8 @@ private void fillProcessingFluidInputs(int i, ItemStack stack, List> inputs, int i) { + private void fillCraftingInputs(CraftingContainer inv, ItemStack stack, List> inputs, + int i) { ItemStack input = PatternItem.getInputSlot(stack, i); inputs.add(input.isEmpty() ? NonNullList.create() : NonNullList.of(ItemStack.EMPTY, input)); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternInputs.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternInputs.java index c32b1d2b07..ed58821f8c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternInputs.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternInputs.java @@ -2,8 +2,7 @@ import net.minecraft.core.NonNullList; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.List; public class CraftingPatternInputs { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternOutputs.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternOutputs.java index 9fc2c94126..e42cb68335 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternOutputs.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/CraftingPatternOutputs.java @@ -2,7 +2,7 @@ import net.minecraft.core.NonNullList; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class CraftingPatternOutputs { private final NonNullList outputs; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/InvalidCraftingPattern.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/InvalidCraftingPattern.java index 549e4e98bf..6720a76091 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/InvalidCraftingPattern.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/InvalidCraftingPattern.java @@ -7,8 +7,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/craftingmonitor/FluidCraftingMonitorElement.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/craftingmonitor/FluidCraftingMonitorElement.java index e828e461a4..9704c85338 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/craftingmonitor/FluidCraftingMonitorElement.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/craftingmonitor/FluidCraftingMonitorElement.java @@ -12,10 +12,9 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.Collections; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/craftingmonitor/ItemCraftingMonitorElement.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/craftingmonitor/ItemCraftingMonitorElement.java index 0ef98d1045..bc13b076d4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/craftingmonitor/ItemCraftingMonitorElement.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/craftingmonitor/ItemCraftingMonitorElement.java @@ -14,9 +14,8 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; - +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; import javax.annotation.Nullable; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/preview/FluidCraftingPreviewElement.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/preview/FluidCraftingPreviewElement.java index 318dacdeaa..eeddf50626 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/preview/FluidCraftingPreviewElement.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/preview/FluidCraftingPreviewElement.java @@ -11,9 +11,9 @@ import net.minecraft.client.resources.language.I18n; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; +import net.neoforged.neoforge.fluids.FluidStack; public class FluidCraftingPreviewElement implements ICraftingPreviewElement { public static final ResourceLocation ID = new ResourceLocation(RS.ID, "fluid"); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/preview/ItemCraftingPreviewElement.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/preview/ItemCraftingPreviewElement.java index 543cef0b38..9abf686a19 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/preview/ItemCraftingPreviewElement.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/preview/ItemCraftingPreviewElement.java @@ -11,9 +11,9 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.items.ItemHandlerHelper; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.api.distmarker.OnlyIn; +import net.neoforged.neoforge.items.ItemHandlerHelper; public class ItemCraftingPreviewElement implements ICraftingPreviewElement { public static final ResourceLocation ID = new ResourceLocation(RS.ID, "item"); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/CraftingRequestInfo.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/CraftingRequestInfo.java index 6f1f0f51ae..6be68307ad 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/CraftingRequestInfo.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/CraftingRequestInfo.java @@ -5,8 +5,7 @@ import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; public class CraftingRequestInfo implements ICraftingRequestInfo { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/CraftingPatternInputs.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/CraftingPatternInputs.java index 5a97534bd5..501558980e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/CraftingPatternInputs.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/CraftingPatternInputs.java @@ -5,8 +5,7 @@ import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.core.NonNullList; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/CraftingTask.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/CraftingTask.java index 5c365fbded..aec43991ee 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/CraftingTask.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/CraftingTask.java @@ -24,8 +24,7 @@ import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.ArrayList; import java.util.List; import java.util.UUID; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/IoUtil.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/IoUtil.java index 4a6ef9aa9f..eb54562c5c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/IoUtil.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/IoUtil.java @@ -7,8 +7,7 @@ import com.refinedmods.refinedstorage.api.util.IStackList; import com.refinedmods.refinedstorage.api.util.StackListEntry; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/SerializationUtil.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/SerializationUtil.java index f483790c52..d6d371a74e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/SerializationUtil.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/SerializationUtil.java @@ -15,7 +15,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class SerializationUtil { private static final String NBT_PATTERN_STACK = "Stack"; @@ -79,7 +79,7 @@ public static IStackList readFluidStackList(ListTag list) throws Cra public static CompoundTag writePatternToNbt(ICraftingPattern pattern) { CompoundTag tag = new CompoundTag(); - tag.put(NBT_PATTERN_STACK, pattern.getStack().serializeNBT()); + tag.put(NBT_PATTERN_STACK, pattern.getStack().save(new CompoundTag())); tag.putLong(NBT_PATTERN_CONTAINER_POS, pattern.getContainer().getPosition().asLong()); return tag; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/calculator/CraftingCalculator.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/calculator/CraftingCalculator.java index 80be35b41c..3cf09de527 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/calculator/CraftingCalculator.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/calculator/CraftingCalculator.java @@ -20,9 +20,8 @@ import com.refinedmods.refinedstorage.apiimpl.autocrafting.task.v6.preview.CraftingPreviewInfo; import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nullable; import java.util.HashSet; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/monitor/CraftingMonitorElementFactory.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/monitor/CraftingMonitorElementFactory.java index bd36b79cd1..07d5ab9c4c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/monitor/CraftingMonitorElementFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/monitor/CraftingMonitorElementFactory.java @@ -13,8 +13,7 @@ import com.refinedmods.refinedstorage.apiimpl.autocrafting.task.v6.node.ProcessingNode; import com.refinedmods.refinedstorage.apiimpl.autocrafting.task.v6.node.ProcessingState; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.Collection; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/CraftingNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/CraftingNode.java index 3dce112708..d2d2eb8015 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/CraftingNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/CraftingNode.java @@ -13,7 +13,7 @@ import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class CraftingNode extends Node { private static final String NBT_RECIPE = "Recipe"; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/Node.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/Node.java index f0fd320fe5..2c0774eb0a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/Node.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/Node.java @@ -7,7 +7,7 @@ import com.refinedmods.refinedstorage.apiimpl.autocrafting.task.v6.SerializationUtil; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public abstract class Node { private static final String NBT_PATTERN = "Pattern"; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/NodeRequirements.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/NodeRequirements.java index ec852856b8..4433c4b09a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/NodeRequirements.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/NodeRequirements.java @@ -10,9 +10,8 @@ import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nullable; import java.util.*; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/ProcessingNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/ProcessingNode.java index 09b865e4ab..7226d39881 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/ProcessingNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/node/ProcessingNode.java @@ -16,8 +16,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.List; public class ProcessingNode extends Node { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/preview/CraftingPreviewElementFactory.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/preview/CraftingPreviewElementFactory.java index be9d1fc39b..5f5bc8e150 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/preview/CraftingPreviewElementFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/preview/CraftingPreviewElementFactory.java @@ -7,8 +7,7 @@ import com.refinedmods.refinedstorage.apiimpl.autocrafting.preview.FluidCraftingPreviewElement; import com.refinedmods.refinedstorage.apiimpl.autocrafting.preview.ItemCraftingPreviewElement; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/preview/CraftingPreviewInfo.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/preview/CraftingPreviewInfo.java index 836019c46d..eebb1cc732 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/preview/CraftingPreviewInfo.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/autocrafting/task/v6/preview/CraftingPreviewInfo.java @@ -3,8 +3,7 @@ import com.refinedmods.refinedstorage.api.util.IStackList; import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/Network.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/Network.java index 978044e130..812ad2f2b2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/Network.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/Network.java @@ -43,9 +43,9 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.energy.IEnergyStorage; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.ItemHandlerHelper; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkListener.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkListener.java index 748d39eb25..a7d346502c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkListener.java @@ -4,8 +4,8 @@ import com.refinedmods.refinedstorage.api.network.node.INetworkNode; import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.server.level.ServerLevel; -import net.minecraftforge.event.TickEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.TickEvent; public class NetworkListener { @SubscribeEvent diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeGraph.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeGraph.java index e530013208..b5187c55ab 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeGraph.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeGraph.java @@ -111,7 +111,7 @@ private static class Visitor implements INetworkNodeVisitor { } @Override - public void visit(Operator operator) { + public void visit(com.refinedmods.refinedstorage.api.network.INetworkNodeVisitor.Operator operator) { if (node instanceof INetworkNodeVisitor) { ((INetworkNodeVisitor) node).visit(operator); } else { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeListener.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeListener.java index 12a0045106..0c92b77aed 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/NetworkNodeListener.java @@ -11,8 +11,8 @@ import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.LevelAccessor; -import net.minecraftforge.event.level.BlockEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.level.BlockEvent; public class NetworkNodeListener { @SubscribeEvent diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/CraftingGridBehavior.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/CraftingGridBehavior.java index c62944ff53..6def3d531e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/CraftingGridBehavior.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/CraftingGridBehavior.java @@ -20,13 +20,10 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingRecipe; -import net.minecraftforge.common.ForgeHooks; -import net.minecraftforge.event.ForgeEventFactory; -import net.minecraftforge.items.ItemHandlerHelper; -import net.minecraftforge.items.wrapper.InvWrapper; -import net.minecraftforge.items.wrapper.PlayerInvWrapper; -import net.minecraftforge.items.wrapper.PlayerMainInvWrapper; - +import net.neoforged.neoforge.common.CommonHooks; +import net.neoforged.neoforge.event.EventHooks; +import net.neoforged.neoforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.items.wrapper.PlayerMainInvWrapper; import javax.annotation.Nullable; import java.util.*; import java.util.concurrent.atomic.AtomicReference; @@ -111,7 +108,7 @@ public void onCraftedShift(INetworkAwareGrid grid, Player player) { //A second list to remember which items have been extracted IStackList usedItems = API.instance().createItemStackList(); - ForgeHooks.setCraftingPlayer(player); + CommonHooks.setCraftingPlayer(player); // Do while the item is still craftable (aka is the result slot still the same as the original item?) and we don't exceed the max stack size. do { grid.onCrafted(player, availableItems, usedItems); @@ -145,8 +142,8 @@ public void onCraftedShift(INetworkAwareGrid grid, Player player) { // otherwise it's not being called. // For regular crafting, this is already called in ResultCraftingGridSlot#onTake -> checkTakeAchievements(stack) crafted.onCraftedBy(player.level(), player, amountCrafted); - ForgeEventFactory.firePlayerCraftingEvent(player, ItemHandlerHelper.copyStackWithSize(crafted, amountCrafted), grid.getCraftingMatrix()); - ForgeHooks.setCraftingPlayer(null); + EventHooks.firePlayerCraftingEvent(player, ItemHandlerHelper.copyStackWithSize(crafted, amountCrafted), grid.getCraftingMatrix()); + CommonHooks.setCraftingPlayer(null); } private void filterDuplicateStacks(INetwork network, CraftingContainer matrix, IStackList availableItems) { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/GridManager.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/GridManager.java index 42ddb20beb..11a72476d8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/GridManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/GridManager.java @@ -12,7 +12,6 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.network.NetworkHooks; import org.apache.commons.lang3.tuple.Pair; import javax.annotation.Nullable; @@ -43,7 +42,7 @@ private void openGrid(ResourceLocation id, ServerPlayer player, @Nullable ItemSt return; } - NetworkHooks.openScreen(player, new GridMenuProvider(grid.getLeft(), grid.getRight()), buf -> { + player.openMenu(new GridMenuProvider(grid.getLeft(), grid.getRight()), buf -> { buf.writeResourceLocation(id); buf.writeBoolean(pos != null); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/GridTab.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/GridTab.java index f930d21ac7..4727c4232c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/GridTab.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/GridTab.java @@ -9,8 +9,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/FluidGridHandler.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/FluidGridHandler.java index a1c23f9d81..63808918f7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/FluidGridHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/FluidGridHandler.java @@ -15,10 +15,11 @@ import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.Containers; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.fluids.capability.IFluidHandlerItem; import org.apache.commons.lang3.tuple.Pair; import javax.annotation.Nonnull; @@ -40,23 +41,26 @@ public void onExtract(ServerPlayer player, UUID id, boolean shift) { return; } - NetworkUtils.extractBucketFromPlayerInventoryOrNetwork(player, network, bucket -> bucket.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM, null).ifPresent(fluidHandler -> { - network.getFluidStorageTracker().changed(player, stack.copy()); + NetworkUtils.extractBucketFromPlayerInventoryOrNetwork(player, network, bucket -> { + IFluidHandlerItem fluidHandler = bucket.getCapability(Capabilities.FluidHandler.ITEM); + if (fluidHandler != null) { + network.getFluidStorageTracker().changed(player, stack.copy()); - FluidStack extracted = network.extractFluid(stack, FluidType.BUCKET_VOLUME, Action.PERFORM); + FluidStack extracted = network.extractFluid(stack, FluidType.BUCKET_VOLUME, Action.PERFORM); - fluidHandler.fill(extracted, IFluidHandler.FluidAction.EXECUTE); + fluidHandler.fill(extracted, IFluidHandler.FluidAction.EXECUTE); - if (shift) { - if (!player.getInventory().add(fluidHandler.getContainer().copy())) { - Containers.dropItemStack(player.getCommandSenderWorld(), player.getX(), player.getY(), player.getZ(), fluidHandler.getContainer()); + if (shift) { + if (!player.getInventory().add(fluidHandler.getContainer().copy())) { + Containers.dropItemStack(player.getCommandSenderWorld(), player.getX(), player.getY(), player.getZ(), fluidHandler.getContainer()); + } + } else { + player.containerMenu.setCarried(fluidHandler.getContainer()); } - } else { - player.containerMenu.setCarried(fluidHandler.getContainer()); - } - network.getNetworkItemManager().drainEnergy(player, RS.SERVER_CONFIG.getWirelessFluidGrid().getExtractUsage()); - })); + network.getNetworkItemManager().drainEnergy(player, RS.SERVER_CONFIG.getWirelessFluidGrid().getExtractUsage()); + } + }); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/ItemGridHandler.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/ItemGridHandler.java index 62ea78d487..a932a97fae 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/ItemGridHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/ItemGridHandler.java @@ -16,13 +16,11 @@ import com.refinedmods.refinedstorage.container.GridContainerMenu; import com.refinedmods.refinedstorage.network.grid.GridCraftingPreviewResponseMessage; import com.refinedmods.refinedstorage.network.grid.GridCraftingStartResponseMessage; -import net.minecraft.core.Direction; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collections; @@ -174,21 +172,21 @@ public void onExtract(ServerPlayer player, UUID id, int preferredSlot, int flags if (!took.isEmpty()) { if ((flags & EXTRACT_SHIFT) == EXTRACT_SHIFT) { - Optional playerInventory = player.getCapability(ForgeCapabilities.ITEM_HANDLER, Direction.UP).resolve(); - if (playerInventory.isPresent()) { + IItemHandler playerInventory = player.getCapability(Capabilities.ItemHandler.ENTITY); + if (playerInventory != null) { if (preferredSlot != -1) { - ItemStack remainder = playerInventory.get().insertItem(preferredSlot, took, true); + ItemStack remainder = playerInventory.insertItem(preferredSlot, took, true); if (remainder.getCount() != took.getCount()) { ItemStack inserted = network.extractItem(item, size - remainder.getCount(), Action.PERFORM); - playerInventory.get().insertItem(preferredSlot, inserted, false); + playerInventory.insertItem(preferredSlot, inserted, false); took.setCount(remainder.getCount()); } } - if (!took.isEmpty() && ItemHandlerHelper.insertItemStacked(playerInventory.get(), took, true).isEmpty()) { + if (!took.isEmpty() && ItemHandlerHelper.insertItemStacked(playerInventory, took, true).isEmpty()) { took = network.extractItem(item, size, Action.PERFORM); - ItemHandlerHelper.insertItemStacked(playerInventory.get(), took, false); + ItemHandlerHelper.insertItemStacked(playerInventory, took, false); } } } else { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/PortableFluidGridHandler.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/PortableFluidGridHandler.java index 4bf9483170..10989dbdab 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/PortableFluidGridHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/PortableFluidGridHandler.java @@ -10,10 +10,11 @@ import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.Containers; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.fluids.capability.IFluidHandlerItem; import org.apache.commons.lang3.tuple.Pair; import javax.annotation.Nonnull; @@ -53,7 +54,8 @@ public void onExtract(ServerPlayer player, UUID id, boolean shift) { } if (!bucket.isEmpty()) { - bucket.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM, null).ifPresent(fluidHandler -> { + IFluidHandlerItem fluidHandler = bucket.getCapability(Capabilities.FluidHandler.ITEM); + if (fluidHandler != null) { portableGrid.getFluidStorageTracker().changed(player, stack.copy()); fluidHandler.fill(portableGrid.getFluidStorage().extract(stack, FluidType.BUCKET_VOLUME, IComparer.COMPARE_NBT, Action.PERFORM), IFluidHandler.FluidAction.EXECUTE); @@ -67,7 +69,7 @@ public void onExtract(ServerPlayer player, UUID id, boolean shift) { } portableGrid.drainEnergy(RS.SERVER_CONFIG.getPortableGrid().getExtractUsage()); - }); + } } } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/PortableItemGridHandler.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/PortableItemGridHandler.java index 6d829eba27..feebca2b21 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/PortableItemGridHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/grid/handler/PortableItemGridHandler.java @@ -10,10 +10,9 @@ import net.minecraft.core.Direction; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.UUID; @@ -93,7 +92,7 @@ public void onExtract(ServerPlayer player, UUID id, int preferredSlot, int flags if (!took.isEmpty()) { if ((flags & EXTRACT_SHIFT) == EXTRACT_SHIFT) { - IItemHandler playerInventory = player.getCapability(ForgeCapabilities.ITEM_HANDLER, Direction.UP).orElse(null); + IItemHandler playerInventory = player.getCapability(Capabilities.ItemHandler.ENTITY); if (playerInventory != null) { if (preferredSlot != -1) { ItemStack remainder = playerInventory.insertItem(preferredSlot, took, true); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessCraftingMonitorNetworkItem.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessCraftingMonitorNetworkItem.java index c5952dfa47..14a77f9014 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessCraftingMonitorNetworkItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessCraftingMonitorNetworkItem.java @@ -12,12 +12,10 @@ import com.refinedmods.refinedstorage.item.WirelessCraftingMonitorItem; import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.network.NetworkHooks; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.IEnergyStorage; public class WirelessCraftingMonitorNetworkItem implements INetworkItem { private final INetworkItemManager handler; @@ -39,7 +37,7 @@ public Player getPlayer() { @Override public boolean onOpen(INetwork network) { - IEnergyStorage energy = stack.getCapability(ForgeCapabilities.ENERGY, null).orElse(null); + IEnergyStorage energy = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (RS.SERVER_CONFIG.getWirelessCraftingMonitor().getUseEnergy() && ((WirelessCraftingMonitorItem) stack.getItem()).getType() != WirelessCraftingMonitorItem.Type.CREATIVE && @@ -59,8 +57,7 @@ public boolean onOpen(INetwork network) { WirelessCraftingMonitor wirelessCraftingMonitor = new WirelessCraftingMonitor(stack, player.getServer(), slot); - NetworkHooks.openScreen( - (ServerPlayer) player, + player.openMenu( new CraftingMonitorMenuProvider(RSContainerMenus.WIRELESS_CRAFTING_MONITOR.get(), wirelessCraftingMonitor, null), slot::writePlayerSlot ); @@ -73,7 +70,8 @@ public boolean onOpen(INetwork network) { @Override public void drainEnergy(int energy) { if (RS.SERVER_CONFIG.getWirelessCraftingMonitor().getUseEnergy() && ((WirelessCraftingMonitorItem) stack.getItem()).getType() != WirelessCraftingMonitorItem.Type.CREATIVE) { - stack.getCapability(ForgeCapabilities.ENERGY).ifPresent(energyStorage -> { + IEnergyStorage energyStorage = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (energyStorage != null) { energyStorage.extractEnergy(energy, false); if (energyStorage.getEnergyStored() <= 0) { @@ -83,7 +81,7 @@ public void drainEnergy(int energy) { sendOutOfEnergyMessage(); } - }); + } } } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessFluidGridNetworkItem.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessFluidGridNetworkItem.java index 7ea7d56bee..2df80fd84b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessFluidGridNetworkItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessFluidGridNetworkItem.java @@ -14,8 +14,8 @@ import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.energy.IEnergyStorage; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.IEnergyStorage; public class WirelessFluidGridNetworkItem implements INetworkItem { private final INetworkItemManager handler; @@ -37,7 +37,7 @@ public Player getPlayer() { @Override public boolean onOpen(INetwork network) { - IEnergyStorage energy = stack.getCapability(ForgeCapabilities.ENERGY, null).orElse(null); + IEnergyStorage energy = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (RS.SERVER_CONFIG.getWirelessFluidGrid().getUseEnergy() && ((WirelessFluidGridItem) stack.getItem()).getType() != WirelessFluidGridItem.Type.CREATIVE && @@ -64,7 +64,8 @@ public boolean onOpen(INetwork network) { @Override public void drainEnergy(int energy) { if (RS.SERVER_CONFIG.getWirelessFluidGrid().getUseEnergy() && ((WirelessFluidGridItem) stack.getItem()).getType() != WirelessFluidGridItem.Type.CREATIVE) { - stack.getCapability(ForgeCapabilities.ENERGY).ifPresent(energyStorage -> { + IEnergyStorage energyStorage = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (energyStorage != null) { energyStorage.extractEnergy(energy, false); if (energyStorage.getEnergyStored() <= 0) { @@ -74,7 +75,7 @@ public void drainEnergy(int energy) { sendOutOfEnergyMessage(); } - }); + } } } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessGridNetworkItem.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessGridNetworkItem.java index 0bd63f85bd..f8b9b55799 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessGridNetworkItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/item/WirelessGridNetworkItem.java @@ -14,8 +14,8 @@ import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.energy.IEnergyStorage; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.IEnergyStorage; public class WirelessGridNetworkItem implements INetworkItem { private final INetworkItemManager handler; @@ -37,7 +37,7 @@ public Player getPlayer() { @Override public boolean onOpen(INetwork network) { - IEnergyStorage energy = stack.getCapability(ForgeCapabilities.ENERGY, null).orElse(null); + IEnergyStorage energy = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (RS.SERVER_CONFIG.getWirelessGrid().getUseEnergy() && ((WirelessGridItem) stack.getItem()).getType() != WirelessGridItem.Type.CREATIVE && @@ -64,7 +64,8 @@ public boolean onOpen(INetwork network) { @Override public void drainEnergy(int energy) { if (RS.SERVER_CONFIG.getWirelessGrid().getUseEnergy() && ((WirelessGridItem) stack.getItem()).getType() != WirelessGridItem.Type.CREATIVE) { - stack.getCapability(ForgeCapabilities.ENERGY).ifPresent(energyStorage -> { + IEnergyStorage energyStorage = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (energyStorage != null) { energyStorage.extractEnergy(energy, false); if (energyStorage.getEnergyStored() <= 0) { @@ -74,7 +75,7 @@ public void drainEnergy(int energy) { sendOutOfEnergyMessage(); } - }); + } } } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ConstructorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ConstructorNetworkNode.java index 5a4e6c344c..3131c1c85a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ConstructorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ConstructorNetworkNode.java @@ -18,7 +18,6 @@ import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.PositionImpl; import net.minecraft.core.dispenser.DefaultDispenseItemBehavior; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; @@ -34,14 +33,13 @@ import net.minecraft.world.level.Level; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.ForgeHooks; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.FluidUtil; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.common.CommonHooks; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.FluidUtil; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -122,7 +120,7 @@ private void extractAndPlaceBlock(ItemStack stack) { new BlockHitResult(Vec3.ZERO, getDirection(), pos, false) ); - InteractionResult result = ForgeHooks.onPlaceItemIntoWorld(ctx); + InteractionResult result = CommonHooks.onPlaceItemIntoWorld(ctx); if (result.consumesAction()) { network.extractItem(tookCopy, 1, Action.PERFORM); } @@ -138,7 +136,7 @@ private void extractAndDropItem(ItemStack stack) { ItemStack took = network.extractItem(stack, dropCount, compare, Action.PERFORM); if (!took.isEmpty()) { - DefaultDispenseItemBehavior.spawnItem(level, took, 6, getDirection(), new PositionImpl(getDispensePositionX(), getDispensePositionY(), getDispensePositionZ())); + DefaultDispenseItemBehavior.spawnItem(level, took, 6, getDirection(), new Vec3(getDispensePositionX(), getDispensePositionY(), getDispensePositionZ())); } else if (upgrades.hasUpgrade(UpgradeItem.Type.CRAFTING)) { network.getCraftingManager().request(this, stack, 1); } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/CrafterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/CrafterNetworkNode.java index 847438b8d9..3369509978 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/CrafterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/CrafterNetworkNode.java @@ -24,11 +24,10 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.items.wrapper.CombinedInvWrapper; - +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.items.wrapper.CombinedInvWrapper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; @@ -260,8 +259,7 @@ public IItemHandler getConnectedInventory() { if (proxy == null) { return null; } - - return LevelUtils.getItemHandler(proxy.getFacingBlockEntity(), proxy.getDirection().getOpposite()); + return LevelUtils.getItemHandler(level, proxy.getPosition().relative(proxy.getDirection()), proxy.getDirection().getOpposite()); } @Nullable @@ -271,8 +269,7 @@ public IFluidHandler getConnectedFluidInventory() { if (proxy == null) { return null; } - - return LevelUtils.getFluidHandler(proxy.getFacingBlockEntity(), proxy.getDirection().getOpposite()); + return LevelUtils.getFluidHandler(level, proxy.getPosition().relative(proxy.getDirection()), proxy.getDirection().getOpposite()); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DestructorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DestructorNetworkNode.java index 359f2a044d..4fdda93602 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DestructorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DestructorNetworkNode.java @@ -36,15 +36,14 @@ import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.level.BlockEvent; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.IFluidBlock; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.event.level.BlockEvent; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.IFluidBlock; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import java.util.List; public class DestructorNetworkNode extends NetworkNode implements IComparable, IWhitelistBlacklist, IType, ICoverable { @@ -160,7 +159,7 @@ private void breakBlock() { BlockEvent.BreakEvent e = new BlockEvent.BreakEvent(level, front, frontBlockState, LevelUtils.getFakePlayer((ServerLevel) level, getOwner())); - if (!MinecraftForge.EVENT_BUS.post(e)) { + if (!NeoForge.EVENT_BUS.post(e).isCanceled()) { frontBlock.playerWillDestroy(level, front, frontBlockState, LevelUtils.getFakePlayer((ServerLevel) level, getOwner())); level.removeBlock(front, false); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DetectorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DetectorNetworkNode.java index 6b967d17f7..246684c1d1 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DetectorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/DetectorNetworkNode.java @@ -18,9 +18,8 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nullable; public class DetectorNetworkNode extends NetworkNode implements IComparable, IType { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExporterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExporterNetworkNode.java index 5ad64abfc2..2df264b46c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExporterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExporterNetworkNode.java @@ -22,12 +22,12 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.items.ItemHandlerHelper; public class ExporterNetworkNode extends NetworkNode implements IComparable, IType, ICoverable { public static final ResourceLocation ID = new ResourceLocation(RS.ID, "exporter"); @@ -88,7 +88,11 @@ public void update() { if (canUpdate() && ticks % upgrades.getSpeed() == 0 && level.isLoaded(pos)) { if (type == IType.ITEMS) { - IItemHandler handler = LevelUtils.getItemHandler(getFacingBlockEntity(), getDirection().getOpposite()); + IItemHandler handler = LevelUtils.getItemHandler( + level, + pos.relative(getDirection()), + getDirection().getOpposite() + ); if (handler != null) { while (filterSlot + 1 < itemFilters.getSlots() && itemFilters.getStackInSlot(filterSlot).isEmpty()) { @@ -168,7 +172,11 @@ public void update() { filterSlot = 0; } - IFluidHandler handler = LevelUtils.getFluidHandler(getFacingBlockEntity(), getDirection().getOpposite()); + IFluidHandler handler = LevelUtils.getFluidHandler( + level, + pos.relative(getDirection()), + getDirection().getOpposite() + ); if (handler != null) { FluidStack stack = fluids[filterSlot]; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExternalStorageNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExternalStorageNetworkNode.java index ccedf82688..6e49120af8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExternalStorageNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ExternalStorageNetworkNode.java @@ -33,8 +33,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -215,7 +215,7 @@ public void updateStorage(INetwork network, InvalidateCause cause) { if (facing != null) { if (type == IType.ITEMS) { for (IExternalStorageProvider provider : API.instance().getExternalStorageProviders(StorageType.ITEM)) { - if (provider.canProvide(facing, getDirection())) { + if (provider.canProvide(level, pos.relative(getDirection()), getDirection())) { itemStorages.add(provider.provide(this, getFacingBlockEntity(), getDirection())); break; @@ -223,7 +223,7 @@ public void updateStorage(INetwork network, InvalidateCause cause) { } } else if (type == IType.FLUIDS) { for (IExternalStorageProvider provider : API.instance().getExternalStorageProviders(StorageType.FLUID)) { - if (provider.canProvide(facing, getDirection())) { + if (provider.canProvide(level, pos.relative(getDirection()), getDirection())) { fluidStorages.add(provider.provide(this, getFacingBlockEntity(), getDirection())); break; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/FluidInterfaceNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/FluidInterfaceNetworkNode.java index f09941beb8..4441dc6df0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/FluidInterfaceNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/FluidInterfaceNetworkNode.java @@ -23,12 +23,12 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fluids.capability.templates.FluidTank; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.wrapper.CombinedInvWrapper; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.fluids.capability.templates.FluidTank; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.wrapper.CombinedInvWrapper; import org.apache.commons.lang3.tuple.Pair; public class FluidInterfaceNetworkNode extends NetworkNode { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/GridNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/GridNetworkNode.java index b4401401a5..5a172e6859 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/GridNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/GridNetworkNode.java @@ -38,17 +38,17 @@ import net.minecraft.world.inventory.*; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingRecipe; +import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.items.wrapper.CombinedInvWrapper; -import net.minecraftforge.items.wrapper.InvWrapper; - +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.items.wrapper.CombinedInvWrapper; +import net.neoforged.neoforge.items.wrapper.InvWrapper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; @@ -345,7 +345,9 @@ public FluidInventory getProcessingMatrixFluids() { @Override public void onCraftingMatrixChanged() { if (currentRecipe == null || !currentRecipe.matches(matrix, level)) { - currentRecipe = level.getRecipeManager().getRecipeFor(RecipeType.CRAFTING, matrix, level).orElse(null); + currentRecipe = level.getRecipeManager().getRecipeFor(RecipeType.CRAFTING, matrix, level) + .map(RecipeHolder::value) + .orElse(null); } if (currentRecipe == null) { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ImporterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ImporterNetworkNode.java index 694022036c..2db4b08a0b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ImporterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/ImporterNetworkNode.java @@ -24,11 +24,11 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; public class ImporterNetworkNode extends NetworkNode implements IComparable, IWhitelistBlacklist, IType, ICoverable { public static final ResourceLocation ID = new ResourceLocation(RS.ID, "importer"); @@ -68,7 +68,11 @@ public void update() { if (type == IType.ITEMS) { BlockEntity facing = getFacingBlockEntity(); - IItemHandler handler = LevelUtils.getItemHandler(facing, getDirection().getOpposite()); + IItemHandler handler = LevelUtils.getItemHandler( + level, + pos.relative(getDirection()), + getDirection().getOpposite() + ); if (facing instanceof DiskDriveBlockEntity || handler == null) { return; @@ -100,7 +104,11 @@ public void update() { } } } else if (type == IType.FLUIDS && ticks % upgrades.getSpeed() == 0) { - IFluidHandler handler = LevelUtils.getFluidHandler(getFacingBlockEntity(), getDirection().getOpposite()); + IFluidHandler handler = LevelUtils.getFluidHandler( + level, + pos.relative(getDirection()), + getDirection().getOpposite() + ); if (handler != null) { FluidStack extractedSimulated = handler.drain(FluidType.BUCKET_VOLUME * upgrades.getStackInteractCount(), IFluidHandler.FluidAction.SIMULATE); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/InterfaceNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/InterfaceNetworkNode.java index c70d5c2a34..4f98638a99 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/InterfaceNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/InterfaceNetworkNode.java @@ -21,8 +21,8 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.wrapper.CombinedInvWrapper; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.wrapper.CombinedInvWrapper; public class InterfaceNetworkNode extends NetworkNode implements IComparable { public static final ResourceLocation ID = new ResourceLocation(RS.ID, "interface"); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkNode.java index 2f509869ce..ceee49d88b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkNode.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.DirectionProperty; -import net.minecraftforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandler; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkTransmitterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkTransmitterNetworkNode.java index 1b21d63c8d..71b81cdaa6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkTransmitterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/NetworkTransmitterNetworkNode.java @@ -16,8 +16,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.items.IItemHandler; import javax.annotation.Nullable; public class NetworkTransmitterNetworkNode extends NetworkNode { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/SecurityManagerNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/SecurityManagerNetworkNode.java index fa69d419d1..56d7ae7981 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/SecurityManagerNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/SecurityManagerNetworkNode.java @@ -17,9 +17,8 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.wrapper.CombinedInvWrapper; - +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.wrapper.CombinedInvWrapper; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/StorageMonitorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/StorageMonitorNetworkNode.java index 57d9a7c2f9..cf0c4ff299 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/StorageMonitorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/StorageMonitorNetworkNode.java @@ -15,6 +15,10 @@ import com.refinedmods.refinedstorage.util.LevelUtils; import com.refinedmods.refinedstorage.util.NetworkUtils; import com.refinedmods.refinedstorage.util.StackUtils; + +import java.util.HashMap; +import java.util.Map; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -24,15 +28,13 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.fluids.capability.IFluidHandlerItem; import org.apache.commons.lang3.tuple.Pair; -import java.util.HashMap; -import java.util.Map; - public class StorageMonitorNetworkNode extends NetworkNode implements IComparable, IType { public static final int DEPOSIT_ALL_MAX_DELAY = 500; @@ -143,7 +145,8 @@ private void depositItems(Player player, ItemStack toInsert) { ItemStack filter = itemFilter.getStackInSlot(0); if (!filter.isEmpty() && API.instance().getComparer().isEqual(filter, toInsert, compare)) { - player.getInventory().setItem(player.getInventory().selected, network.insertItemTracked(toInsert, toInsert.getCount())); + player.getInventory() + .setItem(player.getInventory().selected, network.insertItemTracked(toInsert, toInsert.getCount())); deposits.put(player.getGameProfile().getName(), Pair.of(toInsert, System.currentTimeMillis())); } @@ -158,7 +161,8 @@ private void depositFluids(Player player, ItemStack toInsert) { return; } - if (!result.getValue().isEmpty() && network.insertFluid(result.getValue(), result.getValue().getAmount(), Action.SIMULATE).isEmpty()) { + if (!result.getValue().isEmpty() && + network.insertFluid(result.getValue(), result.getValue().getAmount(), Action.SIMULATE).isEmpty()) { network.getFluidStorageTracker().changed(player, result.getValue().copy()); result = StackUtils.getFluid(toInsert, false); @@ -169,7 +173,8 @@ private void depositFluids(Player player, ItemStack toInsert) { ItemStack container = result.getLeft(); if (!player.getInventory().add(container.copy())) { - Containers.dropItemStack(player.getCommandSenderWorld(), player.getX(), player.getY(), player.getZ(), container); + Containers.dropItemStack(player.getCommandSenderWorld(), player.getX(), player.getY(), player.getZ(), + container); } } } @@ -218,15 +223,21 @@ private void extractFluids(Player player) { boolean shift = player.isCrouching(); if (shift) { - NetworkUtils.extractBucketFromPlayerInventoryOrNetwork(player, network, bucket -> bucket.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM, null).ifPresent(fluidHandler -> { + NetworkUtils.extractBucketFromPlayerInventoryOrNetwork(player, network, bucket -> { + IFluidHandlerItem fluidHandler = bucket.getCapability(Capabilities.FluidHandler.ITEM); + if (fluidHandler == null) { + return; + } network.getFluidStorageTracker().changed(player, stack.copy()); - fluidHandler.fill(network.extractFluid(stack, FluidType.BUCKET_VOLUME, Action.PERFORM), IFluidHandler.FluidAction.EXECUTE); + fluidHandler.fill(network.extractFluid(stack, FluidType.BUCKET_VOLUME, Action.PERFORM), + IFluidHandler.FluidAction.EXECUTE); if (!player.getInventory().add(fluidHandler.getContainer().copy())) { - Containers.dropItemStack(player.getCommandSenderWorld(), player.getX(), player.getY(), player.getZ(), fluidHandler.getContainer()); + Containers.dropItemStack(player.getCommandSenderWorld(), player.getX(), player.getY(), + player.getZ(), fluidHandler.getContainer()); } - })); + }); } } @@ -303,7 +314,8 @@ public int getAmount() { ItemStack stored = network.getItemStorageCache().getList().get(toCheck, compare); return stored != null ? stored.getCount() : 0; } else { - return network.getItemStorageCache().getList().getStacks(toCheck).stream().mapToInt(entry -> entry.getStack().getCount()).sum(); + return network.getItemStorageCache().getList().getStacks(toCheck).stream() + .mapToInt(entry -> entry.getStack().getCount()).sum(); } } else if (getType() == IType.FLUIDS) { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/WirelessTransmitterNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/WirelessTransmitterNetworkNode.java index 8ccd18b8bb..62ea4485c2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/WirelessTransmitterNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/WirelessTransmitterNetworkNode.java @@ -13,7 +13,7 @@ import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; -import net.minecraftforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandler; public class WirelessTransmitterNetworkNode extends NetworkNode implements IWirelessTransmitter { public static final ResourceLocation ID = new ResourceLocation(RS.ID, "wireless_transmitter"); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/cover/CoverManager.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/cover/CoverManager.java index 5b7c70c871..22dfa626d6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/cover/CoverManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/cover/CoverManager.java @@ -12,10 +12,9 @@ import net.minecraft.world.level.block.EntityBlock; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelProperty; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.items.ItemStackHandler; - +import net.neoforged.neoforge.client.model.data.ModelProperty; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.items.ItemStackHandler; import javax.annotation.Nullable; import java.util.HashMap; import java.util.Map; @@ -165,7 +164,7 @@ public CompoundTag writeToNbt() { CompoundTag tag = new CompoundTag(); tag.putInt(NBT_DIRECTION, entry.getKey().ordinal()); - tag.put(NBT_ITEM, entry.getValue().getStack().serializeNBT()); + tag.put(NBT_ITEM, entry.getValue().getStack().save(new CompoundTag())); tag.putInt(NBT_TYPE, entry.getValue().getType().ordinal()); list.put(entry.getKey().ordinal() + "", tag); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/DiskDriveNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/DiskDriveNetworkNode.java index 87871e0e07..1a2aa3ecf0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/DiskDriveNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/DiskDriveNetworkNode.java @@ -30,9 +30,9 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/FluidDriveWrapperStorageDisk.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/FluidDriveWrapperStorageDisk.java index 2b86cd6211..b23f2f378a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/FluidDriveWrapperStorageDisk.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/FluidDriveWrapperStorageDisk.java @@ -10,8 +10,7 @@ import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/ItemDriveWrapperStorageDisk.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/ItemDriveWrapperStorageDisk.java index 5604b0a705..6b7d9a5024 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/ItemDriveWrapperStorageDisk.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskdrive/ItemDriveWrapperStorageDisk.java @@ -10,8 +10,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/DiskManipulatorNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/DiskManipulatorNetworkNode.java index c59656aaca..a7c6896f24 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/DiskManipulatorNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/DiskManipulatorNetworkNode.java @@ -29,12 +29,11 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.items.wrapper.CombinedInvWrapper; - +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.items.wrapper.CombinedInvWrapper; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskFluidManipulatorWrapper.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskFluidManipulatorWrapper.java index 51a62d0273..f9f9ce0bf8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskFluidManipulatorWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskFluidManipulatorWrapper.java @@ -11,8 +11,7 @@ import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskItemManipulatorWrapper.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskItemManipulatorWrapper.java index 05fbabf9fb..a6743a73a5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskItemManipulatorWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/diskmanipulator/StorageDiskItemManipulatorWrapper.java @@ -11,8 +11,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/FluidStorageNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/FluidStorageNetworkNode.java index a1493b24f4..b73e8d2234 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/FluidStorageNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/FluidStorageNetworkNode.java @@ -32,7 +32,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/FluidStorageWrapperStorageDisk.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/FluidStorageWrapperStorageDisk.java index 7a9da007f7..7e95dc0e63 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/FluidStorageWrapperStorageDisk.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/FluidStorageWrapperStorageDisk.java @@ -9,8 +9,7 @@ import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/ItemStorageWrapperStorageDisk.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/ItemStorageWrapperStorageDisk.java index 52f6c24834..37f0c83863 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/ItemStorageWrapperStorageDisk.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/ItemStorageWrapperStorageDisk.java @@ -9,8 +9,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/StorageNetworkNode.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/StorageNetworkNode.java index ef863b5b95..639d02c09b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/StorageNetworkNode.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/storage/StorageNetworkNode.java @@ -33,7 +33,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/render/ElementDrawers.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/render/ElementDrawers.java index bbbd2f4a3d..2ef8a1124f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/render/ElementDrawers.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/render/ElementDrawers.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.screen.BaseScreen; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class ElementDrawers implements IElementDrawers { protected final BaseScreen screen; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/FluidStorageCache.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/FluidStorageCache.java index ad6b689d24..a052507010 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/FluidStorageCache.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/FluidStorageCache.java @@ -9,13 +9,19 @@ import com.refinedmods.refinedstorage.api.storage.cache.IStorageCacheListener; import com.refinedmods.refinedstorage.api.storage.cache.InvalidateCause; import com.refinedmods.refinedstorage.api.util.IStackList; +import com.refinedmods.refinedstorage.api.util.StackListEntry; import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.apiimpl.API; -import net.minecraftforge.fluids.FluidStack; +import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; + +import net.minecraft.world.item.ItemStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import javax.annotation.Nonnull; +import net.neoforged.neoforge.fluids.FluidStack; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -142,6 +148,31 @@ public IStackList getCraftablesList() { return craftables; } + @Override + public List getGridStacks() { + final List stacks = new ArrayList<>(); + + for (StackListEntry stack : network.getFluidStorageCache().getList().getStacks()) { + stacks.add(FluidGridStack.of( + stack, + network.getFluidStorageTracker(), + network.getFluidStorageCache().getCraftablesList(), + false + )); + } + + for (StackListEntry stack : network.getFluidStorageCache().getCraftablesList().getStacks()) { + stacks.add(FluidGridStack.of( + stack, + network.getFluidStorageTracker(), + network.getFluidStorageCache().getList(), + true + )); + } + + return stacks; + } + @Override public List> getStorages() { return storages; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/ItemStorageCache.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/ItemStorageCache.java index 75a24c49e0..1b49e6e637 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/ItemStorageCache.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/ItemStorageCache.java @@ -9,8 +9,12 @@ import com.refinedmods.refinedstorage.api.storage.cache.IStorageCacheListener; import com.refinedmods.refinedstorage.api.storage.cache.InvalidateCause; import com.refinedmods.refinedstorage.api.util.IStackList; +import com.refinedmods.refinedstorage.api.util.StackListEntry; import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.apiimpl.API; +import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; + import net.minecraft.world.item.ItemStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -142,6 +146,31 @@ public IStackList getCraftablesList() { return craftables; } + @Override + public List getGridStacks() { + final List stacks = new ArrayList<>(); + + for (StackListEntry stack : network.getItemStorageCache().getList().getStacks()) { + stacks.add(ItemGridStack.of( + stack, + network.getItemStorageTracker(), + network.getItemStorageCache().getCraftablesList(), + false + )); + } + + for (StackListEntry stack : network.getItemStorageCache().getCraftablesList().getStacks()) { + stacks.add(ItemGridStack.of( + stack, + network.getItemStorageTracker(), + network.getItemStorageCache().getList(), + true + )); + } + + return stacks; + } + @Override public List> getStorages() { return storages; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/PortableFluidStorageCache.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/PortableFluidStorageCache.java index 0e52925b37..bed8ca72a9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/PortableFluidStorageCache.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/PortableFluidStorageCache.java @@ -8,9 +8,12 @@ import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; -import net.minecraftforge.fluids.FluidStack; +import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; import javax.annotation.Nonnull; +import net.neoforged.neoforge.fluids.FluidStack; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -90,6 +93,14 @@ public IStackList getCraftablesList() { throw new UnsupportedOperationException(); } + @Override + public List getGridStacks() { + return portableGrid.getFluidCache().getList().getStacks() + .stream() + .map(stack -> FluidGridStack.of(stack, portableGrid.getFluidStorageTracker(), null, false)) + .toList(); + } + @Override public List> getStorages() { return Collections.emptyList(); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/PortableItemStorageCache.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/PortableItemStorageCache.java index ddb50e57b3..af5a061d2f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/PortableItemStorageCache.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/PortableItemStorageCache.java @@ -8,12 +8,15 @@ import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; -import net.minecraft.world.item.ItemStack; +import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; -import javax.annotation.Nonnull; import java.util.Collections; import java.util.LinkedList; import java.util.List; +import javax.annotation.Nonnull; + +import net.minecraft.world.item.ItemStack; public class PortableItemStorageCache implements IStorageCache { private final IPortableGrid portableGrid; @@ -90,6 +93,14 @@ public IStackList getCraftablesList() { throw new UnsupportedOperationException(); } + @Override + public List getGridStacks() { + return portableGrid.getItemCache().getList().getStacks() + .stream() + .map(stack -> ItemGridStack.of(stack, portableGrid.getItemStorageTracker(), null, false)) + .toList(); + } + @Override public List> getStorages() { return Collections.emptyList(); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/FluidGridStorageCacheListener.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/FluidGridStorageCacheListener.java index d674658a92..acce85e43f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/FluidGridStorageCacheListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/FluidGridStorageCacheListener.java @@ -7,12 +7,17 @@ import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.network.grid.GridFluidDeltaMessage; import com.refinedmods.refinedstorage.network.grid.GridFluidUpdateMessage; -import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.fluids.FluidStack; +import com.refinedmods.refinedstorage.network.grid.GridItemDeltaMessage; +import com.refinedmods.refinedstorage.network.grid.GridStackDelta; +import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; import java.util.ArrayList; import java.util.List; +import net.minecraft.server.level.ServerPlayer; +import net.neoforged.neoforge.fluids.FluidStack; + public class FluidGridStorageCacheListener implements IStorageCacheListener { private final ServerPlayer player; private final INetwork network; @@ -24,7 +29,10 @@ public FluidGridStorageCacheListener(ServerPlayer player, INetwork network) { @Override public void onAttached() { - RS.NETWORK_HANDLER.sendTo(player, new GridFluidUpdateMessage(network, network.getSecurityManager().hasPermission(Permission.AUTOCRAFTING, player))); + RS.NETWORK_HANDLER.sendTo(player, new GridFluidUpdateMessage( + network.getSecurityManager().hasPermission(Permission.AUTOCRAFTING, player), + (List) network.getFluidStorageCache().getGridStacks() + )); } @Override @@ -43,6 +51,16 @@ public void onChanged(StackListResult delta) { @Override public void onChangedBulk(List> deltas) { - RS.NETWORK_HANDLER.sendTo(player, new GridFluidDeltaMessage(network, deltas)); + final List> syncDeltas = deltas.stream() + .map(delta -> new GridStackDelta<>( + delta.getChange(), + FluidGridStack.of( + network.getFluidStorageCache(), + network.getFluidStorageCache().getCraftablesList(), + network.getFluidStorageTracker(), + delta + ) + )).toList(); + RS.NETWORK_HANDLER.sendTo(player, new GridFluidDeltaMessage(syncDeltas)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/ItemGridStorageCacheListener.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/ItemGridStorageCacheListener.java index 2ff7339269..3db75057bf 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/ItemGridStorageCacheListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/ItemGridStorageCacheListener.java @@ -7,12 +7,15 @@ import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.network.grid.GridItemDeltaMessage; import com.refinedmods.refinedstorage.network.grid.GridItemUpdateMessage; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.item.ItemStack; +import com.refinedmods.refinedstorage.network.grid.GridStackDelta; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; import java.util.ArrayList; import java.util.List; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.item.ItemStack; + public class ItemGridStorageCacheListener implements IStorageCacheListener { private final ServerPlayer player; private final INetwork network; @@ -24,7 +27,10 @@ public ItemGridStorageCacheListener(ServerPlayer player, INetwork network) { @Override public void onAttached() { - RS.NETWORK_HANDLER.sendTo(player, new GridItemUpdateMessage(network, network.getSecurityManager().hasPermission(Permission.AUTOCRAFTING, player))); + RS.NETWORK_HANDLER.sendTo(player, new GridItemUpdateMessage( + network.getSecurityManager().hasPermission(Permission.AUTOCRAFTING, player), + (List) network.getItemStorageCache().getGridStacks() + )); } @Override @@ -35,14 +41,22 @@ public void onInvalidated() { @Override public void onChanged(StackListResult delta) { List> deltas = new ArrayList<>(); - deltas.add(delta); - onChangedBulk(deltas); } @Override public void onChangedBulk(List> deltas) { - RS.NETWORK_HANDLER.sendTo(player, new GridItemDeltaMessage(network, deltas)); + final List> syncDeltas = deltas.stream() + .map(delta -> new GridStackDelta<>( + delta.getChange(), + ItemGridStack.of( + network.getItemStorageCache(), + network.getItemStorageCache().getCraftablesList(), + network.getItemStorageTracker(), + delta + ) + )).toList(); + RS.NETWORK_HANDLER.sendTo(player, new GridItemDeltaMessage(syncDeltas)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/PortableFluidGridStorageCacheListener.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/PortableFluidGridStorageCacheListener.java index 91295e71e0..7b6596ad04 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/PortableFluidGridStorageCacheListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/PortableFluidGridStorageCacheListener.java @@ -3,12 +3,17 @@ import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.storage.cache.IStorageCacheListener; import com.refinedmods.refinedstorage.api.util.StackListResult; -import com.refinedmods.refinedstorage.network.grid.PortableGridFluidDeltaMessage; -import com.refinedmods.refinedstorage.network.grid.PortableGridFluidUpdateMessage; import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; -import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.fluids.FluidStack; +import com.refinedmods.refinedstorage.network.grid.GridFluidDeltaMessage; +import com.refinedmods.refinedstorage.network.grid.GridFluidUpdateMessage; +import com.refinedmods.refinedstorage.network.grid.GridItemDeltaMessage; +import com.refinedmods.refinedstorage.network.grid.GridItemUpdateMessage; +import com.refinedmods.refinedstorage.network.grid.GridStackDelta; +import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; +import net.minecraft.server.level.ServerPlayer; +import net.neoforged.neoforge.fluids.FluidStack; import java.util.ArrayList; import java.util.List; @@ -23,7 +28,10 @@ public PortableFluidGridStorageCacheListener(IPortableGrid portableGrid, ServerP @Override public void onAttached() { - RS.NETWORK_HANDLER.sendTo(player, new PortableGridFluidUpdateMessage(portableGrid)); + RS.NETWORK_HANDLER.sendTo(player, new GridFluidUpdateMessage( + false, + (List) portableGrid.getFluidCache().getGridStacks() + )); } @Override @@ -41,7 +49,17 @@ public void onChanged(StackListResult delta) { } @Override - public void onChangedBulk(List> storageCacheDeltas) { - RS.NETWORK_HANDLER.sendTo(player, new PortableGridFluidDeltaMessage(portableGrid, storageCacheDeltas)); + public void onChangedBulk(List> deltas) { + final List> syncDeltas = deltas.stream() + .map(delta -> new GridStackDelta<>( + delta.getChange(), + FluidGridStack.of( + portableGrid.getFluidCache(), + null, + portableGrid.getFluidStorageTracker(), + delta + ) + )).toList(); + RS.NETWORK_HANDLER.sendTo(player, new GridFluidDeltaMessage(syncDeltas)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/PortableItemGridStorageCacheListener.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/PortableItemGridStorageCacheListener.java index 65b814d9e6..3ec3521678 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/PortableItemGridStorageCacheListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/cache/listener/PortableItemGridStorageCacheListener.java @@ -3,9 +3,12 @@ import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.storage.cache.IStorageCacheListener; import com.refinedmods.refinedstorage.api.util.StackListResult; -import com.refinedmods.refinedstorage.network.grid.PortableGridItemDeltaMessage; -import com.refinedmods.refinedstorage.network.grid.PortableGridItemUpdateMessage; +import com.refinedmods.refinedstorage.network.grid.GridItemDeltaMessage; +import com.refinedmods.refinedstorage.network.grid.GridItemUpdateMessage; import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; +import com.refinedmods.refinedstorage.network.grid.GridStackDelta; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; + import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.item.ItemStack; @@ -23,7 +26,10 @@ public PortableItemGridStorageCacheListener(IPortableGrid portableGrid, ServerPl @Override public void onAttached() { - RS.NETWORK_HANDLER.sendTo(player, new PortableGridItemUpdateMessage(portableGrid)); + RS.NETWORK_HANDLER.sendTo(player, new GridItemUpdateMessage( + false, + (List) portableGrid.getItemCache().getGridStacks() + )); } @Override @@ -34,14 +40,22 @@ public void onInvalidated() { @Override public void onChanged(StackListResult delta) { List> deltas = new ArrayList<>(); - deltas.add(delta); - onChangedBulk(deltas); } @Override - public void onChangedBulk(List> storageCacheDeltas) { - RS.NETWORK_HANDLER.sendTo(player, new PortableGridItemDeltaMessage(portableGrid, storageCacheDeltas)); + public void onChangedBulk(List> deltas) { + final List> syncDeltas = deltas.stream() + .map(delta -> new GridStackDelta<>( + delta.getChange(), + ItemGridStack.of( + portableGrid.getItemCache(), + null, + portableGrid.getItemStorageTracker(), + delta + ) + )).toList(); + RS.NETWORK_HANDLER.sendTo(player, new GridItemDeltaMessage(syncDeltas)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/FluidStorageDisk.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/FluidStorageDisk.java index a3170a836e..88cf76a7fa 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/FluidStorageDisk.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/FluidStorageDisk.java @@ -15,8 +15,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.level.material.Fluid; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/ItemStorageDisk.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/ItemStorageDisk.java index cea7e23267..ec5c19461f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/ItemStorageDisk.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/ItemStorageDisk.java @@ -16,8 +16,7 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/PortableFluidStorageDisk.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/PortableFluidStorageDisk.java index 13fb8ede75..a7e6d3b7fd 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/PortableFluidStorageDisk.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/PortableFluidStorageDisk.java @@ -8,8 +8,7 @@ import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/factory/FluidStorageDiskFactory.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/factory/FluidStorageDiskFactory.java index bb04a1ec73..b48a76019e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/factory/FluidStorageDiskFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/disk/factory/FluidStorageDiskFactory.java @@ -13,8 +13,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.UUID; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorage.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorage.java index 40fce9c92a..fca6367ed0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorage.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorage.java @@ -6,11 +6,10 @@ import com.refinedmods.refinedstorage.api.storage.externalstorage.IExternalStorageContext; import com.refinedmods.refinedstorage.api.util.Action; import com.refinedmods.refinedstorage.util.StackUtils; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.IFluidHandler; - import javax.annotation.Nonnull; import javax.annotation.Nullable; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageCache.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageCache.java index 7db6de2176..3b492c07d0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageCache.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageCache.java @@ -3,10 +3,9 @@ import com.refinedmods.refinedstorage.api.network.INetwork; import com.refinedmods.refinedstorage.api.util.IComparer; import com.refinedmods.refinedstorage.apiimpl.API; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.IFluidHandler; - import javax.annotation.Nullable; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageProvider.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageProvider.java index f1dba195eb..adb86d0bb8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageProvider.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/FluidExternalStorageProvider.java @@ -9,14 +9,13 @@ import net.minecraft.core.Direction; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; public class FluidExternalStorageProvider implements IExternalStorageProvider { @Override - public boolean canProvide(BlockEntity blockEntity, Direction direction) { - return LevelUtils.getFluidHandler(blockEntity, direction.getOpposite()) != null; + public boolean canProvide(Level level, BlockPos pos, Direction direction) { + return LevelUtils.getFluidHandler(level, pos, direction.getOpposite()) != null; } @Nonnull @@ -24,20 +23,10 @@ public boolean canProvide(BlockEntity blockEntity, Direction direction) { public IExternalStorage provide(IExternalStorageContext context, BlockEntity blockEntity, Direction direction) { return new FluidExternalStorage(context, () -> { Level level = blockEntity.getLevel(); - if (level == null) { return null; } - - BlockPos blockPos = blockEntity.getBlockPos(); - - if (!level.isLoaded(blockPos)) { - return null; - } - - BlockEntity currentBlockEntity = level.getBlockEntity(blockPos); - - return LevelUtils.getFluidHandler(currentBlockEntity, direction.getOpposite()); + return LevelUtils.getFluidHandler(level, blockEntity.getBlockPos(), direction.getOpposite()); }, blockEntity instanceof FluidInterfaceBlockEntity); } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorage.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorage.java index 57cbb66219..a9d429228b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorage.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorage.java @@ -7,9 +7,8 @@ import com.refinedmods.refinedstorage.api.util.Action; import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageCache.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageCache.java index 3cc4b73675..6a3572e676 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageCache.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageCache.java @@ -3,8 +3,7 @@ import com.refinedmods.refinedstorage.api.network.INetwork; import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.items.IItemHandler; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageProvider.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageProvider.java index b1231b9110..4dde436675 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageProvider.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/externalstorage/ItemExternalStorageProvider.java @@ -18,14 +18,12 @@ public class ItemExternalStorageProvider implements IExternalStorageProvider { @Override - public boolean canProvide(BlockEntity blockEntity, Direction direction) { - INetworkNode node = NetworkUtils.getNodeFromBlockEntity(blockEntity); - + public boolean canProvide(Level level, BlockPos pos, Direction direction) { + INetworkNode node = NetworkUtils.getNodeFromBlockEntity(level.getBlockEntity(pos)); if (node instanceof IStorageProvider) { return false; } - - return LevelUtils.getItemHandler(blockEntity, direction.getOpposite()) != null; + return LevelUtils.getItemHandler(level, pos, direction.getOpposite()) != null; } @Nonnull @@ -33,20 +31,10 @@ public boolean canProvide(BlockEntity blockEntity, Direction direction) { public IExternalStorage provide(IExternalStorageContext context, BlockEntity blockEntity, Direction direction) { return new ItemExternalStorage(context, () -> { Level level = blockEntity.getLevel(); - if (level == null) { return null; } - - BlockPos blockPos = blockEntity.getBlockPos(); - - if (!level.isLoaded(blockPos)) { - return null; - } - - BlockEntity currentBlockEntity = level.getBlockEntity(blockPos); - - return LevelUtils.getItemHandler(currentBlockEntity, direction.getOpposite()); + return LevelUtils.getItemHandler(level, blockEntity.getBlockPos(), direction.getOpposite()); }, blockEntity instanceof InterfaceBlockEntity); } diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/tracker/FluidStorageTracker.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/tracker/FluidStorageTracker.java index d520584a66..ed48cad326 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/tracker/FluidStorageTracker.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/storage/tracker/FluidStorageTracker.java @@ -7,8 +7,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/Comparer.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/Comparer.java index 20ebeb4f43..8eef7d25d3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/Comparer.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/Comparer.java @@ -2,8 +2,7 @@ import com.refinedmods.refinedstorage.api.util.IComparer; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; public class Comparer implements IComparer { diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/FluidFilter.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/FluidFilter.java index 7b0478e7c3..974c0e69a4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/FluidFilter.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/FluidFilter.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.apiimpl.util; import com.refinedmods.refinedstorage.api.util.IFilter; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class FluidFilter implements IFilter { private final FluidStack stack; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/FluidStackList.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/FluidStackList.java index 448665bbfa..7883b272c2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/FluidStackList.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/FluidStackList.java @@ -6,8 +6,7 @@ import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.world.level.material.Fluid; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/ItemStackList.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/ItemStackList.java index e4b0f0cfd7..f2e0d5d628 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/ItemStackList.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/ItemStackList.java @@ -7,8 +7,7 @@ import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collection; diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/QuantityFormatter.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/QuantityFormatter.java index 29039ea397..dd0e1546fa 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/QuantityFormatter.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/QuantityFormatter.java @@ -2,12 +2,11 @@ import com.refinedmods.refinedstorage.api.util.IQuantityFormatter; import com.refinedmods.refinedstorage.apiimpl.API; -import net.minecraftforge.fluids.FluidType; - import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; +import net.neoforged.neoforge.fluids.FluidType; public class QuantityFormatter implements IQuantityFormatter { private final DecimalFormat formatterWithUnits = new DecimalFormat("####0.#", DecimalFormatSymbols.getInstance(Locale.US)); diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSSavedData.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSSavedData.java index cdc6a21c59..7834dd47c7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSSavedData.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/util/RSSavedData.java @@ -30,7 +30,7 @@ public void save(File file) { NbtUtils.addCurrentDataVersion(tag); try { - NbtIo.writeCompressed(tag, tempFile); + NbtIo.writeCompressed(tag, tempFile.toPath()); if (file.exists()) { if (!file.delete()) { LOGGER.error("Failed to delete " + file.getName()); diff --git a/src/main/java/com/refinedmods/refinedstorage/block/BlockListener.java b/src/main/java/com/refinedmods/refinedstorage/block/BlockListener.java index 96e5d83155..744cfcdd9e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/BlockListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/BlockListener.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.block; -import net.minecraftforge.event.entity.player.PlayerEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.entity.player.PlayerEvent; public class BlockListener { // Allow break without tool diff --git a/src/main/java/com/refinedmods/refinedstorage/block/CableBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/CableBlock.java index 21e6cd3a55..fb07eaa22f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/CableBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/CableBlock.java @@ -7,11 +7,11 @@ import com.refinedmods.refinedstorage.apiimpl.network.node.cover.CoverType; import com.refinedmods.refinedstorage.block.shape.ShapeCache; import com.refinedmods.refinedstorage.blockentity.CableBlockEntity; -import com.refinedmods.refinedstorage.capability.NetworkNodeProxyCapability; import com.refinedmods.refinedstorage.render.ConstantsCable; import com.refinedmods.refinedstorage.util.BlockUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; @@ -56,7 +56,7 @@ public class CableBlock extends NetworkNodeBlock implements SimpleWaterloggedBlo private static final VoxelShape SHAPE_UP = box(6, 10, 6, 10, 16, 10); private static final VoxelShape SHAPE_DOWN = box(6, 0, 6, 10, 6, 10); - public CableBlock(Properties props) { + protected CableBlock(Properties props) { super(props); this.registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false)); } @@ -177,29 +177,29 @@ public FluidState getFluidState(BlockState state) { } @Override - public boolean placeLiquid(LevelAccessor worldIn, BlockPos pos, BlockState state, FluidState fluidStateIn) { - return SimpleWaterloggedBlock.super.placeLiquid(worldIn, pos, state, fluidStateIn); + public boolean placeLiquid(LevelAccessor world, BlockPos pos, BlockState state, FluidState fluidState) { + return SimpleWaterloggedBlock.super.placeLiquid(world, pos, state, fluidState); } @Override - public boolean canPlaceLiquid(BlockGetter worldIn, BlockPos pos, BlockState state, Fluid fluidIn) { - return SimpleWaterloggedBlock.super.canPlaceLiquid(worldIn, pos, state, fluidIn); + public boolean canPlaceLiquid(Player player, BlockGetter world, BlockPos pos, BlockState state, Fluid fluid) { + return SimpleWaterloggedBlock.super.canPlaceLiquid(player, world, pos, state, fluid); } - private boolean hasNodeConnection(LevelAccessor world, BlockPos pos, BlockState state, Direction direction) { + private boolean hasNodeConnection(LevelAccessor level, BlockPos pos, BlockState state, Direction direction) { // Prevent the "holder" of a cable block conflicting with a cable connection. if (getDirection() != BlockDirection.NONE && state.getValue(getDirection().getProperty()).getOpposite() == direction) { return false; } - BlockEntity blockEntity = world.getBlockEntity(pos); + BlockEntity blockEntity = level.getBlockEntity(pos); if (blockEntity == null) { return false; } - return blockEntity.getCapability(NetworkNodeProxyCapability.NETWORK_NODE_PROXY_CAPABILITY, direction).isPresent() + return level.getBlockEntity(pos) instanceof INetworkNodeProxy && !isSideCovered(blockEntity, direction) - && !isSideCovered(world.getBlockEntity(pos.relative(direction)), direction.getOpposite()); + && !isSideCovered(level.getBlockEntity(pos.relative(direction)), direction.getOpposite()); } private boolean isSideCovered(BlockEntity blockEntity, Direction direction) { @@ -207,10 +207,10 @@ private boolean isSideCovered(BlockEntity blockEntity, Direction direction) { return false; } - Optional node = blockEntity.getCapability(NetworkNodeProxyCapability.NETWORK_NODE_PROXY_CAPABILITY, direction).map(INetworkNodeProxy::getNode); + INetworkNode node = blockEntity instanceof INetworkNodeProxy proxy ? proxy.getNode() : null; - if (node.isPresent() && node.get() instanceof ICoverable) { - Cover cover = ((ICoverable) node.get()).getCoverManager().getCover(direction); + if (node instanceof ICoverable coverable) { + Cover cover = coverable.getCoverManager().getCover(direction); if (cover == null) { return false; } else { @@ -221,13 +221,13 @@ private boolean isSideCovered(BlockEntity blockEntity, Direction direction) { return false; } - private BlockState getState(BlockState currentState, LevelAccessor world, BlockPos pos) { - boolean north = hasNodeConnection(world, pos.relative(Direction.NORTH), currentState, Direction.SOUTH); - boolean east = hasNodeConnection(world, pos.relative(Direction.EAST), currentState, Direction.WEST); - boolean south = hasNodeConnection(world, pos.relative(Direction.SOUTH), currentState, Direction.NORTH); - boolean west = hasNodeConnection(world, pos.relative(Direction.WEST), currentState, Direction.EAST); - boolean up = hasNodeConnection(world, pos.relative(Direction.UP), currentState, Direction.DOWN); - boolean down = hasNodeConnection(world, pos.relative(Direction.DOWN), currentState, Direction.UP); + private BlockState getState(BlockState currentState, LevelAccessor level, BlockPos pos) { + boolean north = hasNodeConnection(level, pos.relative(Direction.NORTH), currentState, Direction.SOUTH); + boolean east = hasNodeConnection(level, pos.relative(Direction.EAST), currentState, Direction.WEST); + boolean south = hasNodeConnection(level, pos.relative(Direction.SOUTH), currentState, Direction.NORTH); + boolean west = hasNodeConnection(level, pos.relative(Direction.WEST), currentState, Direction.EAST); + boolean up = hasNodeConnection(level, pos.relative(Direction.UP), currentState, Direction.DOWN); + boolean down = hasNodeConnection(level, pos.relative(Direction.DOWN), currentState, Direction.UP); return currentState .setValue(NORTH, north) diff --git a/src/main/java/com/refinedmods/refinedstorage/block/ConstructorBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/ConstructorBlock.java index 20daaefd2c..b73508aa33 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/ConstructorBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/ConstructorBlock.java @@ -24,7 +24,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraftforge.network.NetworkHooks; public class ConstructorBlock extends CableBlock { private static final VoxelShape HEAD_NORTH = Shapes.or(box(2, 2, 0, 14, 14, 2), HOLDER_NORTH); @@ -93,8 +92,7 @@ private VoxelShape getHeadShape(BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { if (!level.isClientSide && CollisionUtils.isInBounds(getHeadShape(state), pos, hit.getLocation())) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.constructor"), (blockEntity, windowId, inventory, p) -> new ConstructorContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/ControllerBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/ControllerBlock.java index 9d2bbf6062..a900b2518a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/ControllerBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/ControllerBlock.java @@ -11,6 +11,7 @@ import com.refinedmods.refinedstorage.util.ColorMap; import com.refinedmods.refinedstorage.util.NetworkUtils; import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; @@ -32,8 +33,8 @@ import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.network.NetworkHooks; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.IEnergyStorage; import javax.annotation.Nullable; @@ -64,13 +65,13 @@ public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable L super.setPlacedBy(level, pos, state, entity, stack); if (!level.isClientSide) { - stack.getCapability(ForgeCapabilities.ENERGY).ifPresent(energyFromStack -> { - BlockEntity blockEntity = level.getBlockEntity(pos); - - if (blockEntity != null) { - blockEntity.getCapability(ForgeCapabilities.ENERGY).ifPresent(energyFromBlockEntity -> energyFromBlockEntity.receiveEnergy(energyFromStack.getEnergyStored(), false)); + IEnergyStorage energyFromStack = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (energyFromStack != null) { + IEnergyStorage energyFromBlockEntity = level.getCapability(Capabilities.EnergyStorage.BLOCK, pos, Direction.NORTH); + if (energyFromBlockEntity != null) { + energyFromBlockEntity.receiveEnergy(energyFromStack.getEnergyStored(), false); } - }); + } } } @@ -95,7 +96,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player return result; } - ColorMap colorMap = type == NetworkType.CREATIVE ? RSBlocks.CREATIVE_CONTROLLER : RSBlocks.CONTROLLER; + ColorMap colorMap = type == NetworkType.CREATIVE ? RSBlocks.CREATIVE_CONTROLLER : RSBlocks.CONTROLLER; DyeColor color = DyeColor.getColor(player.getItemInHand(hand)); if (color != null && !state.getBlock().equals(colorMap.get(color).get())) { @@ -105,8 +106,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new MenuProvider() { @Override public Component getDisplayName() { diff --git a/src/main/java/com/refinedmods/refinedstorage/block/CrafterBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/CrafterBlock.java index d5ff308b6e..817f7d8d16 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/CrafterBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/CrafterBlock.java @@ -18,8 +18,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; - import javax.annotation.Nullable; public class CrafterBlock extends ColoredNetworkBlock { @@ -55,8 +53,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - return NetworkUtils.attempt(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attempt(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( ((CrafterBlockEntity) level.getBlockEntity(pos)).getNode().getName(), (blockEntity, windowId, inventory, p) -> new CrafterContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/CrafterManagerBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/CrafterManagerBlock.java index 81aab0d3d3..9d93b7269b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/CrafterManagerBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/CrafterManagerBlock.java @@ -7,7 +7,6 @@ import com.refinedmods.refinedstorage.util.BlockUtils; import com.refinedmods.refinedstorage.util.NetworkUtils; import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -15,7 +14,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class CrafterManagerBlock extends ColoredNetworkBlock { public CrafterManagerBlock() { @@ -41,8 +39,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - return NetworkUtils.attempt(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attempt(level, pos, player, () -> player.openMenu( new CrafterManagerMenuProvider((CrafterManagerBlockEntity) level.getBlockEntity(pos)), buf -> CrafterManagerMenuProvider.writeToBuffer(buf, level, pos) ), Permission.MODIFY, Permission.AUTOCRAFTING); diff --git a/src/main/java/com/refinedmods/refinedstorage/block/CraftingMonitorBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/CraftingMonitorBlock.java index 310f7a597c..d0a8c2d792 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/CraftingMonitorBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/CraftingMonitorBlock.java @@ -8,7 +8,6 @@ import com.refinedmods.refinedstorage.util.BlockUtils; import com.refinedmods.refinedstorage.util.NetworkUtils; import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -16,7 +15,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class CraftingMonitorBlock extends ColoredNetworkBlock { public CraftingMonitorBlock() { @@ -44,8 +42,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player if (!level.isClientSide) { CraftingMonitorBlockEntity blockEntity = (CraftingMonitorBlockEntity) level.getBlockEntity(pos); - return NetworkUtils.attempt(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attempt(level, pos, player, () -> player.openMenu( new CraftingMonitorMenuProvider(RSContainerMenus.CRAFTING_MONITOR.get(), blockEntity.getNode(), blockEntity), pos ), Permission.MODIFY, Permission.AUTOCRAFTING); diff --git a/src/main/java/com/refinedmods/refinedstorage/block/DestructorBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/DestructorBlock.java index af72f9fbb9..0687c7eaac 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/DestructorBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/DestructorBlock.java @@ -24,7 +24,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraftforge.network.NetworkHooks; public class DestructorBlock extends CableBlock { private static final VoxelShape HEAD_NORTH = Shapes.or(box(2, 2, 0, 14, 14, 2), HOLDER_NORTH); @@ -93,8 +92,7 @@ private VoxelShape getHeadShape(BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (!level.isClientSide && CollisionUtils.isInBounds(getHeadShape(state), pos, hit.getLocation())) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.destructor"), (blockEntity, windowId, inventory, p) -> new DestructorContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/DetectorBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/DetectorBlock.java index 174744cad6..a60bf2ace7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/DetectorBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/DetectorBlock.java @@ -26,7 +26,6 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraftforge.network.NetworkHooks; public class DetectorBlock extends ColoredNetworkBlock { public static final BooleanProperty POWERED = BooleanProperty.create("powered"); @@ -69,7 +68,7 @@ public int getSignal(BlockState state, BlockGetter world, BlockPos pos, Directio @Override @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { - ColorMap colorMap = RSBlocks.DETECTOR; + ColorMap colorMap = RSBlocks.DETECTOR; DyeColor color = DyeColor.getColor(player.getItemInHand(hand)); if (color != null && !state.getBlock().equals(colorMap.get(color).get())) { @@ -79,8 +78,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.detector"), (blockEntity, windowId, inventory, p) -> new DetectorContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/DiskDriveBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/DiskDriveBlock.java index e12a5cf3d3..da7ee0f14a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/DiskDriveBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/DiskDriveBlock.java @@ -16,7 +16,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class DiskDriveBlock extends NetworkNodeBlock { public DiskDriveBlock() { @@ -37,8 +36,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult rayTraceResult) { if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.disk_drive"), (blockEntity, windowId, inventory, p) -> new DiskDriveContainerMenu(blockEntity, p, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/DiskManipulatorBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/DiskManipulatorBlock.java index 82d2c432f0..d42ee5699a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/DiskManipulatorBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/DiskManipulatorBlock.java @@ -9,7 +9,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -17,7 +16,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class DiskManipulatorBlock extends ColoredNetworkBlock { public DiskManipulatorBlock() { @@ -38,8 +36,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.disk_manipulator"), (blockEntity, windowId, inventory, p) -> new DiskManipulatorContainerMenu(blockEntity, p, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/ExporterBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/ExporterBlock.java index 1f513b84da..0e2a7ca66b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/ExporterBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/ExporterBlock.java @@ -24,7 +24,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraftforge.network.NetworkHooks; public class ExporterBlock extends CableBlock { private static final VoxelShape LINE_NORTH_1 = box(6, 6, 0, 10, 10, 2); @@ -117,8 +116,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { if (!level.isClientSide && CollisionUtils.isInBounds(getLineShape(state), pos, hit.getLocation())) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.exporter"), (blockEntity, windowId, inventory, p) -> new ExporterContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/ExternalStorageBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/ExternalStorageBlock.java index add7e81a86..3beb12d94d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/ExternalStorageBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/ExternalStorageBlock.java @@ -28,7 +28,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraftforge.network.NetworkHooks; public class ExternalStorageBlock extends CableBlock { private static final VoxelShape HEAD_NORTH = Shapes.or(box(3, 3, 0, 13, 13, 2), HOLDER_NORTH); @@ -97,8 +96,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { if (!level.isClientSide && CollisionUtils.isInBounds(getHeadShape(state), pos, hit.getLocation())) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.external_storage"), (blockEntity, windowId, inventory, p) -> new ExternalStorageContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/FluidInterfaceBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/FluidInterfaceBlock.java index dc60b7a875..a8abaf0c74 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/FluidInterfaceBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/FluidInterfaceBlock.java @@ -17,7 +17,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class FluidInterfaceBlock extends NetworkNodeBlock { public FluidInterfaceBlock() { @@ -33,8 +32,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (!level.isClientSide) { - return NetworkUtils.attempt(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attempt(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.fluid_interface"), (blockEntity, windowId, inventory, p) -> new FluidInterfaceContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/FluidStorageBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/FluidStorageBlock.java index 55168cbfd7..97633253ef 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/FluidStorageBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/FluidStorageBlock.java @@ -18,7 +18,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class FluidStorageBlock extends NetworkNodeBlock { private final FluidStorageType type; @@ -58,7 +57,8 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen((ServerPlayer) player, new BlockEntityMenuProvider( + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( + new BlockEntityMenuProvider( ((FluidStorageBlockEntity) level.getBlockEntity(pos)).getNode().getTitle(), (blockEntity, windowId, inventory, p) -> new FluidStorageContainerMenu(blockEntity, player, windowId), pos diff --git a/src/main/java/com/refinedmods/refinedstorage/block/GridBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/GridBlock.java index 229ff2706c..3ae8575dfd 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/GridBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/GridBlock.java @@ -5,15 +5,19 @@ import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.GridBlockGridFactory; import com.refinedmods.refinedstorage.blockentity.grid.GridBlockEntity; +import com.refinedmods.refinedstorage.util.BlockColorMap; import com.refinedmods.refinedstorage.util.BlockUtils; import com.refinedmods.refinedstorage.util.ColorMap; import com.refinedmods.refinedstorage.util.NetworkUtils; + +import net.minecraft.client.color.block.BlockColor; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; @@ -45,7 +49,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @Override @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { - ColorMap map; + BlockColorMap map; switch (type) { case FLUID: map = RSBlocks.FLUID_GRID; diff --git a/src/main/java/com/refinedmods/refinedstorage/block/ImporterBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/ImporterBlock.java index 48dc8da1d5..27ee841076 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/ImporterBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/ImporterBlock.java @@ -24,7 +24,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraftforge.network.NetworkHooks; public class ImporterBlock extends CableBlock { private static final VoxelShape LINE_NORTH_1 = box(6, 6, 4, 10, 10, 6); @@ -116,8 +115,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { if (!level.isClientSide && CollisionUtils.isInBounds(getLineShape(state), pos, hit.getLocation())) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.importer"), (blockEntity, windowId, inventory, p) -> new ImporterContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/InterfaceBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/InterfaceBlock.java index c665db67aa..41a63639df 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/InterfaceBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/InterfaceBlock.java @@ -17,7 +17,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class InterfaceBlock extends NetworkNodeBlock { public InterfaceBlock() { @@ -33,8 +32,7 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (!level.isClientSide) { - return NetworkUtils.attempt(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attempt(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.interface"), (blockEntity, windowId, inventory, p) -> new InterfaceContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/NetworkNodeBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/NetworkNodeBlock.java index ecf16fe6f8..ee18e2dcbb 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/NetworkNodeBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/NetworkNodeBlock.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BooleanProperty; -import net.minecraftforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandler; public abstract class NetworkNodeBlock extends BaseBlock implements EntityBlock { public static final BooleanProperty CONNECTED = BooleanProperty.create("connected"); diff --git a/src/main/java/com/refinedmods/refinedstorage/block/NetworkTransmitterBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/NetworkTransmitterBlock.java index 67732b1b62..e73733bc4a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/NetworkTransmitterBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/NetworkTransmitterBlock.java @@ -8,7 +8,6 @@ import com.refinedmods.refinedstorage.util.NetworkUtils; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -16,7 +15,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class NetworkTransmitterBlock extends ColoredNetworkBlock { public NetworkTransmitterBlock() { @@ -37,8 +35,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.network_transmitter"), (blockEntity, windowId, inventory, p) -> new NetworkTransmitterContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/RelayBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/RelayBlock.java index 7310c6417d..4140971360 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/RelayBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/RelayBlock.java @@ -9,7 +9,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -17,7 +16,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class RelayBlock extends ColoredNetworkBlock { public RelayBlock() { @@ -38,8 +36,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.relay"), (blockEntity, windowId, inventory, p) -> new RelayContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/SecurityManagerBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/SecurityManagerBlock.java index 97e032bbbf..c578cf01e6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/SecurityManagerBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/SecurityManagerBlock.java @@ -10,7 +10,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; -import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -18,7 +17,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; public class SecurityManagerBlock extends ColoredNetworkBlock { public SecurityManagerBlock() { @@ -39,8 +37,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - Runnable action = () -> NetworkHooks.openScreen( - (ServerPlayer) player, + Runnable action = () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.security_manager"), (blockEntity, windowId, inventory, p) -> new SecurityManagerContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/StorageBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/StorageBlock.java index a3a9ea9ef9..5009e75efc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/StorageBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/StorageBlock.java @@ -18,8 +18,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; -import net.minecraftforge.network.NetworkHooks; - import javax.annotation.Nullable; public class StorageBlock extends NetworkNodeBlock { @@ -60,7 +58,8 @@ public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { @SuppressWarnings("deprecation") public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen((ServerPlayer) player, new BlockEntityMenuProvider( + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( + new BlockEntityMenuProvider( ((StorageBlockEntity) level.getBlockEntity(pos)).getNode().getTitle(), (blockEntity, windowId, inventory, p) -> new StorageContainerMenu(blockEntity, player, windowId), pos diff --git a/src/main/java/com/refinedmods/refinedstorage/block/StorageMonitorBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/StorageMonitorBlock.java index 1412c667d1..658e0f4f8a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/StorageMonitorBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/StorageMonitorBlock.java @@ -20,7 +20,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; -import net.minecraftforge.network.NetworkHooks; public class StorageMonitorBlock extends NetworkNodeBlock { public StorageMonitorBlock() { @@ -44,8 +43,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player ItemStack held = player.getItemInHand(handIn); if (player.isCrouching()) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.storage_monitor"), (blockEntity, windowId, inventory, p) -> new StorageMonitorContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/block/WirelessTransmitterBlock.java b/src/main/java/com/refinedmods/refinedstorage/block/WirelessTransmitterBlock.java index 892d6a780d..959061a662 100644 --- a/src/main/java/com/refinedmods/refinedstorage/block/WirelessTransmitterBlock.java +++ b/src/main/java/com/refinedmods/refinedstorage/block/WirelessTransmitterBlock.java @@ -21,7 +21,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraftforge.network.NetworkHooks; public class WirelessTransmitterBlock extends ColoredNetworkBlock { private static final VoxelShape SHAPE_DOWN = box(6.0D, 0.0D, 6.0D, 10.0D, 10.0D, 10.0D); @@ -80,8 +79,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player } if (!level.isClientSide) { - return NetworkUtils.attemptModify(level, pos, player, () -> NetworkHooks.openScreen( - (ServerPlayer) player, + return NetworkUtils.attemptModify(level, pos, player, () -> player.openMenu( new BlockEntityMenuProvider( Component.translatable("gui.refinedstorage.wireless_transmitter"), (blockEntity, windowId, inventory, p) -> new WirelessTransmitterContainerMenu(blockEntity, player, windowId), diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/CableBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/CableBlockEntity.java index cbd13e6ed3..15409d92c9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/CableBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/CableBlockEntity.java @@ -13,8 +13,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; - +import net.neoforged.neoforge.client.model.data.ModelData; import javax.annotation.Nonnull; public class CableBlockEntity extends NetworkNodeBlockEntity { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ConstructorBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ConstructorBlockEntity.java index b673dd6e2c..2170631309 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ConstructorBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ConstructorBlockEntity.java @@ -15,8 +15,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; - +import net.neoforged.neoforge.client.model.data.ModelData; import javax.annotation.Nonnull; public class ConstructorBlockEntity extends NetworkNodeBlockEntity { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ControllerBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ControllerBlockEntity.java index 84952d970e..c3705ed502 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ControllerBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ControllerBlockEntity.java @@ -15,23 +15,16 @@ import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationSpec; import com.refinedmods.refinedstorage.blockentity.data.RSSerializers; -import com.refinedmods.refinedstorage.capability.NetworkNodeProxyCapability; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.IEnergyStorage; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; @@ -52,11 +45,9 @@ public class ControllerBlockEntity extends BaseBlockEntity implements INetworkNo .addParameter(NODES) .build(); - private final LazyOptional> networkNodeProxyCap = LazyOptional.of(() -> this); private final NetworkType type; private INetwork removedNetwork; private Network dummyNetwork; - private final LazyOptional energyProxyCap = LazyOptional.of(() -> getNetwork().getEnergyStorage()); public ControllerBlockEntity(NetworkType type, BlockPos pos, BlockState state) { super(type == NetworkType.CREATIVE ? RSBlockEntities.CREATIVE_CONTROLLER.get() : RSBlockEntities.CONTROLLER.get(), pos, state, SPEC); @@ -164,18 +155,4 @@ public RedstoneMode getRedstoneMode() { public void setRedstoneMode(RedstoneMode mode) { ((Network) getNetwork()).setRedstoneMode(mode); } - - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ENERGY) { - return energyProxyCap.cast(); - } - - if (cap == NetworkNodeProxyCapability.NETWORK_NODE_PROXY_CAPABILITY) { - return networkNodeProxyCap.cast(); - } - - return super.getCapability(cap, direction); - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java index 3c2145ff9c..7096d62e48 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/CrafterBlockEntity.java @@ -6,23 +6,27 @@ import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationSpec; import com.refinedmods.refinedstorage.screen.CrafterBlockEntitySynchronizationClientListener; + +import javax.annotation.Nonnull; + import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.IItemHandler; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; +import net.neoforged.neoforge.items.IItemHandler; public class CrafterBlockEntity extends NetworkNodeBlockEntity { - public static final BlockEntitySynchronizationParameter MODE = new BlockEntitySynchronizationParameter<>(new ResourceLocation(RS.ID, "crafter_mode"), EntityDataSerializers.INT, CrafterNetworkNode.CrafterMode.IGNORE.ordinal(), t -> t.getNode().getMode().ordinal(), (t, v) -> t.getNode().setMode(CrafterNetworkNode.CrafterMode.getById(v))); - private static final BlockEntitySynchronizationParameter HAS_ROOT = new BlockEntitySynchronizationParameter<>(new ResourceLocation(RS.ID, "crafter_has_root"), EntityDataSerializers.BOOLEAN, false, t -> t.getNode().getRootContainerNotSelf().isPresent(), null, (t, v) -> new CrafterBlockEntitySynchronizationClientListener().onChanged(t, v)); + public static final BlockEntitySynchronizationParameter MODE = + new BlockEntitySynchronizationParameter<>(new ResourceLocation(RS.ID, "crafter_mode"), + EntityDataSerializers.INT, CrafterNetworkNode.CrafterMode.IGNORE.ordinal(), + t -> t.getNode().getMode().ordinal(), + (t, v) -> t.getNode().setMode(CrafterNetworkNode.CrafterMode.getById(v))); + private static final BlockEntitySynchronizationParameter HAS_ROOT = + new BlockEntitySynchronizationParameter<>(new ResourceLocation(RS.ID, "crafter_has_root"), + EntityDataSerializers.BOOLEAN, false, t -> t.getNode().getRootContainerNotSelf().isPresent(), null, + (t, v) -> new CrafterBlockEntitySynchronizationClientListener().onChanged(t, v)); public static BlockEntitySynchronizationSpec SPEC = BlockEntitySynchronizationSpec.builder() .addWatchedParameter(REDSTONE_MODE) @@ -30,8 +34,6 @@ public class CrafterBlockEntity extends NetworkNodeBlockEntity patternsCapability = LazyOptional.of(() -> getNode().getPatternInventory()); - public CrafterBlockEntity(BlockPos pos, BlockState state) { super(RSBlockEntities.CRAFTER.get(), pos, state, SPEC, CrafterNetworkNode.class); } @@ -42,13 +44,10 @@ public CrafterNetworkNode createNode(Level level, BlockPos pos) { return new CrafterNetworkNode(level, pos); } - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ITEM_HANDLER && direction != null && !direction.equals(this.getNode().getDirection())) { - return patternsCapability.cast(); + public IItemHandler getPatterns(Direction direction) { + if (!direction.equals(this.getNode().getDirection())) { + return getNode().getPatternInventory(); } - - return super.getCapability(cap, direction); + return null; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/DestructorBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/DestructorBlockEntity.java index 5505b13f71..b4c4e2f762 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/DestructorBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/DestructorBlockEntity.java @@ -16,8 +16,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; - +import net.neoforged.neoforge.client.model.data.ModelData; import javax.annotation.Nonnull; public class DestructorBlockEntity extends NetworkNodeBlockEntity { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskDriveBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskDriveBlockEntity.java index 05b727f6b0..59a67eae0a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskDriveBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskDriveBlockEntity.java @@ -12,7 +12,6 @@ import com.refinedmods.refinedstorage.blockentity.data.RSSerializers; import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.IntTag; import net.minecraft.nbt.ListTag; @@ -20,15 +19,9 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; -import net.minecraftforge.client.model.data.ModelProperty; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelProperty; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Arrays; public class DiskDriveBlockEntity extends NetworkNodeBlockEntity { @@ -94,8 +87,6 @@ public class DiskDriveBlockEntity extends NetworkNodeBlockEntity diskCapability = LazyOptional.of(() -> getNode().getDisks()); - private final DiskState[] diskState = new DiskState[8]; public DiskDriveBlockEntity(BlockPos pos, BlockState state) { @@ -139,16 +130,6 @@ public ModelData getModelData() { return ModelData.builder().with(DISK_STATE_PROPERTY, diskState).build(); } - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ITEM_HANDLER) { - return diskCapability.cast(); - } - - return super.getCapability(cap, direction); - } - @Override @Nonnull public DiskDriveNetworkNode createNode(Level level, BlockPos pos) { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskManipulatorBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskManipulatorBlockEntity.java index 8c815c0bd7..96e3befbd2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskManipulatorBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/DiskManipulatorBlockEntity.java @@ -11,7 +11,6 @@ import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationSpec; import com.refinedmods.refinedstorage.util.LevelUtils; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.IntTag; import net.minecraft.nbt.ListTag; @@ -20,15 +19,9 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; -import net.minecraftforge.client.model.data.ModelProperty; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.data.ModelProperty; import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Arrays; public class DiskManipulatorBlockEntity extends NetworkNodeBlockEntity { @@ -52,8 +45,6 @@ public class DiskManipulatorBlockEntity extends NetworkNodeBlockEntity diskCapability = LazyOptional.of(() -> getNode().getDisks()); - private final DiskState[] diskState = new DiskState[6]; public DiskManipulatorBlockEntity(BlockPos pos, BlockState state) { @@ -97,16 +88,6 @@ public ModelData getModelData() { return ModelData.builder().with(DISK_STATE_PROPERTY, diskState).build(); } - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ITEM_HANDLER) { - return diskCapability.cast(); - } - - return super.getCapability(cap, direction); - } - @Override @Nonnull public DiskManipulatorNetworkNode createNode(Level level, BlockPos pos) { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ExporterBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ExporterBlockEntity.java index 5aa2ffc481..a22619370c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ExporterBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ExporterBlockEntity.java @@ -15,8 +15,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; - +import net.neoforged.neoforge.client.model.data.ModelData; import javax.annotation.Nonnull; public class ExporterBlockEntity extends NetworkNodeBlockEntity { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ExternalStorageBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ExternalStorageBlockEntity.java index 54f2a58261..07e08acfc7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ExternalStorageBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ExternalStorageBlockEntity.java @@ -19,9 +19,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.client.model.data.ModelData; +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; public class ExternalStorageBlockEntity extends NetworkNodeBlockEntity { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/FluidInterfaceBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/FluidInterfaceBlockEntity.java index 103e11b80c..78074ccfa0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/FluidInterfaceBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/FluidInterfaceBlockEntity.java @@ -7,19 +7,11 @@ import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationSpec; import com.refinedmods.refinedstorage.blockentity.data.RSSerializers; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; -import javax.annotation.Nullable; public class FluidInterfaceBlockEntity extends NetworkNodeBlockEntity { public static final BlockEntitySynchronizationParameter TANK_IN = new BlockEntitySynchronizationParameter<>(new ResourceLocation(RS.ID, "fluid_interface_in"), RSSerializers.FLUID_STACK_SERIALIZER, FluidStack.EMPTY, t -> t.getNode().getTankIn().getFluid()); @@ -31,25 +23,10 @@ public class FluidInterfaceBlockEntity extends NetworkNodeBlockEntity tankCapability = LazyOptional.of(() -> getNode().getTank()); - private final LazyOptional inCapability = LazyOptional.of(() -> getNode().getIn()); - public FluidInterfaceBlockEntity(BlockPos pos, BlockState state) { super(RSBlockEntities.FLUID_INTERFACE.get(), pos, state, SPEC, FluidInterfaceNetworkNode.class); } - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ITEM_HANDLER) { - return inCapability.cast(); - } else if (cap == ForgeCapabilities.FLUID_HANDLER) { - return tankCapability.cast(); - } - - return super.getCapability(cap, direction); - } - @Override @Nonnull public FluidInterfaceNetworkNode createNode(Level level, BlockPos pos) { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/ImporterBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/ImporterBlockEntity.java index 59d1b0c435..0c1769db10 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/ImporterBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/ImporterBlockEntity.java @@ -16,8 +16,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; - +import net.neoforged.neoforge.client.model.data.ModelData; import javax.annotation.Nonnull; public class ImporterBlockEntity extends NetworkNodeBlockEntity { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/InterfaceBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/InterfaceBlockEntity.java index f8fa2aa483..cc4ca0aa2e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/InterfaceBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/InterfaceBlockEntity.java @@ -7,17 +7,10 @@ import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationSpec; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.IItemHandler; - import javax.annotation.Nonnull; -import javax.annotation.Nullable; public class InterfaceBlockEntity extends NetworkNodeBlockEntity { public static final BlockEntitySynchronizationParameter COMPARE = IComparable.createParameter(new ResourceLocation(RS.ID, "interface_compare")); @@ -27,22 +20,10 @@ public class InterfaceBlockEntity extends NetworkNodeBlockEntity itemsCapability = LazyOptional.of(() -> getNode().getItems()); - public InterfaceBlockEntity(BlockPos pos, BlockState state) { super(RSBlockEntities.INTERFACE.get(), pos, state, SPEC, InterfaceNetworkNode.class); } - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ITEM_HANDLER) { - return itemsCapability.cast(); - } - - return super.getCapability(cap, direction); - } - @Override @Nonnull public InterfaceNetworkNode createNode(Level level, BlockPos pos) { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/NetworkNodeBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/NetworkNodeBlockEntity.java index f37e4a9c53..fe42d5a73a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/NetworkNodeBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/NetworkNodeBlockEntity.java @@ -11,7 +11,6 @@ import com.refinedmods.refinedstorage.blockentity.config.RedstoneMode; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationSpec; -import com.refinedmods.refinedstorage.capability.NetworkNodeProxyCapability; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; @@ -19,8 +18,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.util.LazyOptional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -30,20 +27,12 @@ public abstract class NetworkNodeBlockEntity extends BaseBlockEntity implements INetworkNodeProxy, IRedstoneConfigurable { public static final BlockEntitySynchronizationParameter> REDSTONE_MODE = RedstoneMode.createParameter(new ResourceLocation(RS.ID, "redstone_mode")); - private final LazyOptional> networkNodeProxy = LazyOptional.of(() -> this); private final Class networkNodeClass; private N clientNode; private N removedNode; private static final Logger LOGGER = LogManager.getLogger(); - // TODO: remove this ctor in 1.21 - @Deprecated - protected NetworkNodeBlockEntity(BlockEntityType type, BlockPos pos, BlockState state, BlockEntitySynchronizationSpec syncSpec) { - super(type, pos, state, syncSpec); - this.networkNodeClass = null; - } - protected NetworkNodeBlockEntity(BlockEntityType type, BlockPos pos, BlockState state, BlockEntitySynchronizationSpec syncSpec, Class networkNodeClass) { super(type, pos, state, syncSpec); @@ -148,14 +137,4 @@ public N getRemovedNode() { } public abstract N createNode(Level level, BlockPos pos); - - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == NetworkNodeProxyCapability.NETWORK_NODE_PROXY_CAPABILITY) { - return networkNodeProxy.cast(); - } - - return super.getCapability(cap, direction); - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/NetworkTransmitterBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/NetworkTransmitterBlockEntity.java index 19d2087098..ea05822d43 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/NetworkTransmitterBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/NetworkTransmitterBlockEntity.java @@ -7,18 +7,11 @@ import com.refinedmods.refinedstorage.blockentity.data.RSSerializers; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.IItemHandler; - import javax.annotation.Nonnull; -import javax.annotation.Nullable; import java.util.Optional; public class NetworkTransmitterBlockEntity extends NetworkNodeBlockEntity { @@ -37,8 +30,6 @@ public class NetworkTransmitterBlockEntity extends NetworkNodeBlockEntity networkCardCapability = LazyOptional.of(() -> getNode().getNetworkCard()); - public NetworkTransmitterBlockEntity(BlockPos pos, BlockState state) { super(RSBlockEntities.NETWORK_TRANSMITTER.get(), pos, state, SPEC, NetworkTransmitterNetworkNode.class); } @@ -48,14 +39,4 @@ public NetworkTransmitterBlockEntity(BlockPos pos, BlockState state) { public NetworkTransmitterNetworkNode createNode(Level level, BlockPos pos) { return new NetworkTransmitterNetworkNode(level, pos); } - - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ITEM_HANDLER) { - return networkCardCapability.cast(); - } - - return super.getCapability(cap, direction); - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/StorageMonitorBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/StorageMonitorBlockEntity.java index 3264c9c0b3..f4208ab386 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/StorageMonitorBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/StorageMonitorBlockEntity.java @@ -14,8 +14,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; public class StorageMonitorBlockEntity extends NetworkNodeBlockEntity { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/config/IType.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/config/IType.java index 3cdfe12971..3dadf55138 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/config/IType.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/config/IType.java @@ -7,8 +7,7 @@ import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nullable; public interface IType { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/config/IWhitelistBlacklist.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/config/IWhitelistBlacklist.java index 62cc911475..2fc45067c7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/config/IWhitelistBlacklist.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/config/IWhitelistBlacklist.java @@ -8,8 +8,8 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandler; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.IItemHandler; public interface IWhitelistBlacklist { int WHITELIST = 0; diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/data/BlockEntitySynchronizationManager.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/data/BlockEntitySynchronizationManager.java index 2bdd583f72..d06cddfb5c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/data/BlockEntitySynchronizationManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/data/BlockEntitySynchronizationManager.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.blockentity.data; import com.refinedmods.refinedstorage.RS; -import com.refinedmods.refinedstorage.network.sync.BlockEntitySynchronizationParamaterUpdateMessage; +import com.refinedmods.refinedstorage.network.sync.BlockEntitySynchronizationParameterUpdateMessage; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.entity.BlockEntity; @@ -58,6 +58,6 @@ public static BlockEntitySynchronizationParameter getParameter(ResourceLocation } public static void setParameter(BlockEntitySynchronizationParameter parameter, Object value) { - RS.NETWORK_HANDLER.sendToServer(new BlockEntitySynchronizationParamaterUpdateMessage(parameter, value)); + RS.NETWORK_HANDLER.sendToServer(new BlockEntitySynchronizationParameterUpdateMessage(parameter, value)); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/data/BlockEntitySynchronizationWatcher.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/data/BlockEntitySynchronizationWatcher.java index f47c513190..96f5d92d6b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/data/BlockEntitySynchronizationWatcher.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/data/BlockEntitySynchronizationWatcher.java @@ -53,6 +53,10 @@ public void detectAndSendChanges() { } public void sendParameter(boolean initial, BlockEntitySynchronizationParameter parameter) { - RS.NETWORK_HANDLER.sendTo(player, new BlockEntitySynchronizationParameterMessage(manager.getBlockEntity(), parameter, initial)); + RS.NETWORK_HANDLER.sendTo(player, new BlockEntitySynchronizationParameterMessage( + parameter, + parameter.getValueProducer().apply(manager.getBlockEntity()), + initial + )); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/data/RSSerializers.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/data/RSSerializers.java index 74a1a78020..5e49f7725e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/data/RSSerializers.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/data/RSSerializers.java @@ -7,8 +7,7 @@ import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializer; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.*; public final class RSSerializers { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/GridBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/GridBlockEntity.java index a7b33a8064..b7fd913737 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/GridBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/GridBlockEntity.java @@ -19,11 +19,8 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.energy.IEnergyStorage; +import net.neoforged.neoforge.items.IItemHandler; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; @@ -116,7 +113,6 @@ public static void trySortGrid(boolean initial) { } private final GridType type; - private final LazyOptional diskCapability = LazyOptional.of(() -> getNode().getPatterns()); public GridBlockEntity(GridType type, BlockPos pos, BlockState state) { super(getType(type), pos, state, SPEC, GridNetworkNode.class); @@ -129,13 +125,10 @@ public GridNetworkNode createNode(Level level, BlockPos pos) { return new GridNetworkNode(level, pos, type); } - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ITEM_HANDLER && type == GridType.PATTERN) { - return diskCapability.cast(); + public IItemHandler getInventory() { + if (type == GridType.PATTERN) { + return getNode().getPatterns(); } - - return super.getCapability(cap, direction); + return null; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/WirelessFluidGrid.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/WirelessFluidGrid.java index 01f5372512..b61edad9d5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/WirelessFluidGrid.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/WirelessFluidGrid.java @@ -30,8 +30,7 @@ import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/WirelessGrid.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/WirelessGrid.java index e937f1f3a9..cf5aa19f72 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/WirelessGrid.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/WirelessGrid.java @@ -31,8 +31,7 @@ import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/IPortableGrid.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/IPortableGrid.java index c580ecf727..eeead09439 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/IPortableGrid.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/IPortableGrid.java @@ -5,9 +5,8 @@ import com.refinedmods.refinedstorage.api.storage.tracker.IStorageTracker; import com.refinedmods.refinedstorage.inventory.item.BaseItemHandler; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nullable; public interface IPortableGrid { diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGrid.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGrid.java index ef6f32f8f1..c20f01124e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGrid.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGrid.java @@ -48,13 +48,14 @@ import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.EnergyStorage; +import net.neoforged.neoforge.energy.IEnergyStorage; +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.UUID; public class PortableGrid implements IGrid, IPortableGrid, IStorageDiskContainerContext { @@ -190,15 +191,17 @@ public IStorageDisk getStorage() { @Override public void drainEnergy(int energy) { if (RS.SERVER_CONFIG.getPortableGrid().getUseEnergy() && ((PortableGridBlockItem) stack.getItem()).getType() != PortableGridBlockItem.Type.CREATIVE) { - stack.getCapability(ForgeCapabilities.ENERGY, null) - .ifPresent(energyStorage -> energyStorage.extractEnergy(energy, false)); + IEnergyStorage energyStorage = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (energyStorage != null) { + energyStorage.extractEnergy(energy, false); + } } } @Override public int getEnergy() { if (RS.SERVER_CONFIG.getPortableGrid().getUseEnergy() && ((PortableGridBlockItem) stack.getItem()).getType() != PortableGridBlockItem.Type.CREATIVE) { - return stack.getCapability(ForgeCapabilities.ENERGY, null) + return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM)) .map(IEnergyStorage::getEnergyStored) .orElse(RS.SERVER_CONFIG.getPortableGrid().getCapacity()); } @@ -450,7 +453,7 @@ private boolean hasDisk() { public boolean isGridActive() { if (RS.SERVER_CONFIG.getPortableGrid().getUseEnergy() && ((PortableGridBlockItem) stack.getItem()).getType() != PortableGridBlockItem.Type.CREATIVE && - stack.getCapability(ForgeCapabilities.ENERGY).orElse(null).getEnergyStored() <= RS.SERVER_CONFIG.getPortableGrid().getOpenUsage()) { + Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM)).map(IEnergyStorage::getEnergyStored).orElse(0) <= RS.SERVER_CONFIG.getPortableGrid().getOpenUsage()) { return false; } diff --git a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGridBlockEntity.java b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGridBlockEntity.java index 3dae41cc5b..0505afcbad 100644 --- a/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGridBlockEntity.java +++ b/src/main/java/com/refinedmods/refinedstorage/blockentity/grid/portable/PortableGridBlockEntity.java @@ -51,7 +51,6 @@ import com.refinedmods.refinedstorage.util.LevelUtils; import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; @@ -65,19 +64,17 @@ import net.minecraft.world.inventory.ResultContainer; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.EnergyStorage; -import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.server.ServerLifecycleHooks; - +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.EnergyStorage; +import net.neoforged.neoforge.energy.IEnergyStorage; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.server.ServerLifecycleHooks; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.UUID; public class PortableGridBlockEntity extends BaseBlockEntity implements IGrid, IPortableGrid, IRedstoneConfigurable, IStorageDiskContainerContext { @@ -146,7 +143,6 @@ public class PortableGridBlockEntity extends BaseBlockEntity implements IGrid, I private final PortableItemGridHandler itemHandler = new PortableItemGridHandler(this, this); private final PortableFluidGridHandler fluidHandler = new PortableFluidGridHandler(this); private EnergyStorage energyStorage = createEnergyStorage(0); - private final LazyOptional energyStorageCap = LazyOptional.of(() -> energyStorage); private RedstoneMode redstoneMode = RedstoneMode.IGNORE; private int sortingType; private int sortingDirection; @@ -245,7 +241,9 @@ public void applyDataFromItemToBlockEntity(ItemStack stack) { this.tabPage = WirelessGridItem.getTabPage(stack); this.size = WirelessGridItem.getSize(stack); - this.energyStorage = createEnergyStorage(stack.getCapability(ForgeCapabilities.ENERGY).map(IEnergyStorage::getEnergyStored).orElse(0)); + this.energyStorage = createEnergyStorage( + Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM)).map(IEnergyStorage::getEnergyStored).orElse(0) + ); if (stack.hasTag()) { for (int i = 0; i < 4; ++i) { @@ -292,7 +290,7 @@ public void applyDataFromBlockEntityToItem(ItemStack stack) { stack.getTag().put(NBT_ENCHANTMENTS, enchants); } - stack.getCapability(ForgeCapabilities.ENERGY, null).ifPresent(itemEnergy -> itemEnergy.receiveEnergy(energyStorage.getEnergyStored(), false)); + Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM)).ifPresent(itemEnergy -> itemEnergy.receiveEnergy(energyStorage.getEnergyStored(), false)); for (int i = 0; i < 4; ++i) { StackUtils.writeItems(filter, i, stack.getTag()); @@ -607,6 +605,10 @@ public int getEnergy() { return RS.SERVER_CONFIG.getPortableGrid().getCapacity(); } + public EnergyStorage getEnergyStorage() { + return energyStorage; + } + @Override public PortableGridDiskState getDiskState() { if (!hasDisk()) { @@ -746,16 +748,6 @@ public void readUpdate(CompoundTag tag) { clientGridType = GridType.values()[tag.getInt(NBT_TYPE)]; } - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction direction) { - if (cap == ForgeCapabilities.ENERGY) { - return energyStorageCap.cast(); - } - - return super.getCapability(cap, direction); - } - public void onOpened() { drainEnergy(RS.SERVER_CONFIG.getPortableGrid().getOpenUsage()); } diff --git a/src/main/java/com/refinedmods/refinedstorage/capability/NetworkNodeProxyCapability.java b/src/main/java/com/refinedmods/refinedstorage/capability/NetworkNodeProxyCapability.java deleted file mode 100644 index 777bad32c6..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/capability/NetworkNodeProxyCapability.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.refinedmods.refinedstorage.capability; - -import com.refinedmods.refinedstorage.api.network.node.INetworkNodeProxy; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.CapabilityManager; -import net.minecraftforge.common.capabilities.CapabilityToken; - -public class NetworkNodeProxyCapability { - public static Capability NETWORK_NODE_PROXY_CAPABILITY = CapabilityManager.get(new CapabilityToken<>() { - }); - - private NetworkNodeProxyCapability() { - } -} diff --git a/src/main/java/com/refinedmods/refinedstorage/command/disk/CreateDiskCommand.java b/src/main/java/com/refinedmods/refinedstorage/command/disk/CreateDiskCommand.java index cd84305e06..8b190f1ddc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/command/disk/CreateDiskCommand.java +++ b/src/main/java/com/refinedmods/refinedstorage/command/disk/CreateDiskCommand.java @@ -62,7 +62,7 @@ public int run(CommandContext context) throws CommandSyntaxE ItemEntity itemEntity = player.drop(stack, false); if (itemEntity != null) { itemEntity.setNoPickUpDelay(); - itemEntity.setThrower(player.getUUID()); + itemEntity.setThrower(player); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/command/pattern/PatternDumpCommand.java b/src/main/java/com/refinedmods/refinedstorage/command/pattern/PatternDumpCommand.java index ead49c1ad3..c8e6859dca 100644 --- a/src/main/java/com/refinedmods/refinedstorage/command/pattern/PatternDumpCommand.java +++ b/src/main/java/com/refinedmods/refinedstorage/command/pattern/PatternDumpCommand.java @@ -13,7 +13,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class PatternDumpCommand implements Command { public static ArgumentBuilder register() { diff --git a/src/main/java/com/refinedmods/refinedstorage/config/ClientConfig.java b/src/main/java/com/refinedmods/refinedstorage/config/ClientConfig.java index e5ccd2464d..7a697f2158 100644 --- a/src/main/java/com/refinedmods/refinedstorage/config/ClientConfig.java +++ b/src/main/java/com/refinedmods/refinedstorage/config/ClientConfig.java @@ -1,10 +1,10 @@ package com.refinedmods.refinedstorage.config; -import net.minecraftforge.common.ForgeConfigSpec; +import net.neoforged.neoforge.common.ModConfigSpec; public class ClientConfig { - private final ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder(); - private final ForgeConfigSpec spec; + private final ModConfigSpec.Builder builder = new ModConfigSpec.Builder(); + private final ModConfigSpec spec; private final Grid grid; private final CrafterManager crafterManager; @@ -17,7 +17,7 @@ public ClientConfig() { spec = builder.build(); } - public ForgeConfigSpec getSpec() { + public ModConfigSpec getSpec() { return spec; } @@ -34,20 +34,28 @@ public Cover getCover() { } public class Grid { - private final ForgeConfigSpec.IntValue maxRowsStretch; - private final ForgeConfigSpec.BooleanValue detailedTooltip; - private final ForgeConfigSpec.BooleanValue largeFont; - private final ForgeConfigSpec.BooleanValue preventSortingWhileShiftIsDown; - private final ForgeConfigSpec.BooleanValue rememberSearchQuery; + private final ModConfigSpec.IntValue maxRowsStretch; + private final ModConfigSpec.BooleanValue detailedTooltip; + private final ModConfigSpec.BooleanValue largeFont; + private final ModConfigSpec.BooleanValue preventSortingWhileShiftIsDown; + private final ModConfigSpec.BooleanValue rememberSearchQuery; public Grid() { builder.push("grid"); - maxRowsStretch = builder.comment("The maximum amount of rows that the Grid can show when stretched").defineInRange("maxRowsStretch", Integer.MAX_VALUE, 3, Integer.MAX_VALUE); - detailedTooltip = builder.comment("Whether the Grid should display a detailed tooltip when hovering over an item or fluid").define("detailedTooltip", true); - largeFont = builder.comment("Whether the Grid should use a large font for stack quantity display").define("largeFont", false); - preventSortingWhileShiftIsDown = builder.comment("Whether the Grid should prevent sorting while the shift key is held down").define("preventSortingWhileShiftIsDown", true); - rememberSearchQuery = builder.comment("Whether the Grid should remember the search query when closing and re-opening the Grid").define("rememberSearchQuery", false); + maxRowsStretch = builder.comment("The maximum amount of rows that the Grid can show when stretched") + .defineInRange("maxRowsStretch", Integer.MAX_VALUE, 3, Integer.MAX_VALUE); + detailedTooltip = builder.comment( + "Whether the Grid should display a detailed tooltip when hovering over an item or fluid") + .define("detailedTooltip", true); + largeFont = builder.comment("Whether the Grid should use a large font for stack quantity display") + .define("largeFont", false); + preventSortingWhileShiftIsDown = + builder.comment("Whether the Grid should prevent sorting while the shift key is held down") + .define("preventSortingWhileShiftIsDown", true); + rememberSearchQuery = builder.comment( + "Whether the Grid should remember the search query when closing and re-opening the Grid") + .define("rememberSearchQuery", false); builder.pop(); } @@ -74,12 +82,14 @@ public boolean getRememberSearchQuery() { } public class CrafterManager { - private final ForgeConfigSpec.IntValue maxRowsStretch; + private final ModConfigSpec.IntValue maxRowsStretch; public CrafterManager() { builder.push("crafterManager"); - maxRowsStretch = builder.comment("The maximum amount of rows that the Crafter Manager can show when stretched").defineInRange("maxRowsStretch", Integer.MAX_VALUE, 3, Integer.MAX_VALUE); + maxRowsStretch = + builder.comment("The maximum amount of rows that the Crafter Manager can show when stretched") + .defineInRange("maxRowsStretch", Integer.MAX_VALUE, 3, Integer.MAX_VALUE); builder.pop(); } @@ -91,11 +101,13 @@ public int getMaxRowsStretch() { public class Cover { - private final ForgeConfigSpec.BooleanValue showAllCoversInJEI; + private final ModConfigSpec.BooleanValue showAllCoversInJEI; public Cover() { builder.push("cover"); - showAllCoversInJEI = builder.comment("When true all the possible covers will be added to JEI (Game restart required)").define("showAllCoversInJEI", false); + showAllCoversInJEI = + builder.comment("When true all the possible covers will be added to JEI (Game restart required)") + .define("showAllCoversInJEI", false); builder.pop(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/config/ServerConfig.java b/src/main/java/com/refinedmods/refinedstorage/config/ServerConfig.java index e44e154c78..26a43ce142 100644 --- a/src/main/java/com/refinedmods/refinedstorage/config/ServerConfig.java +++ b/src/main/java/com/refinedmods/refinedstorage/config/ServerConfig.java @@ -1,10 +1,10 @@ package com.refinedmods.refinedstorage.config; -import net.minecraftforge.common.ForgeConfigSpec; +import net.neoforged.neoforge.common.ModConfigSpec; public class ServerConfig { - private final ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder(); - private final ForgeConfigSpec spec; + private final ModConfigSpec.Builder builder = new ModConfigSpec.Builder(); + private final ModConfigSpec spec; private final Upgrades upgrades; private final Controller controller; @@ -72,7 +72,7 @@ public ServerConfig() { spec = builder.build(); } - public ForgeConfigSpec getSpec() { + public ModConfigSpec getSpec() { return spec; } @@ -197,18 +197,21 @@ public Autocrafting getAutocrafting() { } public class Controller { - private final ForgeConfigSpec.BooleanValue useEnergy; - private final ForgeConfigSpec.IntValue capacity; - private final ForgeConfigSpec.IntValue baseUsage; - private final ForgeConfigSpec.IntValue maxTransfer; + private final ModConfigSpec.BooleanValue useEnergy; + private final ModConfigSpec.IntValue capacity; + private final ModConfigSpec.IntValue baseUsage; + private final ModConfigSpec.IntValue maxTransfer; public Controller() { builder.push("controller"); useEnergy = builder.comment("Whether the Controller uses energy").define("useEnergy", true); - capacity = builder.comment("The energy capacity of the Controller").defineInRange("capacity", 32000, 0, Integer.MAX_VALUE); - baseUsage = builder.comment("The base energy used by the Controller").defineInRange("baseUsage", 0, 0, Integer.MAX_VALUE); - maxTransfer = builder.comment("The maximum energy that the Controller can receive").defineInRange("maxTransfer", Integer.MAX_VALUE, 0, Integer.MAX_VALUE); + capacity = builder.comment("The energy capacity of the Controller") + .defineInRange("capacity", 32000, 0, Integer.MAX_VALUE); + baseUsage = builder.comment("The base energy used by the Controller") + .defineInRange("baseUsage", 0, 0, Integer.MAX_VALUE); + maxTransfer = builder.comment("The maximum energy that the Controller can receive") + .defineInRange("maxTransfer", Integer.MAX_VALUE, 0, Integer.MAX_VALUE); builder.pop(); } @@ -231,7 +234,7 @@ public int getMaxTransfer() { } public class Cable { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public Cable() { builder.push("cable"); @@ -247,14 +250,16 @@ public int getUsage() { } public class DiskDrive { - private final ForgeConfigSpec.IntValue usage; - private final ForgeConfigSpec.IntValue diskUsage; + private final ModConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue diskUsage; public DiskDrive() { builder.push("diskDrive"); - usage = builder.comment("The energy used by the Disk Drive").defineInRange("usage", 0, 0, Integer.MAX_VALUE); - diskUsage = builder.comment("The energy used per disk in the Disk Drive").defineInRange("diskUsage", 1, 0, Integer.MAX_VALUE); + usage = + builder.comment("The energy used by the Disk Drive").defineInRange("usage", 0, 0, Integer.MAX_VALUE); + diskUsage = builder.comment("The energy used per disk in the Disk Drive") + .defineInRange("diskUsage", 1, 0, Integer.MAX_VALUE); builder.pop(); } @@ -269,18 +274,21 @@ public int getDiskUsage() { } public class Grid { - private final ForgeConfigSpec.IntValue gridUsage; - private final ForgeConfigSpec.IntValue craftingGridUsage; - private final ForgeConfigSpec.IntValue patternGridUsage; - private final ForgeConfigSpec.IntValue fluidGridUsage; + private final ModConfigSpec.IntValue gridUsage; + private final ModConfigSpec.IntValue craftingGridUsage; + private final ModConfigSpec.IntValue patternGridUsage; + private final ModConfigSpec.IntValue fluidGridUsage; public Grid() { builder.push("grid"); gridUsage = builder.comment("The energy used by Grids").defineInRange("gridUsage", 2, 0, Integer.MAX_VALUE); - craftingGridUsage = builder.comment("The energy used by Crafting Grids").defineInRange("craftingGridUsage", 4, 0, Integer.MAX_VALUE); - patternGridUsage = builder.comment("The energy used by Pattern Grids").defineInRange("patternGridUsage", 4, 0, Integer.MAX_VALUE); - fluidGridUsage = builder.comment("The energy used by Fluid Grids").defineInRange("fluidGridUsage", 2, 0, Integer.MAX_VALUE); + craftingGridUsage = builder.comment("The energy used by Crafting Grids") + .defineInRange("craftingGridUsage", 4, 0, Integer.MAX_VALUE); + patternGridUsage = builder.comment("The energy used by Pattern Grids") + .defineInRange("patternGridUsage", 4, 0, Integer.MAX_VALUE); + fluidGridUsage = builder.comment("The energy used by Fluid Grids") + .defineInRange("fluidGridUsage", 2, 0, Integer.MAX_VALUE); builder.pop(); } @@ -303,28 +311,37 @@ public int getFluidGridUsage() { } public class Upgrades { - private final ForgeConfigSpec.IntValue rangeUpgradeUsage; - private final ForgeConfigSpec.IntValue speedUpgradeUsage; - private final ForgeConfigSpec.IntValue craftingUpgradeUsage; - private final ForgeConfigSpec.IntValue stackUpgradeUsage; - private final ForgeConfigSpec.IntValue silkTouchUpgradeUsage; - private final ForgeConfigSpec.IntValue fortune1UpgradeUsage; - private final ForgeConfigSpec.IntValue fortune2UpgradeUsage; - private final ForgeConfigSpec.IntValue fortune3UpgradeUsage; - private final ForgeConfigSpec.IntValue regulatorUpgradeUsage; + private final ModConfigSpec.IntValue rangeUpgradeUsage; + private final ModConfigSpec.IntValue speedUpgradeUsage; + private final ModConfigSpec.IntValue craftingUpgradeUsage; + private final ModConfigSpec.IntValue stackUpgradeUsage; + private final ModConfigSpec.IntValue silkTouchUpgradeUsage; + private final ModConfigSpec.IntValue fortune1UpgradeUsage; + private final ModConfigSpec.IntValue fortune2UpgradeUsage; + private final ModConfigSpec.IntValue fortune3UpgradeUsage; + private final ModConfigSpec.IntValue regulatorUpgradeUsage; public Upgrades() { builder.push("upgrades"); - rangeUpgradeUsage = builder.comment("The additional energy used by the Range Upgrade").defineInRange("rangeUpgradeUsage", 8, 0, Integer.MAX_VALUE); - speedUpgradeUsage = builder.comment("The additional energy used by the Speed Upgrade").defineInRange("speedUpgradeUsage", 2, 0, Integer.MAX_VALUE); - craftingUpgradeUsage = builder.comment("The additional energy used by the Crafting Upgrade").defineInRange("craftingUpgradeUsage", 5, 0, Integer.MAX_VALUE); - stackUpgradeUsage = builder.comment("The additional energy used by the Stack Upgrade").defineInRange("stackUpgradeUsage", 12, 0, Integer.MAX_VALUE); - silkTouchUpgradeUsage = builder.comment("The additional energy used by the Silk Touch Upgrade").defineInRange("silkTouchUpgradeUsage", 15, 0, Integer.MAX_VALUE); - fortune1UpgradeUsage = builder.comment("The additional energy used by the Fortune 1 Upgrade").defineInRange("fortune1UpgradeUsage", 10, 0, Integer.MAX_VALUE); - fortune2UpgradeUsage = builder.comment("The additional energy used by the Fortune 2 Upgrade").defineInRange("fortune2UpgradeUsage", 12, 0, Integer.MAX_VALUE); - fortune3UpgradeUsage = builder.comment("The additional energy used by the Fortune 3 Upgrade").defineInRange("fortune3UpgradeUsage", 14, 0, Integer.MAX_VALUE); - regulatorUpgradeUsage = builder.comment("The additional energy used by the Regulator Upgrade").defineInRange("regulatorUpgradeUsage", 15, 0, Integer.MAX_VALUE); + rangeUpgradeUsage = builder.comment("The additional energy used by the Range Upgrade") + .defineInRange("rangeUpgradeUsage", 8, 0, Integer.MAX_VALUE); + speedUpgradeUsage = builder.comment("The additional energy used by the Speed Upgrade") + .defineInRange("speedUpgradeUsage", 2, 0, Integer.MAX_VALUE); + craftingUpgradeUsage = builder.comment("The additional energy used by the Crafting Upgrade") + .defineInRange("craftingUpgradeUsage", 5, 0, Integer.MAX_VALUE); + stackUpgradeUsage = builder.comment("The additional energy used by the Stack Upgrade") + .defineInRange("stackUpgradeUsage", 12, 0, Integer.MAX_VALUE); + silkTouchUpgradeUsage = builder.comment("The additional energy used by the Silk Touch Upgrade") + .defineInRange("silkTouchUpgradeUsage", 15, 0, Integer.MAX_VALUE); + fortune1UpgradeUsage = builder.comment("The additional energy used by the Fortune 1 Upgrade") + .defineInRange("fortune1UpgradeUsage", 10, 0, Integer.MAX_VALUE); + fortune2UpgradeUsage = builder.comment("The additional energy used by the Fortune 2 Upgrade") + .defineInRange("fortune2UpgradeUsage", 12, 0, Integer.MAX_VALUE); + fortune3UpgradeUsage = builder.comment("The additional energy used by the Fortune 3 Upgrade") + .defineInRange("fortune3UpgradeUsage", 14, 0, Integer.MAX_VALUE); + regulatorUpgradeUsage = builder.comment("The additional energy used by the Regulator Upgrade") + .defineInRange("regulatorUpgradeUsage", 15, 0, Integer.MAX_VALUE); builder.pop(); } @@ -367,20 +384,25 @@ public int getRegulatorUpgradeUsage() { } public class StorageBlock { - private final ForgeConfigSpec.IntValue oneKUsage; - private final ForgeConfigSpec.IntValue fourKUsage; - private final ForgeConfigSpec.IntValue sixteenKUsage; - private final ForgeConfigSpec.IntValue sixtyFourKUsage; - private final ForgeConfigSpec.IntValue creativeUsage; + private final ModConfigSpec.IntValue oneKUsage; + private final ModConfigSpec.IntValue fourKUsage; + private final ModConfigSpec.IntValue sixteenKUsage; + private final ModConfigSpec.IntValue sixtyFourKUsage; + private final ModConfigSpec.IntValue creativeUsage; public StorageBlock() { builder.push("storageBlock"); - oneKUsage = builder.comment("The energy used by the 1k Storage Block").defineInRange("oneKUsage", 2, 0, Integer.MAX_VALUE); - fourKUsage = builder.comment("The energy used by the 4k Storage Block").defineInRange("fourKUsage", 4, 0, Integer.MAX_VALUE); - sixteenKUsage = builder.comment("The energy used by the 16k Storage Block").defineInRange("sixteenKUsage", 6, 0, Integer.MAX_VALUE); - sixtyFourKUsage = builder.comment("The energy used by the 64k Storage Block").defineInRange("sixtyFourKUsage", 8, 0, Integer.MAX_VALUE); - creativeUsage = builder.comment("The energy used by the Creative Storage Block").defineInRange("creativeUsage", 10, 0, Integer.MAX_VALUE); + oneKUsage = builder.comment("The energy used by the 1k Storage Block") + .defineInRange("oneKUsage", 2, 0, Integer.MAX_VALUE); + fourKUsage = builder.comment("The energy used by the 4k Storage Block") + .defineInRange("fourKUsage", 4, 0, Integer.MAX_VALUE); + sixteenKUsage = builder.comment("The energy used by the 16k Storage Block") + .defineInRange("sixteenKUsage", 6, 0, Integer.MAX_VALUE); + sixtyFourKUsage = builder.comment("The energy used by the 64k Storage Block") + .defineInRange("sixtyFourKUsage", 8, 0, Integer.MAX_VALUE); + creativeUsage = builder.comment("The energy used by the Creative Storage Block") + .defineInRange("creativeUsage", 10, 0, Integer.MAX_VALUE); builder.pop(); } @@ -407,20 +429,25 @@ public int getCreativeUsage() { } public class FluidStorageBlock { - private final ForgeConfigSpec.IntValue sixtyFourKUsage; - private final ForgeConfigSpec.IntValue twoHundredFiftySixKUsage; - private final ForgeConfigSpec.IntValue thousandTwentyFourKUsage; - private final ForgeConfigSpec.IntValue fourThousandNinetySixKUsage; - private final ForgeConfigSpec.IntValue creativeUsage; + private final ModConfigSpec.IntValue sixtyFourKUsage; + private final ModConfigSpec.IntValue twoHundredFiftySixKUsage; + private final ModConfigSpec.IntValue thousandTwentyFourKUsage; + private final ModConfigSpec.IntValue fourThousandNinetySixKUsage; + private final ModConfigSpec.IntValue creativeUsage; public FluidStorageBlock() { builder.push("fluidStorageBlock"); - sixtyFourKUsage = builder.comment("The energy used by the 64k Fluid Storage Block").defineInRange("sixtyFourKUsage", 2, 0, Integer.MAX_VALUE); - twoHundredFiftySixKUsage = builder.comment("The energy used by the 256k Fluid Storage Block").defineInRange("twoHundredFiftySixKUsage", 4, 0, Integer.MAX_VALUE); - thousandTwentyFourKUsage = builder.comment("The energy used by the 1024k Fluid Storage Block").defineInRange("thousandTwentyFourKUsage", 6, 0, Integer.MAX_VALUE); - fourThousandNinetySixKUsage = builder.comment("The energy used by the 4096k Fluid Storage Block").defineInRange("fourThousandNinetySixKUsage", 8, 0, Integer.MAX_VALUE); - creativeUsage = builder.comment("The energy used by the Creative Fluid Storage Block").defineInRange("creativeUsage", 10, 0, Integer.MAX_VALUE); + sixtyFourKUsage = builder.comment("The energy used by the 64k Fluid Storage Block") + .defineInRange("sixtyFourKUsage", 2, 0, Integer.MAX_VALUE); + twoHundredFiftySixKUsage = builder.comment("The energy used by the 256k Fluid Storage Block") + .defineInRange("twoHundredFiftySixKUsage", 4, 0, Integer.MAX_VALUE); + thousandTwentyFourKUsage = builder.comment("The energy used by the 1024k Fluid Storage Block") + .defineInRange("thousandTwentyFourKUsage", 6, 0, Integer.MAX_VALUE); + fourThousandNinetySixKUsage = builder.comment("The energy used by the 4096k Fluid Storage Block") + .defineInRange("fourThousandNinetySixKUsage", 8, 0, Integer.MAX_VALUE); + creativeUsage = builder.comment("The energy used by the Creative Fluid Storage Block") + .defineInRange("creativeUsage", 10, 0, Integer.MAX_VALUE); builder.pop(); } @@ -447,12 +474,13 @@ public int getCreativeUsage() { } public class ExternalStorage { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public ExternalStorage() { builder.push("externalStorage"); - usage = builder.comment("The energy used by the External Storage").defineInRange("usage", 6, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the External Storage") + .defineInRange("usage", 6, 0, Integer.MAX_VALUE); builder.pop(); } @@ -463,7 +491,7 @@ public int getUsage() { } public class Importer { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public Importer() { builder.push("importer"); @@ -479,7 +507,7 @@ public int getUsage() { } public class Exporter { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public Exporter() { builder.push("exporter"); @@ -495,12 +523,13 @@ public int getUsage() { } public class NetworkReceiver { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public NetworkReceiver() { builder.push("networkReceiver"); - usage = builder.comment("The energy used by the Network Receiver").defineInRange("usage", 0, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Network Receiver") + .defineInRange("usage", 0, 0, Integer.MAX_VALUE); builder.pop(); } @@ -511,12 +540,13 @@ public int getUsage() { } public class NetworkTransmitter { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public NetworkTransmitter() { builder.push("networkTransmitter"); - usage = builder.comment("The energy used by the Network Transmitter").defineInRange("usage", 64, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Network Transmitter") + .defineInRange("usage", 64, 0, Integer.MAX_VALUE); builder.pop(); } @@ -527,7 +557,7 @@ public int getUsage() { } public class Relay { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public Relay() { builder.push("relay"); @@ -543,7 +573,7 @@ public int getUsage() { } public class Detector { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public Detector() { builder.push("detector"); @@ -559,14 +589,16 @@ public int getUsage() { } public class SecurityManager { - private final ForgeConfigSpec.IntValue usage; - private final ForgeConfigSpec.IntValue usagePerCard; + private final ModConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usagePerCard; public SecurityManager() { builder.push("securityManager"); - usage = builder.comment("The energy used by the Security Manager").defineInRange("usage", 4, 0, Integer.MAX_VALUE); - usagePerCard = builder.comment("The additional energy used by Security Cards in the Security Manager").defineInRange("usagePerCard", 10, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Security Manager") + .defineInRange("usage", 4, 0, Integer.MAX_VALUE); + usagePerCard = builder.comment("The additional energy used by Security Cards in the Security Manager") + .defineInRange("usagePerCard", 10, 0, Integer.MAX_VALUE); builder.pop(); } @@ -581,7 +613,7 @@ public int getUsagePerCard() { } public class Interface { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public Interface() { builder.push("interface"); @@ -597,12 +629,13 @@ public int getUsage() { } public class FluidInterface { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public FluidInterface() { builder.push("fluidInterface"); - usage = builder.comment("The energy used by the Fluid Interface").defineInRange("usage", 2, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Fluid Interface") + .defineInRange("usage", 2, 0, Integer.MAX_VALUE); builder.pop(); } @@ -613,16 +646,19 @@ public int getUsage() { } public class WirelessTransmitter { - private final ForgeConfigSpec.IntValue usage; - private final ForgeConfigSpec.IntValue baseRange; - private final ForgeConfigSpec.IntValue rangePerUpgrade; + private final ModConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue baseRange; + private final ModConfigSpec.IntValue rangePerUpgrade; public WirelessTransmitter() { builder.push("wirelessTransmitter"); - usage = builder.comment("The energy used by the Wireless Transmitter").defineInRange("usage", 8, 0, Integer.MAX_VALUE); - baseRange = builder.comment("The base range of the Wireless Transmitter").defineInRange("baseRange", 16, 0, Integer.MAX_VALUE); - rangePerUpgrade = builder.comment("The additional range per Range Upgrade in the Wireless Transmitter").defineInRange("rangePerUpgrade", 8, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Wireless Transmitter") + .defineInRange("usage", 8, 0, Integer.MAX_VALUE); + baseRange = builder.comment("The base range of the Wireless Transmitter") + .defineInRange("baseRange", 16, 0, Integer.MAX_VALUE); + rangePerUpgrade = builder.comment("The additional range per Range Upgrade in the Wireless Transmitter") + .defineInRange("rangePerUpgrade", 8, 0, Integer.MAX_VALUE); builder.pop(); } @@ -641,12 +677,13 @@ public int getRangePerUpgrade() { } public class StorageMonitor { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public StorageMonitor() { builder.push("storageMonitor"); - usage = builder.comment("The energy used by the Storage Monitor").defineInRange("usage", 3, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Storage Monitor") + .defineInRange("usage", 3, 0, Integer.MAX_VALUE); builder.pop(); } @@ -657,20 +694,24 @@ public int getUsage() { } public class WirelessGrid { - private final ForgeConfigSpec.BooleanValue useEnergy; - private final ForgeConfigSpec.IntValue capacity; - private final ForgeConfigSpec.IntValue openUsage; - private final ForgeConfigSpec.IntValue extractUsage; - private final ForgeConfigSpec.IntValue insertUsage; + private final ModConfigSpec.BooleanValue useEnergy; + private final ModConfigSpec.IntValue capacity; + private final ModConfigSpec.IntValue openUsage; + private final ModConfigSpec.IntValue extractUsage; + private final ModConfigSpec.IntValue insertUsage; public WirelessGrid() { builder.push("wirelessGrid"); useEnergy = builder.comment("Whether the Wireless Grid uses energy").define("useEnergy", true); - capacity = builder.comment("The energy capacity of the Wireless Grid").defineInRange("capacity", 3200, 0, Integer.MAX_VALUE); - openUsage = builder.comment("The energy used by the Wireless Grid to open").defineInRange("openUsage", 30, 0, Integer.MAX_VALUE); - extractUsage = builder.comment("The energy used by the Wireless Grid to extract items").defineInRange("extractUsage", 5, 0, Integer.MAX_VALUE); - insertUsage = builder.comment("The energy used by the Wireless Grid to insert items").defineInRange("insertUsage", 5, 0, Integer.MAX_VALUE); + capacity = builder.comment("The energy capacity of the Wireless Grid") + .defineInRange("capacity", 3200, 0, Integer.MAX_VALUE); + openUsage = builder.comment("The energy used by the Wireless Grid to open") + .defineInRange("openUsage", 30, 0, Integer.MAX_VALUE); + extractUsage = builder.comment("The energy used by the Wireless Grid to extract items") + .defineInRange("extractUsage", 5, 0, Integer.MAX_VALUE); + insertUsage = builder.comment("The energy used by the Wireless Grid to insert items") + .defineInRange("insertUsage", 5, 0, Integer.MAX_VALUE); builder.pop(); } @@ -697,20 +738,24 @@ public int getInsertUsage() { } public class WirelessFluidGrid { - private final ForgeConfigSpec.BooleanValue useEnergy; - private final ForgeConfigSpec.IntValue capacity; - private final ForgeConfigSpec.IntValue openUsage; - private final ForgeConfigSpec.IntValue extractUsage; - private final ForgeConfigSpec.IntValue insertUsage; + private final ModConfigSpec.BooleanValue useEnergy; + private final ModConfigSpec.IntValue capacity; + private final ModConfigSpec.IntValue openUsage; + private final ModConfigSpec.IntValue extractUsage; + private final ModConfigSpec.IntValue insertUsage; public WirelessFluidGrid() { builder.push("wirelessFluidGrid"); useEnergy = builder.comment("Whether the Wireless Fluid Grid uses energy").define("useEnergy", true); - capacity = builder.comment("The energy capacity of the Wireless Fluid Grid").defineInRange("capacity", 3200, 0, Integer.MAX_VALUE); - openUsage = builder.comment("The energy used by the Wireless Fluid Grid to open").defineInRange("openUsage", 30, 0, Integer.MAX_VALUE); - extractUsage = builder.comment("The energy used by the Wireless Fluid Grid to extract fluids").defineInRange("extractUsage", 5, 0, Integer.MAX_VALUE); - insertUsage = builder.comment("The energy used by the Wireless Fluid Grid to insert fluids").defineInRange("insertUsage", 5, 0, Integer.MAX_VALUE); + capacity = builder.comment("The energy capacity of the Wireless Fluid Grid") + .defineInRange("capacity", 3200, 0, Integer.MAX_VALUE); + openUsage = builder.comment("The energy used by the Wireless Fluid Grid to open") + .defineInRange("openUsage", 30, 0, Integer.MAX_VALUE); + extractUsage = builder.comment("The energy used by the Wireless Fluid Grid to extract fluids") + .defineInRange("extractUsage", 5, 0, Integer.MAX_VALUE); + insertUsage = builder.comment("The energy used by the Wireless Fluid Grid to insert fluids") + .defineInRange("insertUsage", 5, 0, Integer.MAX_VALUE); builder.pop(); } @@ -737,20 +782,24 @@ public int getInsertUsage() { } public class PortableGrid { - private final ForgeConfigSpec.BooleanValue useEnergy; - private final ForgeConfigSpec.IntValue capacity; - private final ForgeConfigSpec.IntValue openUsage; - private final ForgeConfigSpec.IntValue extractUsage; - private final ForgeConfigSpec.IntValue insertUsage; + private final ModConfigSpec.BooleanValue useEnergy; + private final ModConfigSpec.IntValue capacity; + private final ModConfigSpec.IntValue openUsage; + private final ModConfigSpec.IntValue extractUsage; + private final ModConfigSpec.IntValue insertUsage; public PortableGrid() { builder.push("portableGrid"); useEnergy = builder.comment("Whether the Portable Grid uses energy").define("useEnergy", true); - capacity = builder.comment("The energy capacity of the Portable Grid").defineInRange("capacity", 3200, 0, Integer.MAX_VALUE); - openUsage = builder.comment("The energy used by the Portable Grid to open").defineInRange("openUsage", 30, 0, Integer.MAX_VALUE); - extractUsage = builder.comment("The energy used by the Portable Grid to extract items or fluids").defineInRange("extractUsage", 5, 0, Integer.MAX_VALUE); - insertUsage = builder.comment("The energy used by the Portable Grid to insert items or fluids").defineInRange("insertUsage", 5, 0, Integer.MAX_VALUE); + capacity = builder.comment("The energy capacity of the Portable Grid") + .defineInRange("capacity", 3200, 0, Integer.MAX_VALUE); + openUsage = builder.comment("The energy used by the Portable Grid to open") + .defineInRange("openUsage", 30, 0, Integer.MAX_VALUE); + extractUsage = builder.comment("The energy used by the Portable Grid to extract items or fluids") + .defineInRange("extractUsage", 5, 0, Integer.MAX_VALUE); + insertUsage = builder.comment("The energy used by the Portable Grid to insert items or fluids") + .defineInRange("insertUsage", 5, 0, Integer.MAX_VALUE); builder.pop(); } @@ -777,12 +826,13 @@ public int getInsertUsage() { } public class Constructor { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public Constructor() { builder.push("constructor"); - usage = builder.comment("The energy used by the Constructor").defineInRange("usage", 3, 0, Integer.MAX_VALUE); + usage = + builder.comment("The energy used by the Constructor").defineInRange("usage", 3, 0, Integer.MAX_VALUE); builder.pop(); } @@ -793,12 +843,13 @@ public int getUsage() { } public class Destructor { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public Destructor() { builder.push("destructor"); - usage = builder.comment("The energy used by the Destructor").defineInRange("usage", 3, 0, Integer.MAX_VALUE); + usage = + builder.comment("The energy used by the Destructor").defineInRange("usage", 3, 0, Integer.MAX_VALUE); builder.pop(); } @@ -809,12 +860,13 @@ public int getUsage() { } public class DiskManipulator { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public DiskManipulator() { builder.push("diskManipulator"); - usage = builder.comment("The energy used by the Disk Manipulator").defineInRange("usage", 4, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Disk Manipulator") + .defineInRange("usage", 4, 0, Integer.MAX_VALUE); builder.pop(); } @@ -825,14 +877,15 @@ public int getUsage() { } public class Crafter { - private final ForgeConfigSpec.IntValue usage; - private final ForgeConfigSpec.IntValue patternUsage; + private final ModConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue patternUsage; public Crafter() { builder.push("crafter"); usage = builder.comment("The energy used by the Crafter").defineInRange("usage", 4, 0, Integer.MAX_VALUE); - patternUsage = builder.comment("The energy used for every Pattern in the Crafter").defineInRange("patternUsage", 1, 0, Integer.MAX_VALUE); + patternUsage = builder.comment("The energy used for every Pattern in the Crafter") + .defineInRange("patternUsage", 1, 0, Integer.MAX_VALUE); builder.pop(); } @@ -847,12 +900,13 @@ public int getPatternUsage() { } public class CrafterManager { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public CrafterManager() { builder.push("crafterManager"); - usage = builder.comment("The energy used by the Crafter Manager").defineInRange("usage", 8, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Crafter Manager") + .defineInRange("usage", 8, 0, Integer.MAX_VALUE); builder.pop(); } @@ -863,12 +917,13 @@ public int getUsage() { } public class CraftingMonitor { - private final ForgeConfigSpec.IntValue usage; + private final ModConfigSpec.IntValue usage; public CraftingMonitor() { builder.push("craftingMonitor"); - usage = builder.comment("The energy used by the Crafting Monitor").defineInRange("usage", 8, 0, Integer.MAX_VALUE); + usage = builder.comment("The energy used by the Crafting Monitor") + .defineInRange("usage", 8, 0, Integer.MAX_VALUE); builder.pop(); } @@ -879,20 +934,25 @@ public int getUsage() { } public class WirelessCraftingMonitor { - private final ForgeConfigSpec.BooleanValue useEnergy; - private final ForgeConfigSpec.IntValue capacity; - private final ForgeConfigSpec.IntValue openUsage; - private final ForgeConfigSpec.IntValue cancelUsage; - private final ForgeConfigSpec.IntValue cancelAllUsage; + private final ModConfigSpec.BooleanValue useEnergy; + private final ModConfigSpec.IntValue capacity; + private final ModConfigSpec.IntValue openUsage; + private final ModConfigSpec.IntValue cancelUsage; + private final ModConfigSpec.IntValue cancelAllUsage; public WirelessCraftingMonitor() { builder.push("wirelessCraftingMonitor"); useEnergy = builder.comment("Whether the Wireless Crafting Monitor uses energy").define("useEnergy", true); - capacity = builder.comment("The energy capacity of the Wireless Crafting Monitor").defineInRange("capacity", 3200, 0, Integer.MAX_VALUE); - openUsage = builder.comment("The energy used by the Wireless Crafting Monitor to open").defineInRange("openUsage", 30, 0, Integer.MAX_VALUE); - cancelUsage = builder.comment("The energy used by the Wireless Crafting Monitor to cancel a crafting task").defineInRange("cancelUsage", 5, 0, Integer.MAX_VALUE); - cancelAllUsage = builder.comment("The energy used by the Wireless Crafting Monitor to cancel all crafting tasks").defineInRange("cancelAllUsage", 10, 0, Integer.MAX_VALUE); + capacity = builder.comment("The energy capacity of the Wireless Crafting Monitor") + .defineInRange("capacity", 3200, 0, Integer.MAX_VALUE); + openUsage = builder.comment("The energy used by the Wireless Crafting Monitor to open") + .defineInRange("openUsage", 30, 0, Integer.MAX_VALUE); + cancelUsage = builder.comment("The energy used by the Wireless Crafting Monitor to cancel a crafting task") + .defineInRange("cancelUsage", 5, 0, Integer.MAX_VALUE); + cancelAllUsage = + builder.comment("The energy used by the Wireless Crafting Monitor to cancel all crafting tasks") + .defineInRange("cancelAllUsage", 10, 0, Integer.MAX_VALUE); builder.pop(); } @@ -919,12 +979,14 @@ public int getCancelAllUsage() { } public class Autocrafting { - private final ForgeConfigSpec.IntValue calculationTimeoutMs; + private final ModConfigSpec.IntValue calculationTimeoutMs; public Autocrafting() { builder.push("autocrafting"); - calculationTimeoutMs = builder.comment("The autocrafting calculation timeout in milliseconds, crafting tasks taking longer than this to calculate are cancelled to avoid server strain").defineInRange("calculationTimeoutMs", 5000, 5000, Integer.MAX_VALUE); + calculationTimeoutMs = builder.comment( + "The autocrafting calculation timeout in milliseconds, crafting tasks taking longer than this to calculate are cancelled to avoid server strain") + .defineInRange("calculationTimeoutMs", 5000, 5000, Integer.MAX_VALUE); builder.pop(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/container/AmountContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/AmountContainerMenu.java index 41a7c53e8b..b513278ee5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/AmountContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/AmountContainerMenu.java @@ -3,8 +3,8 @@ import com.refinedmods.refinedstorage.container.slot.DisabledSlot; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemHandlerHelper; -import net.minecraftforge.items.ItemStackHandler; +import net.neoforged.neoforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.items.ItemStackHandler; public class AmountContainerMenu extends BaseContainerMenu { public AmountContainerMenu(Player player, ItemStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/BaseContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/BaseContainerMenu.java index 6fb9cc9c8f..62bef25426 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/BaseContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/BaseContainerMenu.java @@ -18,8 +18,7 @@ import net.minecraft.world.inventory.MenuType; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/ConstructorContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/ConstructorContainerMenu.java index 8870ecd1dd..056701d0d7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/ConstructorContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/ConstructorContainerMenu.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.blockentity.ConstructorBlockEntity; import com.refinedmods.refinedstorage.blockentity.config.IType; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class ConstructorContainerMenu extends BaseContainerMenu { public ConstructorContainerMenu(ConstructorBlockEntity constructor, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/CrafterContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/CrafterContainerMenu.java index 26a23b8907..83a19576ed 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/CrafterContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/CrafterContainerMenu.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage.RSContainerMenus; import com.refinedmods.refinedstorage.blockentity.CrafterBlockEntity; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class CrafterContainerMenu extends BaseContainerMenu { public CrafterContainerMenu(CrafterBlockEntity crafter, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/CrafterManagerContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/CrafterManagerContainerMenu.java index 818a4c9f50..d3df47bf40 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/CrafterManagerContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/CrafterManagerContainerMenu.java @@ -16,8 +16,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Collections; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/CraftingMonitorContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/CraftingMonitorContainerMenu.java index 6187db9457..eb01248853 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/CraftingMonitorContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/CraftingMonitorContainerMenu.java @@ -3,6 +3,7 @@ import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.autocrafting.ICraftingManager; import com.refinedmods.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorListener; +import com.refinedmods.refinedstorage.network.craftingmonitor.CraftingMonitorSyncTask; import com.refinedmods.refinedstorage.network.craftingmonitor.CraftingMonitorUpdateMessage; import com.refinedmods.refinedstorage.blockentity.craftingmonitor.CraftingMonitorBlockEntity; import com.refinedmods.refinedstorage.blockentity.craftingmonitor.ICraftingMonitor; @@ -99,6 +100,15 @@ public void onAttached() { @Override public void onChanged() { - RS.NETWORK_HANDLER.sendTo((ServerPlayer) getPlayer(), new CraftingMonitorUpdateMessage(craftingMonitor)); + RS.NETWORK_HANDLER.sendTo((ServerPlayer) getPlayer(), new CraftingMonitorUpdateMessage( + craftingMonitor.getTasks().stream().map(task -> new CraftingMonitorSyncTask( + task.getId(), + task.getRequested(), + task.getQuantity(), + task.getStartTime(), + task.getCompletionPercentage(), + task.getCraftingMonitorElements() + )).toList() + )); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/container/CraftingSettingsContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/CraftingSettingsContainerMenu.java index fb71a99cc3..eba08bec4f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/CraftingSettingsContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/CraftingSettingsContainerMenu.java @@ -7,8 +7,8 @@ import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.ItemHandlerHelper; -import net.minecraftforge.items.ItemStackHandler; +import net.neoforged.neoforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.items.ItemStackHandler; public class CraftingSettingsContainerMenu extends BaseContainerMenu { public CraftingSettingsContainerMenu(Player player, IGridStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/DestructorContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/DestructorContainerMenu.java index ba3ebe2628..e4df182755 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/DestructorContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/DestructorContainerMenu.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.blockentity.DestructorBlockEntity; import com.refinedmods.refinedstorage.blockentity.config.IType; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class DestructorContainerMenu extends BaseContainerMenu { public DestructorContainerMenu(DestructorBlockEntity destructor, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/DiskDriveContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/DiskDriveContainerMenu.java index 486797415f..93ad6efa3c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/DiskDriveContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/DiskDriveContainerMenu.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.blockentity.DiskDriveBlockEntity; import com.refinedmods.refinedstorage.blockentity.config.IType; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class DiskDriveContainerMenu extends BaseContainerMenu { public DiskDriveContainerMenu(DiskDriveBlockEntity diskDrive, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/DiskManipulatorContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/DiskManipulatorContainerMenu.java index 81844c3158..ebed66d6fb 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/DiskManipulatorContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/DiskManipulatorContainerMenu.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.blockentity.DiskManipulatorBlockEntity; import com.refinedmods.refinedstorage.blockentity.config.IType; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class DiskManipulatorContainerMenu extends BaseContainerMenu { public DiskManipulatorContainerMenu(DiskManipulatorBlockEntity diskManipulator, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/ExporterContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/ExporterContainerMenu.java index 642153b2d8..696b02b06d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/ExporterContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/ExporterContainerMenu.java @@ -7,7 +7,7 @@ import com.refinedmods.refinedstorage.blockentity.ExporterBlockEntity; import com.refinedmods.refinedstorage.blockentity.config.IType; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class ExporterContainerMenu extends BaseContainerMenu { private final ExporterBlockEntity exporter; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/FluidAmountContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/FluidAmountContainerMenu.java index 110bce582c..25d50fb41b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/FluidAmountContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/FluidAmountContainerMenu.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage.container.slot.filter.DisabledFluidFilterSlot; import com.refinedmods.refinedstorage.inventory.fluid.FluidInventory; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class FluidAmountContainerMenu extends BaseContainerMenu { public FluidAmountContainerMenu(Player player, FluidStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/FluidInterfaceContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/FluidInterfaceContainerMenu.java index 7cc37039fa..931ef53b21 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/FluidInterfaceContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/FluidInterfaceContainerMenu.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage.container.slot.filter.FluidFilterSlot; import com.refinedmods.refinedstorage.blockentity.FluidInterfaceBlockEntity; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class FluidInterfaceContainerMenu extends BaseContainerMenu { public FluidInterfaceContainerMenu(FluidInterfaceBlockEntity fluidInterface, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/GridContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/GridContainerMenu.java index db8cecd117..423b457924 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/GridContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/GridContainerMenu.java @@ -26,8 +26,7 @@ import net.minecraft.world.inventory.ContainerListener; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.SlotItemHandler; - +import net.neoforged.neoforge.items.SlotItemHandler; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/ImporterContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/ImporterContainerMenu.java index 21ddd76c69..43f68999c3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/ImporterContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/ImporterContainerMenu.java @@ -6,7 +6,7 @@ import com.refinedmods.refinedstorage.blockentity.ImporterBlockEntity; import com.refinedmods.refinedstorage.blockentity.config.IType; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class ImporterContainerMenu extends BaseContainerMenu { public ImporterContainerMenu(ImporterBlockEntity importer, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/InterfaceContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/InterfaceContainerMenu.java index 90630475bf..beb84726f2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/InterfaceContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/InterfaceContainerMenu.java @@ -5,7 +5,7 @@ import com.refinedmods.refinedstorage.container.slot.filter.FilterSlot; import com.refinedmods.refinedstorage.blockentity.InterfaceBlockEntity; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class InterfaceContainerMenu extends BaseContainerMenu { public InterfaceContainerMenu(InterfaceBlockEntity blockEntity, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/NetworkTransmitterContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/NetworkTransmitterContainerMenu.java index dffa3d1eb3..c059683a1a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/NetworkTransmitterContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/NetworkTransmitterContainerMenu.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage.RSContainerMenus; import com.refinedmods.refinedstorage.blockentity.NetworkTransmitterBlockEntity; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class NetworkTransmitterContainerMenu extends BaseContainerMenu { public NetworkTransmitterContainerMenu(NetworkTransmitterBlockEntity networkTransmitter, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/SecurityManagerContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/SecurityManagerContainerMenu.java index 41a40b0519..ad6a61330d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/SecurityManagerContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/SecurityManagerContainerMenu.java @@ -1,11 +1,15 @@ package com.refinedmods.refinedstorage.container; import com.refinedmods.refinedstorage.RSContainerMenus; +import com.refinedmods.refinedstorage.api.network.security.Permission; import com.refinedmods.refinedstorage.blockentity.SecurityManagerBlockEntity; + import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class SecurityManagerContainerMenu extends BaseContainerMenu { + private final SecurityManagerBlockEntity securityManager; + public SecurityManagerContainerMenu(SecurityManagerBlockEntity securityManager, Player player, int windowId) { super(RSContainerMenus.SECURITY_MANAGER.get(), securityManager, player, windowId); @@ -29,5 +33,11 @@ public SecurityManagerContainerMenu(SecurityManagerBlockEntity securityManager, transferManager.addBiTransfer(player.getInventory(), securityManager.getNode().getCardsItems()); transferManager.addTransfer(securityManager.getNode().getEditCard(), player.getInventory()); + + this.securityManager = securityManager; + } + + public void updatePermission(Permission permission, boolean state) { + securityManager.getNode().updatePermission(permission, state); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/container/WirelessTransmitterContainerMenu.java b/src/main/java/com/refinedmods/refinedstorage/container/WirelessTransmitterContainerMenu.java index 09763f9cc1..c904c3ba5e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/WirelessTransmitterContainerMenu.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/WirelessTransmitterContainerMenu.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage.RSContainerMenus; import com.refinedmods.refinedstorage.blockentity.WirelessTransmitterBlockEntity; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.items.SlotItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class WirelessTransmitterContainerMenu extends BaseContainerMenu { public WirelessTransmitterContainerMenu(WirelessTransmitterBlockEntity wirelessTransmitter, Player player, int windowId) { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/factory/BlockEntityContainerFactory.java b/src/main/java/com/refinedmods/refinedstorage/container/factory/BlockEntityContainerFactory.java index 6315494842..ff599e52f7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/factory/BlockEntityContainerFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/factory/BlockEntityContainerFactory.java @@ -5,7 +5,7 @@ import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.network.IContainerFactory; +import net.neoforged.neoforge.network.IContainerFactory; public class BlockEntityContainerFactory implements IContainerFactory { private final Factory factory; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/factory/CrafterManagerContainerFactory.java b/src/main/java/com/refinedmods/refinedstorage/container/factory/CrafterManagerContainerFactory.java index d13c67eca3..7a72b2ba00 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/factory/CrafterManagerContainerFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/factory/CrafterManagerContainerFactory.java @@ -6,8 +6,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; -import net.minecraftforge.network.IContainerFactory; - +import net.neoforged.neoforge.network.IContainerFactory; import java.util.LinkedHashMap; import java.util.Map; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/factory/CrafterManagerMenuProvider.java b/src/main/java/com/refinedmods/refinedstorage/container/factory/CrafterManagerMenuProvider.java index 0478049f8d..6c16c7cbf0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/factory/CrafterManagerMenuProvider.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/factory/CrafterManagerMenuProvider.java @@ -12,8 +12,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.Level; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.items.IItemHandlerModifiable; import javax.annotation.Nullable; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/factory/CraftingMonitorContainerFactory.java b/src/main/java/com/refinedmods/refinedstorage/container/factory/CraftingMonitorContainerFactory.java index 0195fc8fc7..f92e81c36b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/factory/CraftingMonitorContainerFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/factory/CraftingMonitorContainerFactory.java @@ -6,7 +6,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; -import net.minecraftforge.network.IContainerFactory; +import net.neoforged.neoforge.network.IContainerFactory; public class CraftingMonitorContainerFactory implements IContainerFactory { @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/container/factory/GridContainerFactory.java b/src/main/java/com/refinedmods/refinedstorage/container/factory/GridContainerFactory.java index 9be8ee3f35..06b74d4ae8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/factory/GridContainerFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/factory/GridContainerFactory.java @@ -11,7 +11,7 @@ import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.network.IContainerFactory; +import net.neoforged.neoforge.network.IContainerFactory; import org.apache.commons.lang3.tuple.Pair; public class GridContainerFactory implements IContainerFactory { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/factory/WirelessCraftingMonitorContainerFactory.java b/src/main/java/com/refinedmods/refinedstorage/container/factory/WirelessCraftingMonitorContainerFactory.java index 68f30ad0e8..9af9d2491a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/factory/WirelessCraftingMonitorContainerFactory.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/factory/WirelessCraftingMonitorContainerFactory.java @@ -7,7 +7,7 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.IContainerFactory; +import net.neoforged.neoforge.network.IContainerFactory; public class WirelessCraftingMonitorContainerFactory implements IContainerFactory { @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/container/slot/BaseSlot.java b/src/main/java/com/refinedmods/refinedstorage/container/slot/BaseSlot.java index 1fdf0bfe81..6127f9d7e3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/slot/BaseSlot.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/slot/BaseSlot.java @@ -1,9 +1,8 @@ package com.refinedmods.refinedstorage.container.slot; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.SlotItemHandler; - import java.util.function.BooleanSupplier; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.SlotItemHandler; public class BaseSlot extends SlotItemHandler { private BooleanSupplier enableHandler = () -> true; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/slot/CrafterManagerSlot.java b/src/main/java/com/refinedmods/refinedstorage/container/slot/CrafterManagerSlot.java index 8a9cd72b7d..1c8e3eb83e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/slot/CrafterManagerSlot.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/slot/CrafterManagerSlot.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage.apiimpl.network.node.CrafterManagerNetworkNode; import com.refinedmods.refinedstorage.screen.IScreenInfoProvider; -import net.minecraftforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandler; public class CrafterManagerSlot extends BaseSlot { private final boolean visible; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/slot/DisabledSlot.java b/src/main/java/com/refinedmods/refinedstorage/container/slot/DisabledSlot.java index d990d1785c..0a2c278c78 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/slot/DisabledSlot.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/slot/DisabledSlot.java @@ -1,8 +1,7 @@ package com.refinedmods.refinedstorage.container.slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.items.IItemHandler; import javax.annotation.Nonnull; public class DisabledSlot extends BaseSlot { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/slot/OutputSlot.java b/src/main/java/com/refinedmods/refinedstorage/container/slot/OutputSlot.java index ede49af561..476e9bbfd2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/slot/OutputSlot.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/slot/OutputSlot.java @@ -1,8 +1,7 @@ package com.refinedmods.refinedstorage.container.slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.items.IItemHandler; import javax.annotation.Nonnull; public class OutputSlot extends BaseSlot { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/slot/filter/FilterSlot.java b/src/main/java/com/refinedmods/refinedstorage/container/slot/filter/FilterSlot.java index 823798cbcd..c97b7c9d2b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/slot/filter/FilterSlot.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/slot/filter/FilterSlot.java @@ -4,8 +4,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.items.IItemHandler; import javax.annotation.Nonnull; public class FilterSlot extends BaseSlot { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/slot/filter/FluidFilterSlot.java b/src/main/java/com/refinedmods/refinedstorage/container/slot/filter/FluidFilterSlot.java index ec4669bc92..0f3cd1d4f4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/slot/filter/FluidFilterSlot.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/slot/filter/FluidFilterSlot.java @@ -5,8 +5,7 @@ import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemStackHandler; - +import net.neoforged.neoforge.items.ItemStackHandler; import javax.annotation.Nonnull; public class FluidFilterSlot extends BaseSlot { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/slot/grid/ResultCraftingGridSlot.java b/src/main/java/com/refinedmods/refinedstorage/container/slot/grid/ResultCraftingGridSlot.java index b7ed5b9f2f..f7c2a25898 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/slot/grid/ResultCraftingGridSlot.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/slot/grid/ResultCraftingGridSlot.java @@ -4,9 +4,8 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.ResultSlot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.ForgeHooks; -import net.minecraftforge.event.ForgeEventFactory; - +import net.neoforged.neoforge.common.CommonHooks; +import net.neoforged.neoforge.event.EventHooks; import javax.annotation.Nonnull; public class ResultCraftingGridSlot extends ResultSlot { @@ -22,13 +21,13 @@ public ResultCraftingGridSlot(Player player, IGrid grid, int inventoryIndex, int @Override public void onTake(Player player, @Nonnull ItemStack stack) { checkTakeAchievements(stack); - ForgeHooks.setCraftingPlayer(player); + CommonHooks.setCraftingPlayer(player); if (!player.getCommandSenderWorld().isClientSide) { grid.onCrafted(player, null, null); } - ForgeEventFactory.firePlayerCraftingEvent(player, stack.copy(), grid.getCraftingMatrix()); - ForgeHooks.setCraftingPlayer(null); + EventHooks.firePlayerCraftingEvent(player, stack.copy(), grid.getCraftingMatrix()); + CommonHooks.setCraftingPlayer(null); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/container/transfer/FilterInventoryWrapper.java b/src/main/java/com/refinedmods/refinedstorage/container/transfer/FilterInventoryWrapper.java index 284dba617a..46125f42c2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/transfer/FilterInventoryWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/transfer/FilterInventoryWrapper.java @@ -3,8 +3,7 @@ import com.refinedmods.refinedstorage.inventory.fluid.FluidInventory; import com.refinedmods.refinedstorage.blockentity.config.IType; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandlerModifiable; - +import net.neoforged.neoforge.items.IItemHandlerModifiable; import java.util.function.Supplier; class FilterInventoryWrapper implements IInventoryWrapper { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/transfer/FluidFilterInventoryWrapper.java b/src/main/java/com/refinedmods/refinedstorage/container/transfer/FluidFilterInventoryWrapper.java index ee8e85007d..4029d60f33 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/transfer/FluidFilterInventoryWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/transfer/FluidFilterInventoryWrapper.java @@ -5,8 +5,8 @@ import com.refinedmods.refinedstorage.inventory.fluid.FluidInventory; import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; class FluidFilterInventoryWrapper implements IInventoryWrapper { private final FluidInventory filterInv; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/transfer/InventoryInventoryWrapper.java b/src/main/java/com/refinedmods/refinedstorage/container/transfer/InventoryInventoryWrapper.java index 00cab9d902..0f1549fe33 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/transfer/InventoryInventoryWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/transfer/InventoryInventoryWrapper.java @@ -3,11 +3,10 @@ import net.minecraft.world.Container; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.ItemHandlerHelper; -import net.minecraftforge.items.wrapper.InvWrapper; -import net.minecraftforge.items.wrapper.RangedWrapper; - +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.items.wrapper.InvWrapper; +import net.neoforged.neoforge.items.wrapper.RangedWrapper; import java.util.Objects; class InventoryInventoryWrapper implements IInventoryWrapper { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/transfer/ItemFilterInventoryWrapper.java b/src/main/java/com/refinedmods/refinedstorage/container/transfer/ItemFilterInventoryWrapper.java index 43feb9b93b..274904bf22 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/transfer/ItemFilterInventoryWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/transfer/ItemFilterInventoryWrapper.java @@ -2,8 +2,8 @@ import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.items.ItemHandlerHelper; class ItemFilterInventoryWrapper implements IInventoryWrapper { private final IItemHandlerModifiable filterInv; diff --git a/src/main/java/com/refinedmods/refinedstorage/container/transfer/ItemHandlerInventoryWrapper.java b/src/main/java/com/refinedmods/refinedstorage/container/transfer/ItemHandlerInventoryWrapper.java index 930e5022e3..04828c2176 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/transfer/ItemHandlerInventoryWrapper.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/transfer/ItemHandlerInventoryWrapper.java @@ -1,9 +1,8 @@ package com.refinedmods.refinedstorage.container.transfer; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.ItemHandlerHelper; - +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.ItemHandlerHelper; import java.util.Objects; class ItemHandlerInventoryWrapper implements IInventoryWrapper { diff --git a/src/main/java/com/refinedmods/refinedstorage/container/transfer/TransferManager.java b/src/main/java/com/refinedmods/refinedstorage/container/transfer/TransferManager.java index dc8734a365..daca1ede7f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/container/transfer/TransferManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/container/transfer/TransferManager.java @@ -6,10 +6,9 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.items.SlotItemHandler; - +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.items.SlotItemHandler; import javax.annotation.Nullable; import java.util.HashMap; import java.util.LinkedList; diff --git a/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockEntityTagGenerator.java b/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockEntityTagGenerator.java index bdfb662c78..e6dd64df0e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockEntityTagGenerator.java +++ b/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockEntityTagGenerator.java @@ -2,6 +2,7 @@ import com.refinedmods.refinedstorage.RSBlockEntities; import net.minecraft.core.HolderLookup; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.TagsProvider; @@ -9,9 +10,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.level.block.entity.BlockEntityType; -import net.minecraftforge.common.data.ExistingFileHelper; -import net.minecraftforge.registries.ForgeRegistries; - +import net.neoforged.neoforge.common.data.ExistingFileHelper; import java.util.concurrent.CompletableFuture; public class BlockEntityTagGenerator extends TagsProvider> { @@ -67,7 +66,7 @@ protected void addTags(HolderLookup.Provider provider) { } private ResourceKey> resourceKey(BlockEntityType type) { - return ForgeRegistries.BLOCK_ENTITY_TYPES.getResourceKey(type).get(); + return BuiltInRegistries.BLOCK_ENTITY_TYPE.getResourceKey(type).get(); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockModelGenerator.java b/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockModelGenerator.java index 5c3872c020..3a8e6bce52 100644 --- a/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockModelGenerator.java +++ b/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockModelGenerator.java @@ -5,15 +5,16 @@ import com.refinedmods.refinedstorage.block.ControllerBlock; import com.refinedmods.refinedstorage.block.DetectorBlock; import com.refinedmods.refinedstorage.block.NetworkNodeBlock; +import com.refinedmods.refinedstorage.util.BlockColorMap; import com.refinedmods.refinedstorage.util.ColorMap; -import net.minecraft.data.DataGenerator; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; -import net.minecraftforge.client.model.generators.BlockStateProvider; -import net.minecraftforge.client.model.generators.ModelFile; -import net.minecraftforge.common.data.ExistingFileHelper; -import net.minecraftforge.registries.ForgeRegistries; +import net.neoforged.neoforge.client.model.generators.BlockStateProvider; +import net.neoforged.neoforge.client.model.generators.ModelFile; +import net.neoforged.neoforge.common.data.ExistingFileHelper; public class BlockModelGenerator extends BlockStateProvider { private static final ResourceLocation BOTTOM = new ResourceLocation(RS.ID, "block/bottom"); @@ -139,7 +140,7 @@ private void genSecurityManagerModels() { }); } - private void genCubeAllCutoutModels(ColorMap blockMap) { + private void genCubeAllCutoutModels(BlockColorMap blockMap) { blockMap.forEach((color, registryObject) -> { Block block = registryObject.get(); String folderName = blockMap.get(ColorMap.DEFAULT_COLOR).getId().getPath(); @@ -213,7 +214,7 @@ private void genCrafterModels() { }); } - private void genControllerModels(ColorMap blockMap) { + private void genControllerModels(BlockColorMap blockMap) { blockMap.forEach((color, registryObject) -> { Block block = registryObject.get(); String folderName = RSBlocks.CONTROLLER.get(ColorMap.DEFAULT_COLOR).getId().getPath(); @@ -251,7 +252,7 @@ private void genControllerModels(ColorMap blockMap) { ); final ResourceLocation energyType = new ResourceLocation(RS.ID, "energy_type"); - itemModels().getBuilder(ForgeRegistries.BLOCKS.getKey(block).getPath()) + itemModels().getBuilder(BuiltInRegistries.BLOCK.getKey(block).getPath()) .override() .predicate(energyType, 0) .model(models().getExistingFile( @@ -274,7 +275,7 @@ private void genControllerModels(ColorMap blockMap) { }); } - private void genNorthCutoutModels(ColorMap blockMap, boolean useLoader) { + private void genNorthCutoutModels(BlockColorMap blockMap, boolean useLoader) { blockMap.forEach((color, registryObject) -> { Block block = registryObject.get(); String folderName = blockMap.get(ColorMap.DEFAULT_COLOR).getId().getPath(); diff --git a/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockModels.java b/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockModels.java index 0a810a6739..4a5596c2ad 100644 --- a/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockModels.java +++ b/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockModels.java @@ -6,12 +6,11 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.generators.BlockModelBuilder; -import net.minecraftforge.client.model.generators.ConfiguredModel; -import net.minecraftforge.client.model.generators.CustomLoaderBuilder; -import net.minecraftforge.client.model.generators.ModelFile; -import net.minecraftforge.common.data.ExistingFileHelper; - +import net.neoforged.neoforge.client.model.generators.BlockModelBuilder; +import net.neoforged.neoforge.client.model.generators.ConfiguredModel; +import net.neoforged.neoforge.client.model.generators.CustomLoaderBuilder; +import net.neoforged.neoforge.client.model.generators.ModelFile; +import net.neoforged.neoforge.common.data.ExistingFileHelper; import java.util.function.Function; public class BlockModels { diff --git a/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockTagGenerator.java b/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockTagGenerator.java index 66c4432e7b..c630a85b41 100644 --- a/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockTagGenerator.java +++ b/src/main/java/com/refinedmods/refinedstorage/datageneration/BlockTagGenerator.java @@ -2,15 +2,14 @@ import com.refinedmods.refinedstorage.RSBlocks; import net.minecraft.core.HolderLookup; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; import net.minecraft.world.level.block.Block; -import net.minecraftforge.common.data.BlockTagsProvider; -import net.minecraftforge.common.data.ExistingFileHelper; -import net.minecraftforge.registries.ForgeRegistries; - +import net.neoforged.neoforge.common.data.BlockTagsProvider; +import net.neoforged.neoforge.common.data.ExistingFileHelper; import javax.annotation.Nullable; import java.util.concurrent.CompletableFuture; @@ -46,6 +45,6 @@ protected void addTags(HolderLookup.Provider provider) { } private ResourceKey resourceKey(Block block) { - return ForgeRegistries.BLOCKS.getResourceKey(block).get(); + return BuiltInRegistries.BLOCK.getResourceKey(block).get(); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/datageneration/DataGenerators.java b/src/main/java/com/refinedmods/refinedstorage/datageneration/DataGenerators.java index e1dcb9278f..61b54320b2 100644 --- a/src/main/java/com/refinedmods/refinedstorage/datageneration/DataGenerators.java +++ b/src/main/java/com/refinedmods/refinedstorage/datageneration/DataGenerators.java @@ -3,10 +3,9 @@ import com.refinedmods.refinedstorage.RS; import net.minecraft.data.loot.LootTableProvider; import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; -import net.minecraftforge.common.data.BlockTagsProvider; -import net.minecraftforge.data.event.GatherDataEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; - +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.common.data.BlockTagsProvider; +import net.neoforged.neoforge.data.event.GatherDataEvent; import java.util.List; import java.util.Set; diff --git a/src/main/java/com/refinedmods/refinedstorage/datageneration/ItemTagGenerator.java b/src/main/java/com/refinedmods/refinedstorage/datageneration/ItemTagGenerator.java index 7e42499c92..0f007d9d85 100644 --- a/src/main/java/com/refinedmods/refinedstorage/datageneration/ItemTagGenerator.java +++ b/src/main/java/com/refinedmods/refinedstorage/datageneration/ItemTagGenerator.java @@ -1,17 +1,20 @@ package com.refinedmods.refinedstorage.datageneration; import com.refinedmods.refinedstorage.RSItems; + +import java.util.concurrent.CompletableFuture; + import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.ItemTagsProvider; import net.minecraft.data.tags.TagsProvider; import net.minecraft.world.level.block.Block; -import net.minecraftforge.common.data.ExistingFileHelper; - -import java.util.concurrent.CompletableFuture; +import net.neoforged.neoforge.common.data.ExistingFileHelper; public class ItemTagGenerator extends ItemTagsProvider { - public ItemTagGenerator(PackOutput output, CompletableFuture lookup, CompletableFuture> p_275322_, String modId, ExistingFileHelper existingFileHelper) { + public ItemTagGenerator(PackOutput output, CompletableFuture lookup, + CompletableFuture> p_275322_, String modId, + ExistingFileHelper existingFileHelper) { super(output, lookup, p_275322_, modId, existingFileHelper); } diff --git a/src/main/java/com/refinedmods/refinedstorage/datageneration/LootTableGenerator.java b/src/main/java/com/refinedmods/refinedstorage/datageneration/LootTableGenerator.java index dd81944fe7..f27db96e8d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/datageneration/LootTableGenerator.java +++ b/src/main/java/com/refinedmods/refinedstorage/datageneration/LootTableGenerator.java @@ -12,7 +12,7 @@ import net.minecraft.world.level.storage.loot.functions.LootItemFunction; import net.minecraft.world.level.storage.loot.predicates.ExplosionCondition; import net.minecraft.world.level.storage.loot.providers.number.ConstantValue; -import net.minecraftforge.registries.RegistryObject; +import net.neoforged.neoforge.registries.DeferredHolder; import java.util.Collections; import java.util.stream.Collectors; @@ -24,9 +24,10 @@ public LootTableGenerator() { @Override protected void generate() { - RSBlocks.CONTROLLER.values().forEach(block -> genBlockItemLootTableWithFunction(block.get(), ControllerLootFunction.builder())); + RSBlocks.CONTROLLER.values().forEach(block -> genBlockItemLootTableWithFunction(block.get(), ControllerLootFunction::new)); RSBlocks.CREATIVE_CONTROLLER.values().forEach(block -> dropSelf(block.get())); - RSBlocks.CRAFTER.values().forEach(block -> genBlockItemLootTableWithFunction(block.get(), CrafterLootFunction.builder())); + RSBlocks.CRAFTER.values().forEach(block -> genBlockItemLootTableWithFunction(block.get(), + CrafterLootFunction::new)); RSBlocks.GRID.values().forEach(block -> dropSelf(block.get())); RSBlocks.CRAFTING_GRID.values().forEach(block -> dropSelf(block.get())); RSBlocks.FLUID_GRID.values().forEach(block -> dropSelf(block.get())); @@ -44,7 +45,7 @@ protected void generate() { @Override protected Iterable getKnownBlocks() { - return RSBlocks.COLORED_BLOCKS.stream().map(RegistryObject::get).collect(Collectors.toList()); + return RSBlocks.COLORED_BLOCKS.stream().map(DeferredHolder::get).collect(Collectors.toList()); } private void genBlockItemLootTableWithFunction(Block block, LootItemFunction.Builder builder) { diff --git a/src/main/java/com/refinedmods/refinedstorage/datageneration/RecipeGenerator.java b/src/main/java/com/refinedmods/refinedstorage/datageneration/RecipeGenerator.java index 0594a4cd42..ed5963f5fe 100644 --- a/src/main/java/com/refinedmods/refinedstorage/datageneration/RecipeGenerator.java +++ b/src/main/java/com/refinedmods/refinedstorage/datageneration/RecipeGenerator.java @@ -6,16 +6,14 @@ import com.refinedmods.refinedstorage.util.ColorMap; import net.minecraft.advancements.critereon.InventoryChangeTrigger; import net.minecraft.data.PackOutput; -import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeCategory; +import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.data.recipes.ShapelessRecipeBuilder; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; import net.minecraft.world.item.Items; -import java.util.function.Consumer; - public class RecipeGenerator extends RecipeProvider { private static final String GRID_ID = RS.ID + ":grid"; @@ -24,14 +22,14 @@ public RecipeGenerator(PackOutput output) { } @Override - protected void buildRecipes(Consumer recipeAcceptor) { + protected void buildRecipes(RecipeOutput output) { // Tag + Color -> Colored Block RSItems.COLORED_ITEM_TAGS.forEach((tag, map) -> map.forEach((color, item) -> ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, item.get()) .requires(tag) .requires(color.getTag()) .group(RS.ID) .unlockedBy("refinedstorage:controller", InventoryChangeTrigger.TriggerInstance.hasItems(RSItems.CONTROLLER.get(ColorMap.DEFAULT_COLOR).get())) - .save(recipeAcceptor, new ResourceLocation(RS.ID, "coloring_recipes/" + item.getId().getPath())) + .save(output, new ResourceLocation(RS.ID, "coloring_recipes/" + item.getId().getPath())) )); // Crafting Grid @@ -40,7 +38,7 @@ protected void buildRecipes(Consumer recipeAcceptor) { .requires(RSItems.PROCESSORS.get(ProcessorItem.Type.ADVANCED).get()) .requires(ItemTags.create(new ResourceLocation(RS.ID, "crafting_tables"))) .unlockedBy(GRID_ID, InventoryChangeTrigger.TriggerInstance.hasItems(RSItems.GRID.get(ColorMap.DEFAULT_COLOR).get())) - .save(recipeAcceptor, new ResourceLocation(RS.ID, "crafting_grid/" + item.getId().getPath())) + .save(output, new ResourceLocation(RS.ID, "crafting_grid/" + item.getId().getPath())) ); // Fluid Grid @@ -49,7 +47,7 @@ protected void buildRecipes(Consumer recipeAcceptor) { .requires(RSItems.PROCESSORS.get(ProcessorItem.Type.ADVANCED).get()) .requires(Items.BUCKET) .unlockedBy(GRID_ID, InventoryChangeTrigger.TriggerInstance.hasItems(RSItems.GRID.get(ColorMap.DEFAULT_COLOR).get())) - .save(recipeAcceptor, new ResourceLocation(RS.ID, "fluid_grid/" + item.getId().getPath())) + .save(output, new ResourceLocation(RS.ID, "fluid_grid/" + item.getId().getPath())) ); // Pattern Grid @@ -58,7 +56,7 @@ protected void buildRecipes(Consumer recipeAcceptor) { .requires(RSItems.PROCESSORS.get(ProcessorItem.Type.ADVANCED).get()) .requires(RSItems.PATTERN.get()) .unlockedBy(GRID_ID, InventoryChangeTrigger.TriggerInstance.hasItems(RSItems.GRID.get(ColorMap.DEFAULT_COLOR).get())) - .save(recipeAcceptor, new ResourceLocation(RS.ID, "pattern_grid/" + item.getId().getPath())) + .save(output, new ResourceLocation(RS.ID, "pattern_grid/" + item.getId().getPath())) ); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/energy/BaseEnergyStorage.java b/src/main/java/com/refinedmods/refinedstorage/energy/BaseEnergyStorage.java index 5b068a0b51..ce65f4c135 100644 --- a/src/main/java/com/refinedmods/refinedstorage/energy/BaseEnergyStorage.java +++ b/src/main/java/com/refinedmods/refinedstorage/energy/BaseEnergyStorage.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.energy; -import net.minecraftforge.energy.EnergyStorage; +import net.neoforged.neoforge.energy.EnergyStorage; public class BaseEnergyStorage extends EnergyStorage { public BaseEnergyStorage(int capacity, int maxReceive, int maxExtract) { diff --git a/src/main/java/com/refinedmods/refinedstorage/energy/ItemEnergyStorage.java b/src/main/java/com/refinedmods/refinedstorage/energy/ItemEnergyStorage.java index 84cd6e1bc7..e33962bcc8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/energy/ItemEnergyStorage.java +++ b/src/main/java/com/refinedmods/refinedstorage/energy/ItemEnergyStorage.java @@ -2,7 +2,7 @@ import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.energy.EnergyStorage; +import net.neoforged.neoforge.energy.EnergyStorage; public class ItemEnergyStorage extends EnergyStorage { private static final String NBT_ENERGY = "Energy"; diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/craftingtweaks/CraftingTweaksIntegration.java b/src/main/java/com/refinedmods/refinedstorage/integration/craftingtweaks/CraftingTweaksIntegration.java index 91ff0d938b..974911d55c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/craftingtweaks/CraftingTweaksIntegration.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/craftingtweaks/CraftingTweaksIntegration.java @@ -4,9 +4,8 @@ import com.refinedmods.refinedstorage.container.GridContainerMenu; import com.refinedmods.refinedstorage.container.slot.grid.CraftingGridSlot; import net.minecraft.nbt.CompoundTag; -import net.minecraftforge.fml.InterModComms; -import net.minecraftforge.fml.ModList; - +import net.neoforged.fml.InterModComms; +import net.neoforged.fml.ModList; import java.util.function.Function; import java.util.function.Predicate; diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/curios/CuriosIntegration.java b/src/main/java/com/refinedmods/refinedstorage/integration/curios/CuriosIntegration.java index 5695beef2c..0ace4632d4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/curios/CuriosIntegration.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/curios/CuriosIntegration.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage.integration.curios; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.InterModComms; -import net.minecraftforge.fml.ModList; -import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.InterModComms; +import net.neoforged.fml.ModList; +import net.neoforged.fml.event.lifecycle.InterModEnqueueEvent; import top.theillusivec4.curios.api.SlotTypeMessage; import top.theillusivec4.curios.api.SlotTypePreset; diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/inventorysorter/InventorySorterIntegration.java b/src/main/java/com/refinedmods/refinedstorage/integration/inventorysorter/InventorySorterIntegration.java index d676234576..928c317429 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/inventorysorter/InventorySorterIntegration.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/inventorysorter/InventorySorterIntegration.java @@ -2,8 +2,8 @@ import com.refinedmods.refinedstorage.RS; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.fml.ModList; -import net.minecraftforge.fml.InterModComms; +import net.neoforged.fml.InterModComms; +import net.neoforged.fml.ModList; public class InventorySorterIntegration { private static final String ID = "inventorysorter"; diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/inventorytweaks/InventoryTweaksIntegration.java b/src/main/java/com/refinedmods/refinedstorage/integration/inventorytweaks/InventoryTweaksIntegration.java index 327830c9b7..07705f1082 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/inventorytweaks/InventoryTweaksIntegration.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/inventorytweaks/InventoryTweaksIntegration.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.integration.inventorytweaks; -import net.minecraftforge.fml.ModList; +import net.neoforged.fml.ModList; public class InventoryTweaksIntegration { private InventoryTweaksIntegration() { diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/CoverCraftingCategoryExtension.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/CoverCraftingCategoryExtension.java index 4afcdf18e4..341bddb711 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/CoverCraftingCategoryExtension.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/CoverCraftingCategoryExtension.java @@ -4,33 +4,32 @@ import com.refinedmods.refinedstorage.apiimpl.network.node.cover.CoverManager; import com.refinedmods.refinedstorage.item.CoverItem; import com.refinedmods.refinedstorage.recipe.CoverRecipe; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import com.google.common.collect.Streams; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.builder.IRecipeSlotBuilder; import mezz.jei.api.gui.ingredient.ICraftingGridHelper; import mezz.jei.api.recipe.IFocusGroup; import mezz.jei.api.recipe.category.extensions.vanilla.crafting.ICraftingCategoryExtension; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.level.block.Block; -import net.minecraftforge.common.Tags; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.tags.ITag; - -import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -public class CoverCraftingCategoryExtension implements ICraftingCategoryExtension { - +import net.neoforged.neoforge.common.Tags; +public class CoverCraftingCategoryExtension implements ICraftingCategoryExtension { @Override - public void setRecipe(IRecipeLayoutBuilder builder, ICraftingGridHelper craftingGridHelper, IFocusGroup focuses) { + public void setRecipe(RecipeHolder recipe, IRecipeLayoutBuilder builder, + ICraftingGridHelper craftingGridHelper, IFocusGroup focuses) { List input = new ArrayList<>(); List output = new ArrayList<>(); - for (Block block : ForgeRegistries.BLOCKS.getValues()) { + for (Block block : BuiltInRegistries.BLOCK) { Item item = Item.BY_BLOCK.get(block); if (item == null || item == Items.AIR) { continue; @@ -44,8 +43,8 @@ public void setRecipe(IRecipeLayoutBuilder builder, ICraftingGridHelper crafting } } - ITag nuggetTag = ForgeRegistries.ITEMS.tags().getTag(Tags.Items.NUGGETS_IRON); - List nuggets = nuggetTag.stream().map(ItemStack::new).toList(); + final var nuggetTag = BuiltInRegistries.ITEM.getTagOrEmpty(Tags.Items.NUGGETS_IRON); + List nuggets = Streams.stream(nuggetTag).map(ItemStack::new).toList(); List> inputs = new ArrayList<>(Collections.nCopies(9, new ArrayList<>())); inputs.set(3, nuggets); inputs.set(4, input); @@ -56,18 +55,12 @@ public void setRecipe(IRecipeLayoutBuilder builder, ICraftingGridHelper crafting } @Override - public int getWidth() { + public int getWidth(RecipeHolder recipe) { return 3; } @Override - public int getHeight() { + public int getHeight(RecipeHolder recipe) { return 3; } - - @Nullable - @Override - public ResourceLocation getRegistryName() { - return ForgeRegistries.RECIPE_SERIALIZERS.getKey(CoverRecipe.SERIALIZER); - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/GhostIngredientHandler.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/GhostIngredientHandler.java index 59f02dd912..9bd8971b68 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/GhostIngredientHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/GhostIngredientHandler.java @@ -13,8 +13,8 @@ import net.minecraft.client.renderer.Rect2i; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/GridRecipeTransferHandler.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/GridRecipeTransferHandler.java index d807611375..f5441ca3c3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/GridRecipeTransferHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/GridRecipeTransferHandler.java @@ -8,9 +8,9 @@ import com.refinedmods.refinedstorage.network.grid.GridProcessingTransferMessage; import com.refinedmods.refinedstorage.network.grid.GridTransferMessage; import com.refinedmods.refinedstorage.screen.grid.GridScreen; -import mezz.jei.api.forge.ForgeTypes; import mezz.jei.api.gui.ingredient.IRecipeSlotView; import mezz.jei.api.gui.ingredient.IRecipeSlotsView; +import mezz.jei.api.neoforge.NeoForgeTypes; import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.RecipeType; import mezz.jei.api.recipe.transfer.IRecipeTransferError; @@ -20,7 +20,7 @@ import net.minecraft.world.inventory.MenuType; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Recipe; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; @@ -185,7 +185,7 @@ private void moveForProcessing(IRecipeSlotsView recipeLayout, GridContainerMenu private void handleFluidIngredient(List list, IRecipeSlotView slotView) { if (slotView != null) { - slotView.getDisplayedIngredient(ForgeTypes.FLUID_STACK).ifPresent(list::add); + slotView.getDisplayedIngredient(NeoForgeTypes.FLUID_STACK).ifPresent(list::add); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/GuiContainerHandler.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/GuiContainerHandler.java index e3737191c1..67b8ecfb8c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/GuiContainerHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/GuiContainerHandler.java @@ -10,8 +10,7 @@ import mezz.jei.api.runtime.IClickableIngredient; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.renderer.Rect2i; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/HollowCoverCraftingCategoryExtension.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/HollowCoverCraftingCategoryExtension.java index 7b41e134a2..f3c79765c1 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/HollowCoverCraftingCategoryExtension.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/HollowCoverCraftingCategoryExtension.java @@ -9,27 +9,25 @@ import mezz.jei.api.gui.ingredient.ICraftingGridHelper; import mezz.jei.api.recipe.IFocusGroup; import mezz.jei.api.recipe.category.extensions.vanilla.crafting.ICraftingCategoryExtension; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.RecipeHolder; import net.minecraft.world.level.block.Block; -import net.minecraftforge.registries.ForgeRegistries; - import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; -public class HollowCoverCraftingCategoryExtension implements ICraftingCategoryExtension { - +public class HollowCoverCraftingCategoryExtension implements ICraftingCategoryExtension { @Override - public void setRecipe(IRecipeLayoutBuilder builder, ICraftingGridHelper craftingGridHelper, IFocusGroup focuses) { - + public void setRecipe(RecipeHolder recipe, IRecipeLayoutBuilder builder, ICraftingGridHelper craftingGridHelper, IFocusGroup focuses) { List> stacks = new ArrayList<>(Collections.nCopies(9, new ArrayList<>())); List input = new ArrayList<>(); List output = new ArrayList<>(); - for (Block block : ForgeRegistries.BLOCKS.getValues()) { + for (Block block : BuiltInRegistries.BLOCK) { Item item = Item.BY_BLOCK.get(block); if (item == null || item == Items.AIR) { continue; @@ -50,20 +48,4 @@ public void setRecipe(IRecipeLayoutBuilder builder, ICraftingGridHelper crafting IRecipeSlotBuilder outputSlot = craftingGridHelper.createAndSetOutputs(builder, output); builder.createFocusLink(inputSlots.get(4), outputSlot); } - - @Nullable - @Override - public ResourceLocation getRegistryName() { - return ForgeRegistries.RECIPE_SERIALIZERS.getKey(HollowCoverRecipe.SERIALIZER); - } - - @Override - public int getWidth() { - return 0; - } - - @Override - public int getHeight() { - return 0; - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/IngredientTracker.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/IngredientTracker.java index f1831d4dc4..aad00c740a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/IngredientTracker.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/IngredientTracker.java @@ -16,7 +16,6 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.ItemStack; - import java.util.*; public class IngredientTracker { diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/JeiHelper.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/JeiHelper.java index 0d190feaca..e5b22406ee 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/JeiHelper.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/JeiHelper.java @@ -4,7 +4,6 @@ import mezz.jei.api.runtime.IClickableIngredient; import mezz.jei.api.runtime.IIngredientManager; import net.minecraft.client.renderer.Rect2i; - import java.util.Optional; public class JeiHelper { diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/JeiIntegration.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/JeiIntegration.java index 2a56f78e49..576db476f8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/JeiIntegration.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/JeiIntegration.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.integration.jei; -import net.minecraftforge.fml.ModList; +import net.neoforged.fml.ModList; public final class JeiIntegration { private JeiIntegration() { diff --git a/src/main/java/com/refinedmods/refinedstorage/integration/jei/RSJeiPlugin.java b/src/main/java/com/refinedmods/refinedstorage/integration/jei/RSJeiPlugin.java index 404e932ce5..6bbfd4662d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/integration/jei/RSJeiPlugin.java +++ b/src/main/java/com/refinedmods/refinedstorage/integration/jei/RSJeiPlugin.java @@ -53,7 +53,7 @@ public void registerItemSubtypes(ISubtypeRegistration registration) { @Override public void registerVanillaCategoryExtensions(IVanillaCategoryExtensionRegistration registration) { - registration.getCraftingCategory().addCategoryExtension(CoverRecipe.class, cover -> new CoverCraftingCategoryExtension()); - registration.getCraftingCategory().addCategoryExtension(HollowCoverRecipe.class, cover -> new HollowCoverCraftingCategoryExtension()); + registration.getCraftingCategory().addExtension(CoverRecipe.class, new CoverCraftingCategoryExtension()); + registration.getCraftingCategory().addExtension(HollowCoverRecipe.class, new HollowCoverCraftingCategoryExtension()); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ConfiguredFluidsInFilterItemHandler.java b/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ConfiguredFluidsInFilterItemHandler.java index a8e09bda7e..a23d27fdb1 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ConfiguredFluidsInFilterItemHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ConfiguredFluidsInFilterItemHandler.java @@ -4,7 +4,7 @@ import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class ConfiguredFluidsInFilterItemHandler extends FluidInventory { public ConfiguredFluidsInFilterItemHandler(ItemStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ConfiguredIconInFluidFilterItemHandler.java b/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ConfiguredIconInFluidFilterItemHandler.java index a10a4b2a98..b108574eae 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ConfiguredIconInFluidFilterItemHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ConfiguredIconInFluidFilterItemHandler.java @@ -3,7 +3,7 @@ import com.refinedmods.refinedstorage.item.FilterItem; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class ConfiguredIconInFluidFilterItemHandler extends FluidInventory { public ConfiguredIconInFluidFilterItemHandler(ItemStack stack) { diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/FluidInventory.java b/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/FluidInventory.java index 030fa59492..4b439f764b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/FluidInventory.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/FluidInventory.java @@ -2,8 +2,7 @@ import com.refinedmods.refinedstorage.inventory.listener.InventoryListener; import net.minecraft.nbt.CompoundTag; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ProxyFluidHandler.java b/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ProxyFluidHandler.java index a0768e32b2..568bfcd46f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ProxyFluidHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/fluid/ProxyFluidHandler.java @@ -1,10 +1,9 @@ package com.refinedmods.refinedstorage.inventory.fluid; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fluids.capability.templates.FluidTank; - import javax.annotation.Nonnull; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.fluids.capability.templates.FluidTank; public class ProxyFluidHandler implements IFluidHandler { private final FluidTank insertHandler; diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/item/BaseItemHandler.java b/src/main/java/com/refinedmods/refinedstorage/inventory/item/BaseItemHandler.java index 40d40d8637..666b2b6cff 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/item/BaseItemHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/item/BaseItemHandler.java @@ -3,8 +3,7 @@ import com.refinedmods.refinedstorage.inventory.listener.InventoryListener; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemStackHandler; - +import net.neoforged.neoforge.items.ItemStackHandler; import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/item/ConfiguredIconInFilterItemHandler.java b/src/main/java/com/refinedmods/refinedstorage/inventory/item/ConfiguredIconInFilterItemHandler.java index 5184537024..3269647f7e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/item/ConfiguredIconInFilterItemHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/item/ConfiguredIconInFilterItemHandler.java @@ -2,7 +2,7 @@ import com.refinedmods.refinedstorage.item.FilterItem; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemStackHandler; +import net.neoforged.neoforge.items.ItemStackHandler; public class ConfiguredIconInFilterItemHandler extends ItemStackHandler { private final ItemStack filterItem; diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/item/ConfiguredItemsInFilterItemHandler.java b/src/main/java/com/refinedmods/refinedstorage/inventory/item/ConfiguredItemsInFilterItemHandler.java index b7a49aabde..aee850a562 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/item/ConfiguredItemsInFilterItemHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/item/ConfiguredItemsInFilterItemHandler.java @@ -4,7 +4,7 @@ import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemStackHandler; +import net.neoforged.neoforge.items.ItemStackHandler; public class ConfiguredItemsInFilterItemHandler extends ItemStackHandler { private final ItemStack stack; diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/item/FilterItemHandler.java b/src/main/java/com/refinedmods/refinedstorage/inventory/item/FilterItemHandler.java index 8dd3e59f44..17ed240a2f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/item/FilterItemHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/item/FilterItemHandler.java @@ -12,10 +12,9 @@ import com.refinedmods.refinedstorage.screen.BaseScreen; import com.refinedmods.refinedstorage.screen.grid.GridScreen; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fml.LogicalSide; -import net.minecraftforge.fml.util.thread.EffectiveSide; - +import net.neoforged.fml.LogicalSide; +import net.neoforged.fml.util.thread.EffectiveSide; +import net.neoforged.neoforge.fluids.FluidStack; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/item/ProxyItemHandler.java b/src/main/java/com/refinedmods/refinedstorage/inventory/item/ProxyItemHandler.java index 3b83a43d26..358ad872fc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/item/ProxyItemHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/item/ProxyItemHandler.java @@ -1,8 +1,7 @@ package com.refinedmods.refinedstorage.inventory.item; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.IItemHandler; - +import net.neoforged.neoforge.items.IItemHandler; import javax.annotation.Nonnull; public class ProxyItemHandler implements IItemHandler { diff --git a/src/main/java/com/refinedmods/refinedstorage/inventory/player/PlayerSlot.java b/src/main/java/com/refinedmods/refinedstorage/inventory/player/PlayerSlot.java index be7359f6d3..85c26e0863 100644 --- a/src/main/java/com/refinedmods/refinedstorage/inventory/player/PlayerSlot.java +++ b/src/main/java/com/refinedmods/refinedstorage/inventory/player/PlayerSlot.java @@ -2,18 +2,18 @@ import com.refinedmods.refinedstorage.integration.curios.CuriosIntegration; import com.refinedmods.refinedstorage.util.PacketBufferUtils; + +import java.util.Optional; + import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.util.LazyOptional; import top.theillusivec4.curios.api.CuriosApi; import top.theillusivec4.curios.api.type.capability.ICuriosItemHandler; import top.theillusivec4.curios.api.type.inventory.ICurioStacksHandler; -import java.util.Optional; - public class PlayerSlot { int slot; String curioSlot; @@ -47,9 +47,9 @@ public ItemStack getStackFromSlot(Player player) { return player.getInventory().getItem(slot); } - LazyOptional curiosHandler = CuriosApi.getCuriosHelper().getCuriosHandler(player); + Optional curiosInventory = CuriosApi.getCuriosInventory(player); - Optional stacksHandler = curiosHandler.resolve().flatMap((handler -> + Optional stacksHandler = curiosInventory.flatMap((handler -> handler.getStacksHandler(curioSlot) )); diff --git a/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java b/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java index b6ae4f4064..a85c95a782 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/CoverItem.java @@ -40,7 +40,7 @@ public static void setItem(ItemStack cover, ItemStack item) { } ItemStack result = item.copy(); result.setCount(1); - cover.getTag().put(NBT_ITEM, result.serializeNBT()); + cover.getTag().put(NBT_ITEM, result.save(new CompoundTag())); } @Nonnull diff --git a/src/main/java/com/refinedmods/refinedstorage/item/EnergyItem.java b/src/main/java/com/refinedmods/refinedstorage/item/EnergyItem.java index 152e3d7c7c..e737f1e714 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/EnergyItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/EnergyItem.java @@ -1,18 +1,16 @@ package com.refinedmods.refinedstorage.item; -import com.refinedmods.refinedstorage.item.capabilityprovider.EnergyCapabilityProvider; +import com.refinedmods.refinedstorage.energy.ItemEnergyStorage; import com.refinedmods.refinedstorage.render.Styles; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.util.Mth; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.energy.IEnergyStorage; - +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.EnergyStorage; +import net.neoforged.neoforge.energy.IEnergyStorage; import javax.annotation.Nullable; import java.util.List; import java.util.function.Supplier; @@ -28,9 +26,8 @@ protected EnergyItem(Item.Properties properties, boolean creative, Supplier tooltip.add(Component.translatable("misc.refinedstorage.energy_stored", energy.getEnergyStored(), energy.getMaxEnergyStored()).setStyle(Styles.GRAY))); + final IEnergyStorage energy = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (energy == null) { + return; + } + tooltip.add(Component.translatable("misc.refinedstorage.energy_stored", energy.getEnergyStored(), energy.getMaxEnergyStored()).setStyle(Styles.GRAY)); } } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java b/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java index c7a4f7f956..83d7d2ed9d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/FilterItem.java @@ -24,8 +24,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.List; @@ -102,7 +101,7 @@ public static void setIcon(ItemStack stack, ItemStack icon) { stack.setTag(new CompoundTag()); } - stack.getTag().put(NBT_ICON, icon.serializeNBT()); + stack.getTag().put(NBT_ICON, icon.save(new CompoundTag())); } public static void setFluidIcon(ItemStack stack, @Nullable FluidStack icon) { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java b/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java index 56d63e731e..26fc931c74 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/PatternItem.java @@ -25,9 +25,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -import net.minecraftforge.client.extensions.common.IClientItemExtensions; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.client.extensions.common.IClientItemExtensions; +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.HashMap; @@ -75,7 +74,7 @@ public static void setInputSlot(ItemStack pattern, int slot, ItemStack stack) { pattern.setTag(new CompoundTag()); } - pattern.getTag().put(String.format(NBT_INPUT_SLOT, slot), stack.serializeNBT()); + pattern.getTag().put(String.format(NBT_INPUT_SLOT, slot), stack.save(new CompoundTag())); } @Nonnull @@ -94,7 +93,7 @@ public static void setOutputSlot(ItemStack pattern, int slot, ItemStack stack) { pattern.setTag(new CompoundTag()); } - pattern.getTag().put(String.format(NBT_OUTPUT_SLOT, slot), stack.serializeNBT()); + pattern.getTag().put(String.format(NBT_OUTPUT_SLOT, slot), stack.save(new CompoundTag())); } @Nonnull diff --git a/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java b/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java index b52397a916..32ee9c3597 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/WrenchItem.java @@ -14,7 +14,7 @@ import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.items.ItemHandlerHelper; public class WrenchItem extends Item { public WrenchItem() { diff --git a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/EnergyBlockItem.java b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/EnergyBlockItem.java index e6219fd75f..a8e6d4c9c7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/blockitem/EnergyBlockItem.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/blockitem/EnergyBlockItem.java @@ -1,19 +1,17 @@ package com.refinedmods.refinedstorage.item.blockitem; import com.refinedmods.refinedstorage.block.BaseBlock; -import com.refinedmods.refinedstorage.item.capabilityprovider.EnergyCapabilityProvider; +import com.refinedmods.refinedstorage.energy.ItemEnergyStorage; import com.refinedmods.refinedstorage.render.Styles; -import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.util.Mth; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.energy.IEnergyStorage; - +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.EnergyStorage; +import net.neoforged.neoforge.energy.IEnergyStorage; import javax.annotation.Nullable; import java.util.List; import java.util.function.Supplier; @@ -29,9 +27,8 @@ protected EnergyBlockItem(BaseBlock block, Item.Properties properties, boolean c this.energyCapacity = energyCapacity; } - @Override - public ICapabilityProvider initCapabilities(ItemStack stack, CompoundTag tag) { - return new EnergyCapabilityProvider(stack, energyCapacity.get()); + public EnergyStorage createEnergyStorage(ItemStack stack) { + return new ItemEnergyStorage(stack, energyCapacity.get()); } @Override @@ -41,7 +38,7 @@ public boolean isBarVisible(ItemStack stack) { @Override public int getBarWidth(ItemStack stack) { - IEnergyStorage energy = stack.getCapability(ForgeCapabilities.ENERGY).orElse(null); + IEnergyStorage energy = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (energy == null) { return 0; } @@ -51,7 +48,7 @@ public int getBarWidth(ItemStack stack) { @Override public int getBarColor(ItemStack stack) { - IEnergyStorage energy = stack.getCapability(ForgeCapabilities.ENERGY, null).orElse(null); + IEnergyStorage energy = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (energy == null) { return super.getBarColor(stack); } @@ -63,7 +60,11 @@ public void appendHoverText(ItemStack stack, @Nullable Level level, List tooltip.add(Component.translatable("misc.refinedstorage.energy_stored", energy.getEnergyStored(), energy.getMaxEnergyStored()).setStyle(Styles.GRAY))); + final IEnergyStorage energy = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (energy == null) { + return; + } + tooltip.add(Component.translatable("misc.refinedstorage.energy_stored", energy.getEnergyStored(), energy.getMaxEnergyStored()).setStyle(Styles.GRAY)); } } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/capabilityprovider/EnergyCapabilityProvider.java b/src/main/java/com/refinedmods/refinedstorage/item/capabilityprovider/EnergyCapabilityProvider.java deleted file mode 100644 index 04bf87041b..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/item/capabilityprovider/EnergyCapabilityProvider.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.refinedmods.refinedstorage.item.capabilityprovider; - -import com.refinedmods.refinedstorage.energy.ItemEnergyStorage; -import net.minecraft.core.Direction; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.capabilities.ICapabilityProvider; -import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.IEnergyStorage; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -public class EnergyCapabilityProvider implements ICapabilityProvider { - private final LazyOptional capability; - - public EnergyCapabilityProvider(ItemStack stack, int energyCapacity) { - this.capability = LazyOptional.of(() -> new ItemEnergyStorage(stack, energyCapacity)); - } - - @Nonnull - @Override - public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction dire) { - if (cap == ForgeCapabilities.ENERGY) { - return capability.cast(); - } - - return LazyOptional.empty(); - } -} \ No newline at end of file diff --git a/src/main/java/com/refinedmods/refinedstorage/item/property/ControllerItemPropertyGetter.java b/src/main/java/com/refinedmods/refinedstorage/item/property/ControllerItemPropertyGetter.java index 2109369825..cd858c1f5b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/property/ControllerItemPropertyGetter.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/property/ControllerItemPropertyGetter.java @@ -3,22 +3,22 @@ import com.refinedmods.refinedstorage.apiimpl.network.Network; import com.refinedmods.refinedstorage.block.ControllerBlock; import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.ClampedItemPropertyFunction; import net.minecraft.client.renderer.item.ItemPropertyFunction; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.energy.IEnergyStorage; - +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.IEnergyStorage; import javax.annotation.Nullable; -public class ControllerItemPropertyGetter implements ItemPropertyFunction { +public class ControllerItemPropertyGetter implements ClampedItemPropertyFunction { @Override - public float call(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int p) { + public float unclampedCall(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int p) { // if that stack is still clean (like in the creative mode tab, or just crafted) maintain the on state. - if (stack.getTag() == null) { + if (stack.getTag() == null) { // TODO: controllers still have to wrong state in this case return ControllerBlock.EnergyType.ON.ordinal(); } - IEnergyStorage storage = stack.getCapability(ForgeCapabilities.ENERGY).orElse(null); + IEnergyStorage storage = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (storage != null) { return Network.getEnergyType(storage.getEnergyStored(), storage.getMaxEnergyStored()).ordinal(); } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/property/NetworkItemPropertyGetter.java b/src/main/java/com/refinedmods/refinedstorage/item/property/NetworkItemPropertyGetter.java index 8d11052c86..fb5a010c7e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/property/NetworkItemPropertyGetter.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/property/NetworkItemPropertyGetter.java @@ -2,15 +2,16 @@ import com.refinedmods.refinedstorage.item.NetworkItem; import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.ClampedItemPropertyFunction; import net.minecraft.client.renderer.item.ItemPropertyFunction; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; import javax.annotation.Nullable; -public class NetworkItemPropertyGetter implements ItemPropertyFunction { +public class NetworkItemPropertyGetter implements ClampedItemPropertyFunction { @Override - public float call(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int p) { + public float unclampedCall(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int p) { return entity != null && NetworkItem.isValid(stack) ? 1.0f : 0.0f; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/item/property/SecurityCardItemPropertyGetter.java b/src/main/java/com/refinedmods/refinedstorage/item/property/SecurityCardItemPropertyGetter.java index 5ba5ebe850..b4c27a71fd 100644 --- a/src/main/java/com/refinedmods/refinedstorage/item/property/SecurityCardItemPropertyGetter.java +++ b/src/main/java/com/refinedmods/refinedstorage/item/property/SecurityCardItemPropertyGetter.java @@ -2,15 +2,16 @@ import com.refinedmods.refinedstorage.item.SecurityCardItem; import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.client.renderer.item.ClampedItemPropertyFunction; import net.minecraft.client.renderer.item.ItemPropertyFunction; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; import javax.annotation.Nullable; -public class SecurityCardItemPropertyGetter implements ItemPropertyFunction { +public class SecurityCardItemPropertyGetter implements ClampedItemPropertyFunction { @Override - public float call(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int p) { + public float unclampedCall(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity, int p) { return entity != null && SecurityCardItem.isValid(stack) ? 1.0f : 0.0f; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/loottable/ControllerLootFunction.java b/src/main/java/com/refinedmods/refinedstorage/loottable/ControllerLootFunction.java index 1a4e08208a..aa0c85f976 100644 --- a/src/main/java/com/refinedmods/refinedstorage/loottable/ControllerLootFunction.java +++ b/src/main/java/com/refinedmods/refinedstorage/loottable/ControllerLootFunction.java @@ -1,50 +1,36 @@ package com.refinedmods.refinedstorage.loottable; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonObject; import com.refinedmods.refinedstorage.RSLootFunctions; import com.refinedmods.refinedstorage.api.network.INetwork; import com.refinedmods.refinedstorage.blockentity.ControllerBlockEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.storage.loot.LootContext; -import net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction; +import net.minecraft.world.level.storage.loot.functions.LootItemFunction; import net.minecraft.world.level.storage.loot.functions.LootItemFunctionType; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; -import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; -import net.minecraftforge.common.capabilities.ForgeCapabilities; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.energy.IEnergyStorage; -public class ControllerLootFunction extends LootItemConditionalFunction { - protected ControllerLootFunction(LootItemCondition[] conditions) { - super(conditions); - } - - public static LootItemConditionalFunction.Builder builder() { - return simpleBuilder(ControllerLootFunction::new); +public class ControllerLootFunction implements LootItemFunction { + @Override + public LootItemFunctionType getType() { + return RSLootFunctions.CONTROLLER; } @Override - protected ItemStack run(ItemStack itemStack, LootContext lootContext) { + public ItemStack apply(ItemStack stack, LootContext lootContext) { BlockEntity blockEntity = lootContext.getParamOrNull(LootContextParams.BLOCK_ENTITY); if (blockEntity instanceof ControllerBlockEntity) { INetwork network = ((ControllerBlockEntity) blockEntity).getRemovedNetwork() == null ? ((ControllerBlockEntity) blockEntity).getNetwork() : ((ControllerBlockEntity) blockEntity).getRemovedNetwork(); - itemStack.getCapability(ForgeCapabilities.ENERGY).ifPresent(energy -> energy.receiveEnergy(network.getEnergyStorage().getEnergyStored(), false)); + IEnergyStorage energyStorage = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (energyStorage != null) { + energyStorage.receiveEnergy(network.getEnergyStorage().getEnergyStored(), false); + } } - return itemStack; - } - - @Override - public LootItemFunctionType getType() { - return RSLootFunctions.CONTROLLER; - } - - public static class Serializer extends LootItemConditionalFunction.Serializer { - @Override - public ControllerLootFunction deserialize(JsonObject object, JsonDeserializationContext deserializationContext, LootItemCondition[] conditions) { - return new ControllerLootFunction(conditions); - } + return stack; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/loottable/CrafterLootFunction.java b/src/main/java/com/refinedmods/refinedstorage/loottable/CrafterLootFunction.java index f3b52bafa5..2413e5eeb6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/loottable/CrafterLootFunction.java +++ b/src/main/java/com/refinedmods/refinedstorage/loottable/CrafterLootFunction.java @@ -1,29 +1,24 @@ package com.refinedmods.refinedstorage.loottable; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonObject; import com.refinedmods.refinedstorage.RSLootFunctions; import com.refinedmods.refinedstorage.apiimpl.network.node.CrafterNetworkNode; import com.refinedmods.refinedstorage.blockentity.CrafterBlockEntity; + import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.storage.loot.LootContext; -import net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction; +import net.minecraft.world.level.storage.loot.functions.LootItemFunction; import net.minecraft.world.level.storage.loot.functions.LootItemFunctionType; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; -import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; - -public class CrafterLootFunction extends LootItemConditionalFunction { - protected CrafterLootFunction(LootItemCondition[] conditions) { - super(conditions); - } - public static LootItemConditionalFunction.Builder builder() { - return simpleBuilder(CrafterLootFunction::new); +public class CrafterLootFunction implements LootItemFunction { + @Override + public LootItemFunctionType getType() { + return RSLootFunctions.CRAFTER; } @Override - public ItemStack run(ItemStack stack, LootContext lootContext) { + public ItemStack apply(ItemStack stack, LootContext lootContext) { BlockEntity blockEntity = lootContext.getParamOrNull(LootContextParams.BLOCK_ENTITY); CrafterNetworkNode removedNode = ((CrafterBlockEntity) blockEntity).getRemovedNode(); @@ -37,16 +32,4 @@ public ItemStack run(ItemStack stack, LootContext lootContext) { return stack; } - - @Override - public LootItemFunctionType getType() { - return RSLootFunctions.CRAFTER; - } - - public static class Serializer extends LootItemConditionalFunction.Serializer { - @Override - public CrafterLootFunction deserialize(JsonObject object, JsonDeserializationContext deserializationContext, LootItemCondition[] conditions) { - return new CrafterLootFunction(conditions); - } - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/loottable/PortableGridBlockLootFunction.java b/src/main/java/com/refinedmods/refinedstorage/loottable/PortableGridBlockLootFunction.java index 7d9d1a56f9..49b215e8a1 100644 --- a/src/main/java/com/refinedmods/refinedstorage/loottable/PortableGridBlockLootFunction.java +++ b/src/main/java/com/refinedmods/refinedstorage/loottable/PortableGridBlockLootFunction.java @@ -1,24 +1,23 @@ package com.refinedmods.refinedstorage.loottable; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonObject; import com.refinedmods.refinedstorage.RSLootFunctions; import com.refinedmods.refinedstorage.blockentity.grid.portable.PortableGridBlockEntity; + import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.storage.loot.LootContext; -import net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction; +import net.minecraft.world.level.storage.loot.functions.LootItemFunction; import net.minecraft.world.level.storage.loot.functions.LootItemFunctionType; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; -import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; -public class PortableGridBlockLootFunction extends LootItemConditionalFunction { - protected PortableGridBlockLootFunction(LootItemCondition[] conditions) { - super(conditions); +public class PortableGridBlockLootFunction implements LootItemFunction { + @Override + public LootItemFunctionType getType() { + return RSLootFunctions.PORTABLE_GRID; } @Override - public ItemStack run(ItemStack stack, LootContext lootContext) { + public ItemStack apply(ItemStack stack, LootContext lootContext) { BlockEntity blockEntity = lootContext.getParamOrNull(LootContextParams.BLOCK_ENTITY); if (blockEntity instanceof PortableGridBlockEntity) { @@ -27,16 +26,4 @@ public ItemStack run(ItemStack stack, LootContext lootContext) { return stack; } - - @Override - public LootItemFunctionType getType() { - return RSLootFunctions.PORTABLE_GRID; - } - - public static class Serializer extends LootItemConditionalFunction.Serializer { - @Override - public PortableGridBlockLootFunction deserialize(JsonObject object, JsonDeserializationContext deserializationContext, LootItemCondition[] conditions) { - return new PortableGridBlockLootFunction(conditions); - } - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/loottable/StorageBlockLootFunction.java b/src/main/java/com/refinedmods/refinedstorage/loottable/StorageBlockLootFunction.java index adb5425b64..cdfe4c3281 100644 --- a/src/main/java/com/refinedmods/refinedstorage/loottable/StorageBlockLootFunction.java +++ b/src/main/java/com/refinedmods/refinedstorage/loottable/StorageBlockLootFunction.java @@ -12,17 +12,19 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction; +import net.minecraft.world.level.storage.loot.functions.LootItemFunction; import net.minecraft.world.level.storage.loot.functions.LootItemFunctionType; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; -public class StorageBlockLootFunction extends LootItemConditionalFunction { - protected StorageBlockLootFunction(LootItemCondition[] conditions) { - super(conditions); +public class StorageBlockLootFunction implements LootItemFunction { + @Override + public LootItemFunctionType getType() { + return RSLootFunctions.STORAGE_BLOCK; } @Override - public ItemStack run(ItemStack stack, LootContext lootContext) { + public ItemStack apply(ItemStack stack, LootContext lootContext) { BlockEntity blockEntity = lootContext.getParamOrNull(LootContextParams.BLOCK_ENTITY); // This code needs to work without the node being removed as well. @@ -48,16 +50,4 @@ public ItemStack run(ItemStack stack, LootContext lootContext) { return stack; } - - @Override - public LootItemFunctionType getType() { - return RSLootFunctions.STORAGE_BLOCK; - } - - public static class Serializer extends LootItemConditionalFunction.Serializer { - @Override - public StorageBlockLootFunction deserialize(JsonObject object, JsonDeserializationContext deserializationContext, LootItemCondition[] conditions) { - return new StorageBlockLootFunction(conditions); - } - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/FilterUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/FilterUpdateMessage.java index d53ef234d2..59dc170a80 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/FilterUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/FilterUpdateMessage.java @@ -1,15 +1,18 @@ package com.refinedmods.refinedstorage.network; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.container.FilterContainerMenu; import com.refinedmods.refinedstorage.item.FilterItem; import com.refinedmods.refinedstorage.util.PacketBufferUtils; + import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; -import net.minecraftforge.network.NetworkEvent; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class FilterUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "filter_update"); -public class FilterUpdateMessage { private final int compare; private final int mode; private final boolean modFilter; @@ -34,27 +37,27 @@ public static FilterUpdateMessage decode(FriendlyByteBuf buf) { ); } - public static void encode(FilterUpdateMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.compare); - buf.writeInt(message.mode); - buf.writeBoolean(message.modFilter); - buf.writeUtf(message.name); - buf.writeInt(message.type); + public static void handle(FilterUpdateMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + FilterItem.setCompare(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.compare); + FilterItem.setMode(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.mode); + FilterItem.setModFilter(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.modFilter); + FilterItem.setName(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.name); + FilterItem.setType(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.type); + })); } - public static void handle(FilterUpdateMessage message, Supplier ctx) { - Player player = ctx.get().getSender(); - - if (player != null && player.containerMenu instanceof FilterContainerMenu) { - ctx.get().enqueueWork(() -> { - FilterItem.setCompare(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.compare); - FilterItem.setMode(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.mode); - FilterItem.setModFilter(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.modFilter); - FilterItem.setName(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.name); - FilterItem.setType(((FilterContainerMenu) player.containerMenu).getFilterItem(), message.type); - }); - } + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(compare); + buf.writeInt(mode); + buf.writeBoolean(modFilter); + buf.writeUtf(name); + buf.writeInt(type); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/FluidFilterSlotUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/FluidFilterSlotUpdateMessage.java index 2ed10b3360..b74af2d41f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/FluidFilterSlotUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/FluidFilterSlotUpdateMessage.java @@ -1,15 +1,18 @@ package com.refinedmods.refinedstorage.network; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.container.slot.filter.FluidFilterSlot; import com.refinedmods.refinedstorage.screen.BaseScreen; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.Slot; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class FluidFilterSlotUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "fluid_filter_update"); -public class FluidFilterSlotUpdateMessage { private final int containerSlot; private final FluidStack stack; @@ -18,16 +21,11 @@ public FluidFilterSlotUpdateMessage(int containerSlot, FluidStack stack) { this.stack = stack; } - public static void encode(FluidFilterSlotUpdateMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.containerSlot); - message.stack.writeToPacket(buf); - } - public static FluidFilterSlotUpdateMessage decode(FriendlyByteBuf buf) { return new FluidFilterSlotUpdateMessage(buf.readInt(), FluidStack.readFromPacket(buf)); } - public static void handle(FluidFilterSlotUpdateMessage message, Supplier ctx) { + public static void handle(FluidFilterSlotUpdateMessage message, PlayPayloadContext ctx) { BaseScreen.executeLater(gui -> { if (message.containerSlot >= 0 && message.containerSlot < gui.getMenu().slots.size()) { Slot slot = gui.getMenu().getSlot(message.containerSlot); @@ -37,7 +35,16 @@ public static void handle(FluidFilterSlotUpdateMessage message, Supplier protocolVersion) - .simpleChannel(); - private final PacketSplitter splitter = new PacketSplitter(10, handler, channel); - - public void register() { - int id = 0; - - handler.registerMessage(id++, StorageDiskSizeRequestMessage.class, StorageDiskSizeRequestMessage::encode, StorageDiskSizeRequestMessage::decode, StorageDiskSizeRequestMessage::handle); - handler.registerMessage(id++, StorageDiskSizeResponseMessage.class, StorageDiskSizeResponseMessage::encode, StorageDiskSizeResponseMessage::decode, StorageDiskSizeResponseMessage::handle); - handler.registerMessage(id++, FilterUpdateMessage.class, FilterUpdateMessage::encode, FilterUpdateMessage::decode, FilterUpdateMessage::handle); - handler.registerMessage(id++, FluidFilterSlotUpdateMessage.class, FluidFilterSlotUpdateMessage::encode, FluidFilterSlotUpdateMessage::decode, FluidFilterSlotUpdateMessage::handle); - handler.registerMessage(id++, BlockEntitySynchronizationParameterMessage.class, BlockEntitySynchronizationParameterMessage::encode, BlockEntitySynchronizationParameterMessage::decode, (msg, ctx) -> BlockEntitySynchronizationParameterMessage.handle(ctx)); - handler.registerMessage(id++, BlockEntitySynchronizationParamaterUpdateMessage.class, BlockEntitySynchronizationParamaterUpdateMessage::encode, BlockEntitySynchronizationParamaterUpdateMessage::decode, BlockEntitySynchronizationParamaterUpdateMessage::handle); - splitter.registerMessage(id++, GridItemUpdateMessage.class, GridItemUpdateMessage::encode, GridItemUpdateMessage::decode, GridItemUpdateMessage::handle); - splitter.registerMessage(id++, GridItemDeltaMessage.class, GridItemDeltaMessage::encode, GridItemDeltaMessage::decode, GridItemDeltaMessage::handle); - handler.registerMessage(id++, GridItemPullMessage.class, GridItemPullMessage::encode, GridItemPullMessage::decode, GridItemPullMessage::handle); - handler.registerMessage(id++, GridItemGridScrollMessage.class, GridItemGridScrollMessage::encode, GridItemGridScrollMessage::decode, GridItemGridScrollMessage::handle); - handler.registerMessage(id++, GridItemInventoryScrollMessage.class, GridItemInventoryScrollMessage::encode, GridItemInventoryScrollMessage::decode, GridItemInventoryScrollMessage::handle); - handler.registerMessage(id++, GridItemInsertHeldMessage.class, GridItemInsertHeldMessage::encode, GridItemInsertHeldMessage::decode, GridItemInsertHeldMessage::handle); - handler.registerMessage(id++, GridClearMessage.class, (msg, buf) -> { - }, buf -> new GridClearMessage(), (msg, ctx) -> GridClearMessage.handle(ctx)); - handler.registerMessage(id++, GridPatternCreateMessage.class, GridPatternCreateMessage::encode, GridPatternCreateMessage::decode, GridPatternCreateMessage::handle); - handler.registerMessage(id++, SetFilterSlotMessage.class, SetFilterSlotMessage::encode, SetFilterSlotMessage::decode, SetFilterSlotMessage::handle); - handler.registerMessage(id++, SetFluidFilterSlotMessage.class, SetFluidFilterSlotMessage::encode, SetFluidFilterSlotMessage::decode, SetFluidFilterSlotMessage::handle); - handler.registerMessage(id++, GridFluidUpdateMessage.class, GridFluidUpdateMessage::encode, GridFluidUpdateMessage::decode, GridFluidUpdateMessage::handle); - handler.registerMessage(id++, GridFluidDeltaMessage.class, GridFluidDeltaMessage::encode, GridFluidDeltaMessage::decode, GridFluidDeltaMessage::handle); - handler.registerMessage(id++, GridFluidInsertHeldMessage.class, (msg, buf) -> { - }, buf -> new GridFluidInsertHeldMessage(), (msg, ctx) -> GridFluidInsertHeldMessage.handle(ctx)); - handler.registerMessage(id++, GridFluidPullMessage.class, GridFluidPullMessage::encode, GridFluidPullMessage::decode, GridFluidPullMessage::handle); - splitter.registerMessage(id++, GridTransferMessage.class, GridTransferMessage::encode, GridTransferMessage::decode, GridTransferMessage::handle); - handler.registerMessage(id++, GridProcessingTransferMessage.class, GridProcessingTransferMessage::encode, GridProcessingTransferMessage::decode, GridProcessingTransferMessage::handle); - handler.registerMessage(id++, SecurityManagerUpdateMessage.class, SecurityManagerUpdateMessage::encode, SecurityManagerUpdateMessage::decode, SecurityManagerUpdateMessage::handle); - handler.registerMessage(id++, WirelessGridSettingsUpdateMessage.class, WirelessGridSettingsUpdateMessage::encode, WirelessGridSettingsUpdateMessage::decode, WirelessGridSettingsUpdateMessage::handle); - handler.registerMessage(id++, OpenNetworkItemMessage.class, OpenNetworkItemMessage::encode, OpenNetworkItemMessage::decode, OpenNetworkItemMessage::handle); - handler.registerMessage(id++, WirelessFluidGridSettingsUpdateMessage.class, WirelessFluidGridSettingsUpdateMessage::encode, WirelessFluidGridSettingsUpdateMessage::decode, WirelessFluidGridSettingsUpdateMessage::handle); - handler.registerMessage(id++, PortableGridSettingsUpdateMessage.class, PortableGridSettingsUpdateMessage::encode, PortableGridSettingsUpdateMessage::decode, PortableGridSettingsUpdateMessage::handle); - splitter.registerMessage(id++, PortableGridItemUpdateMessage.class, PortableGridItemUpdateMessage::encode, PortableGridItemUpdateMessage::decode, PortableGridItemUpdateMessage::handle); - splitter.registerMessage(id++, PortableGridItemDeltaMessage.class, PortableGridItemDeltaMessage::encode, PortableGridItemDeltaMessage::decode, PortableGridItemDeltaMessage::handle); - handler.registerMessage(id++, PortableGridFluidUpdateMessage.class, PortableGridFluidUpdateMessage::encode, PortableGridFluidUpdateMessage::decode, PortableGridFluidUpdateMessage::handle); - handler.registerMessage(id++, PortableGridFluidDeltaMessage.class, PortableGridFluidDeltaMessage::encode, PortableGridFluidDeltaMessage::decode, PortableGridFluidDeltaMessage::handle); - handler.registerMessage(id++, GridCraftingPreviewRequestMessage.class, GridCraftingPreviewRequestMessage::encode, GridCraftingPreviewRequestMessage::decode, GridCraftingPreviewRequestMessage::handle); - handler.registerMessage(id++, GridCraftingPreviewResponseMessage.class, GridCraftingPreviewResponseMessage::encode, GridCraftingPreviewResponseMessage::decode, GridCraftingPreviewResponseMessage::handle); - handler.registerMessage(id++, GridCraftingStartRequestMessage.class, GridCraftingStartRequestMessage::encode, GridCraftingStartRequestMessage::decode, GridCraftingStartRequestMessage::handle); - handler.registerMessage(id++, GridCraftingStartResponseMessage.class, (msg, buf) -> { - }, buf -> new GridCraftingStartResponseMessage(), (msg, ctx) -> GridCraftingStartResponseMessage.handle(ctx)); - splitter.registerMessage(id++, CraftingMonitorUpdateMessage.class, CraftingMonitorUpdateMessage::encode, CraftingMonitorUpdateMessage::decode, CraftingMonitorUpdateMessage::handle); - handler.registerMessage(id++, CraftingMonitorCancelMessage.class, CraftingMonitorCancelMessage::encode, CraftingMonitorCancelMessage::decode, CraftingMonitorCancelMessage::handle); - handler.registerMessage(id++, WirelessCraftingMonitorSettingsUpdateMessage.class, WirelessCraftingMonitorSettingsUpdateMessage::encode, WirelessCraftingMonitorSettingsUpdateMessage::decode, WirelessCraftingMonitorSettingsUpdateMessage::handle); - handler.registerMessage(id++, SplitPacketMessage.class, SplitPacketMessage::encode, SplitPacketMessage::decode, SplitPacketMessage::handle); + public void register(IPayloadRegistrar registrar) { + registrar.play( + StorageDiskSizeRequestMessage.ID, + StorageDiskSizeRequestMessage::decode, + handler -> handler.server(StorageDiskSizeRequestMessage::handle) + ); + registrar.play( + StorageDiskSizeResponseMessage.ID, + StorageDiskSizeResponseMessage::decode, + handler -> handler.client(StorageDiskSizeResponseMessage::handle) + ); + registrar.play( + FilterUpdateMessage.ID, + FilterUpdateMessage::decode, + handler -> handler.server(FilterUpdateMessage::handle) + ); + registrar.play( + FluidFilterSlotUpdateMessage.ID, + FluidFilterSlotUpdateMessage::decode, + handler -> handler.server(FluidFilterSlotUpdateMessage::handle) + ); + registrar.play( + BlockEntitySynchronizationParameterMessage.ID, + BlockEntitySynchronizationParameterMessage::decode, + handler -> handler.client(BlockEntitySynchronizationParameterMessage::handle) + ); + registrar.play( + BlockEntitySynchronizationParameterUpdateMessage.ID, + BlockEntitySynchronizationParameterUpdateMessage::decode, + handler -> handler.server(BlockEntitySynchronizationParameterUpdateMessage::handle) + ); + registrar.play( + GridItemUpdateMessage.ID, + GridItemUpdateMessage::decode, + handler -> handler.client(GridItemUpdateMessage::handle) + ); + registrar.play( + GridItemDeltaMessage.ID, + GridItemDeltaMessage::decode, + handler -> handler.client(GridItemDeltaMessage::handle) + ); + registrar.play( + GridItemPullMessage.ID, + GridItemPullMessage::decode, + handler -> handler.server(GridItemPullMessage::handle) + ); + registrar.play( + GridItemGridScrollMessage.ID, + GridItemGridScrollMessage::decode, + handler -> handler.server(GridItemGridScrollMessage::handle) + ); + registrar.play( + GridItemInventoryScrollMessage.ID, + GridItemInventoryScrollMessage::decode, + handler -> handler.server(GridItemInventoryScrollMessage::handle) + ); + registrar.play( + GridItemInsertHeldMessage.ID, + GridItemInsertHeldMessage::decode, + handler -> handler.server(GridItemInsertHeldMessage::handle) + ); + registrar.play( + GridClearMessage.ID, + ctx -> new GridClearMessage(), + handler -> handler.server(GridClearMessage::handle) + ); + registrar.play( + GridPatternCreateMessage.ID, + GridPatternCreateMessage::decode, + handler -> handler.server(GridPatternCreateMessage::handle) + ); + registrar.play( + SetFilterSlotMessage.ID, + SetFilterSlotMessage::decode, + handler -> handler.server(SetFilterSlotMessage::handle) + ); + registrar.play( + SetFluidFilterSlotMessage.ID, + SetFluidFilterSlotMessage::decode, + handler -> handler.server(SetFluidFilterSlotMessage::handle) + ); + registrar.play( + GridFluidUpdateMessage.ID, + GridFluidUpdateMessage::decode, + handler -> handler.client(GridFluidUpdateMessage::handle) + ); + registrar.play( + GridFluidDeltaMessage.ID, + GridFluidDeltaMessage::decode, + handler -> handler.client(GridFluidDeltaMessage::handle) + ); + registrar.play( + GridFluidInsertHeldMessage.ID, + ctx -> new GridFluidInsertHeldMessage(), + handler -> handler.server(GridFluidInsertHeldMessage::handle) + ); + registrar.play( + GridFluidPullMessage.ID, + GridFluidPullMessage::decode, + handler -> handler.server(GridFluidPullMessage::handle) + ); + registrar.play( + GridTransferMessage.ID, + GridTransferMessage::decode, + handler -> handler.server(GridTransferMessage::handle) + ); + registrar.play( + GridProcessingTransferMessage.ID, + GridProcessingTransferMessage::decode, + handler -> handler.server(GridProcessingTransferMessage::handle) + ); + registrar.play( + SecurityManagerUpdateMessage.ID, + SecurityManagerUpdateMessage::decode, + handler -> handler.server(SecurityManagerUpdateMessage::handle) + ); + registrar.play( + WirelessGridSettingsUpdateMessage.ID, + WirelessGridSettingsUpdateMessage::decode, + handler -> handler.server(WirelessGridSettingsUpdateMessage::handle) + ); + registrar.play( + OpenNetworkItemMessage.ID, + OpenNetworkItemMessage::decode, + handler -> handler.server(OpenNetworkItemMessage::handle) + ); + registrar.play( + WirelessFluidGridSettingsUpdateMessage.ID, + WirelessFluidGridSettingsUpdateMessage::decode, + handler -> handler.server(WirelessFluidGridSettingsUpdateMessage::handle) + ); + registrar.play( + PortableGridSettingsUpdateMessage.ID, + PortableGridSettingsUpdateMessage::decode, + handler -> handler.server(PortableGridSettingsUpdateMessage::handle) + ); + registrar.play( + GridCraftingPreviewRequestMessage.ID, + GridCraftingPreviewRequestMessage::decode, + handler -> handler.server(GridCraftingPreviewRequestMessage::handle) + ); + registrar.play( + GridCraftingPreviewResponseMessage.ID, + GridCraftingPreviewResponseMessage::decode, + handler -> handler.client(GridCraftingPreviewResponseMessage::handle) + ); + registrar.play( + GridCraftingStartRequestMessage.ID, + GridCraftingStartRequestMessage::decode, + handler -> handler.server(GridCraftingStartRequestMessage::handle) + ); + registrar.play( + GridCraftingStartResponseMessage.ID, + buf -> new GridCraftingStartResponseMessage(), + handler -> handler.client(GridCraftingStartResponseMessage::handle) + ); + registrar.play( + CraftingMonitorUpdateMessage.ID, + CraftingMonitorUpdateMessage::decode, + handler -> handler.client(CraftingMonitorUpdateMessage::handle) + ); + registrar.play( + CraftingMonitorCancelMessage.ID, + CraftingMonitorCancelMessage::decode, + handler -> handler.server(CraftingMonitorCancelMessage::handle) + ); + registrar.play( + WirelessCraftingMonitorSettingsUpdateMessage.ID, + WirelessCraftingMonitorSettingsUpdateMessage::decode, + handler -> handler.server(WirelessCraftingMonitorSettingsUpdateMessage::handle) + ); } - public void sendTo(ServerPlayer player, Object message) { + public void sendTo(ServerPlayer player, CustomPacketPayload message) { if (!(player instanceof FakePlayer)) { - if (splitter.shouldMessageBeSplit(message.getClass())) { - splitter.sendToPlayer(player, message); - } else { - handler.send(PacketDistributor.PLAYER.with(() -> player), message); - } - } - } - - public void sendToServer(Object message) { - if (splitter.shouldMessageBeSplit(message.getClass())) { - splitter.sendToServer(message); - } else { - handler.send(PacketDistributor.SERVER.noArg(), message); + PacketDistributor.PLAYER.with(player).send(message); } } - public void addPackagePart(int communicationId, int packetIndex, byte[] payload) { - splitter.addPackagePart(communicationId, packetIndex, payload); + public void sendToServer(CustomPacketPayload message) { + PacketDistributor.SERVER.noArg().send(message); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/OpenNetworkItemMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/OpenNetworkItemMessage.java index 4beff51db6..828ba4dc55 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/OpenNetworkItemMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/OpenNetworkItemMessage.java @@ -1,18 +1,22 @@ package com.refinedmods.refinedstorage.network; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.PortableGridGridFactory; import com.refinedmods.refinedstorage.inventory.player.PlayerSlot; import com.refinedmods.refinedstorage.item.NetworkItem; import com.refinedmods.refinedstorage.item.blockitem.PortableGridBlockItem; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class OpenNetworkItemMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "open_network_item"); -public class OpenNetworkItemMessage { private final PlayerSlot slot; public OpenNetworkItemMessage(PlayerSlot slot) { @@ -23,29 +27,31 @@ public static OpenNetworkItemMessage decode(FriendlyByteBuf buf) { return new OpenNetworkItemMessage(new PlayerSlot(buf)); } - public static void encode(OpenNetworkItemMessage message, FriendlyByteBuf buf) { - message.slot.writePlayerSlot(buf); + public static void handle(OpenNetworkItemMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + ItemStack stack = message.slot.getStackFromSlot(player); + + if (stack == null) { + return; + } + + if (stack.getItem() instanceof NetworkItem) { + ((NetworkItem) stack.getItem()).applyNetwork(player.getServer(), stack, + n -> n.getNetworkItemManager().open(player, stack, message.slot), player::sendSystemMessage); + } else if (stack.getItem() instanceof PortableGridBlockItem) { + API.instance().getGridManager() + .openGrid(PortableGridGridFactory.ID, (ServerPlayer) player, stack, message.slot); + } + })); } - public static void handle(OpenNetworkItemMessage message, Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - ItemStack stack = message.slot.getStackFromSlot(player); - - if (stack == null) { - return; - } - - if (stack.getItem() instanceof NetworkItem) { - ((NetworkItem) stack.getItem()).applyNetwork(player.getServer(), stack, n -> n.getNetworkItemManager().open(player, stack, message.slot), player::sendSystemMessage); - } else if (stack.getItem() instanceof PortableGridBlockItem) { - API.instance().getGridManager().openGrid(PortableGridGridFactory.ID, player, stack, message.slot); - } - }); - } + @Override + public void write(FriendlyByteBuf buf) { + slot.writePlayerSlot(buf); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/PacketSplitter.java b/src/main/java/com/refinedmods/refinedstorage/network/PacketSplitter.java deleted file mode 100644 index 768609fbdd..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/network/PacketSplitter.java +++ /dev/null @@ -1,228 +0,0 @@ -package com.refinedmods.refinedstorage.network; - -import com.google.common.primitives.Bytes; -import io.netty.buffer.Unpooled; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.network.NetworkEvent; -import net.minecraftforge.network.PacketDistributor; -import net.minecraftforge.network.simple.SimpleChannel; -import org.apache.commons.lang3.tuple.Pair; -import org.apache.logging.log4j.LogManager; - -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.BiConsumer; -import java.util.function.Function; -import java.util.function.Supplier; - -public class PacketSplitter { - private final static int MAX_PACKET_SIZE = 943718; - private static final Map> PACKAGE_CACHE = new HashMap<>(); - - private final ResourceLocation channelId; - private final SimpleChannel channel; - private final Map messageTargets = new HashMap<>(); - private final Map packetMaximums = new HashMap<>(); - private final Set> messagesToSplit = new HashSet<>(); - private final int maxNumberOfMessages; - private int comId = 0; - private int id; - - public PacketSplitter(int maxNumberOfMessages, SimpleChannel channel, ResourceLocation CHANNEL_ID) { - this.maxNumberOfMessages = maxNumberOfMessages; - this.channel = channel; - this.channelId = CHANNEL_ID; - } - - public boolean shouldMessageBeSplit(Class clazz) { - return messagesToSplit.contains(clazz); - } - - public void sendToPlayer(ServerPlayer player, Object message) { - if (id == 0) id++; // in case we wrapped around, 0 is reserved for server - int id = this.id++; - messageTargets.put(id, player); - sendPacket(message, id, PacketDistributor.PLAYER.with(() -> player)); - } - - public void sendToServer(Object message) { - messageTargets.put(0, null); - sendPacket(message, 0, PacketDistributor.SERVER.noArg()); - } - - //@Volatile mostly copied from SimpleChannel - private void sendPacket(Object Message, int id, PacketDistributor.PacketTarget target) { - final FriendlyByteBuf bufIn = new FriendlyByteBuf(Unpooled.buffer()); - - //write the message id to be able to figure out where the packet is supposed to go in the wrapper - bufIn.writeInt(id); - - int index = channel.encodeMessage(Message, bufIn); - target.send(target.getDirection().buildPacket(Pair.of(bufIn, index), channelId).getThis()); - } - - public void registerMessage(int index, Class messageType, BiConsumer encoder, Function decoder, BiConsumer> messageConsumer) { - registerMessage(index, maxNumberOfMessages, messageType, encoder, decoder, messageConsumer); - } - - public void registerMessage(int index, int maxNumberOfMessages, Class messageType, BiConsumer encoder, Function decoder, BiConsumer> messageConsumer) { - packetMaximums.put(index, maxNumberOfMessages); - messagesToSplit.add(messageType); - - BiConsumer wrappedEncoder = (msg, buffer) -> { - int id = buffer.readInt(); - buffer.discardReadBytes(); - ServerPlayer player = messageTargets.get(id); - messageTargets.remove(id); - - //write a zero for the number of packets in case the packet does not need to be split - buffer.writeShort(0); - encoder.accept(msg, buffer); - createSplittingConsumer(player).accept(msg, buffer); - }; - - channel.registerMessage(index, messageType, wrappedEncoder, createPacketCombiner().andThen(decoder), messageConsumer); - } - - private BiConsumer createSplittingConsumer(ServerPlayer playerEntity) { - return (MSG, buf) -> { - - if (buf.writerIndex() < MAX_PACKET_SIZE) { - return; - } - - //read packetId for this packet - int packetId = buf.readUnsignedByte(); - - //this short is written here in case we are not splitting, ignore for split packages - buf.readShort(); - - //ignore the above as it is not required for the final packet - int currentIndex = buf.readerIndex(); - int packetIndex = 0; - final int comId = this.comId++; - - //Data for this packet - byte[] packetData = new byte[0]; - - int maximumPackets = packetMaximums.get(packetId); - int expectedPackets = buf.writerIndex() / MAX_PACKET_SIZE + 1; - boolean failure = false; - - //Loop while data is available. - while (currentIndex < buf.writerIndex()) { - - int sliceSize = Math.min(MAX_PACKET_SIZE, buf.writerIndex() - currentIndex); - - //Extract the sub data array. - byte[] subPacketData = Arrays.copyOfRange(buf.array(), currentIndex, currentIndex + sliceSize); - - if (packetIndex == 0) { // Assign Data for first Packet to this packet. - packetData = subPacketData; - packetIndex++; - } else { - //Construct the split packet. - SplitPacketMessage splitPacketMessage = new SplitPacketMessage(comId, packetIndex++, subPacketData); - - if (playerEntity == null) { - channel.send(PacketDistributor.SERVER.noArg(), splitPacketMessage); - } else { - channel.send(PacketDistributor.PLAYER.with(() -> playerEntity), splitPacketMessage); - } - } - - //Move our working index. - currentIndex += sliceSize; - - if (packetIndex > maximumPackets) { - LogManager.getLogger().error("Failure Splitting Packets on Channel \"" + channelId + "\"." + " with " + MSG.getClass() + ". " + - " Number of Packets sent " + (packetIndex - 1) + ", expected number of Packets " + expectedPackets + ", maximum number of packets for a message of this type " + packetMaximums.get(packetId)); - failure = true; - break; - } - } - - //start writing at the beginning - buf.setIndex(0, 0); - - //packetId is required for forge to match the packet - buf.writeByte(packetId); - - //number of packets the packet was split into - buf.writeShort(failure ? expectedPackets : packetIndex); - buf.writeInt(comId); - buf.writeByteArray(packetData); - - //copies the written data into a new buffer discarding the old one - buf.capacity(buf.writerIndex()); - }; - } - - private Function createPacketCombiner() { - return (buf) -> { - int size = buf.readShort(); - - //This packet was not split - if (size < 2) return buf; - - int comId = buf.readInt(); - - Map partsMap = PACKAGE_CACHE.get(comId); - if (partsMap == null || partsMap.size() != size - 1) { - int partSize = partsMap == null ? 0 : partsMap.size(); - int id = buf.readUnsignedByte(); - int max = packetMaximums.get(id) == null ? 0 : packetMaximums.get(id); - throw new PacketSplittingException(channelId, partSize, size, max, id); - } - - //Add data that came from this packet - addPackagePart(comId, 0, buf.readByteArray()); - - //Combine Cached Data - final byte[] packetData = partsMap.entrySet() - .stream() - .sorted(Map.Entry.comparingByKey()) - .map(Map.Entry::getValue) - .reduce(new byte[0], Bytes::concat); - - FriendlyByteBuf buffer = new FriendlyByteBuf(Unpooled.wrappedBuffer(packetData)); - - //remove data from cache - PACKAGE_CACHE.remove(comId); - return buffer; - }; - } - - public void addPackagePart(int communicationId, int packetIndex, byte[] payload) { - //Sync on the message cache since this is still on the Netty thread. - synchronized (PacketSplitter.PACKAGE_CACHE) { - PacketSplitter.PACKAGE_CACHE.computeIfAbsent(communicationId, (id) -> new ConcurrentHashMap<>()); - PacketSplitter.PACKAGE_CACHE.get(communicationId).put(packetIndex, payload); - } - } -} - -class PacketSplittingException extends RuntimeException { - ResourceLocation channnelId; - int actualSize; - int expectedSize; - int maximumSize; - int packetId; - - public PacketSplittingException(ResourceLocation channnelId, int actualSize, int expectedSize, int maximumSize, int packetId) { - this.channnelId = channnelId; - this.actualSize = actualSize; - this.expectedSize = expectedSize; - this.maximumSize = maximumSize; - this.packetId = packetId; - } - - @Override - public String getMessage() { - return "Failure Splitting Packets on Channel \"" + channnelId.toString() + "\"." + - " Number of Packets sent " + actualSize + ", Number of Packets expected " + expectedSize + ", maximum number of packets for a message of this type " + maximumSize; - } - -} diff --git a/src/main/java/com/refinedmods/refinedstorage/network/SecurityManagerUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/SecurityManagerUpdateMessage.java index 348221ec5c..d39495c307 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/SecurityManagerUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/SecurityManagerUpdateMessage.java @@ -1,29 +1,29 @@ package com.refinedmods.refinedstorage.network; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.security.Permission; import com.refinedmods.refinedstorage.blockentity.SecurityManagerBlockEntity; +import com.refinedmods.refinedstorage.container.SecurityManagerContainerMenu; + import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class SecurityManagerUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "security_manager_update"); -public class SecurityManagerUpdateMessage { - private final BlockPos pos; private final Permission permission; private final boolean state; - public SecurityManagerUpdateMessage(BlockPos pos, Permission permission, boolean state) { - this.pos = pos; + public SecurityManagerUpdateMessage(Permission permission, boolean state) { this.permission = permission; this.state = state; } public static SecurityManagerUpdateMessage decode(FriendlyByteBuf buf) { - BlockPos pos = buf.readBlockPos(); - int id = buf.readInt(); Permission permission = Permission.INSERT; @@ -36,28 +36,25 @@ public static SecurityManagerUpdateMessage decode(FriendlyByteBuf buf) { boolean state = buf.readBoolean(); - return new SecurityManagerUpdateMessage(pos, permission, state); + return new SecurityManagerUpdateMessage(permission, state); } - public static void encode(SecurityManagerUpdateMessage message, FriendlyByteBuf buf) { - buf.writeBlockPos(message.pos); - buf.writeInt(message.permission.getId()); - buf.writeBoolean(message.state); + public static void handle(SecurityManagerUpdateMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof SecurityManagerContainerMenu securityManagerContainerMenu) { + securityManagerContainerMenu.updatePermission(message.permission, message.state); + } + })); } - public static void handle(SecurityManagerUpdateMessage message, Supplier ctx) { - Player player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - BlockEntity blockEntity = player.getCommandSenderWorld().getBlockEntity(message.pos); - - if (blockEntity instanceof SecurityManagerBlockEntity) { - ((SecurityManagerBlockEntity) blockEntity).getNode().updatePermission(message.permission, message.state); - } - }); - } + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(permission.getId()); + buf.writeBoolean(state); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/SetFilterSlotMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/SetFilterSlotMessage.java index f38ef47e7c..0d826e7e19 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/SetFilterSlotMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/SetFilterSlotMessage.java @@ -1,23 +1,26 @@ package com.refinedmods.refinedstorage.network; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.apiimpl.network.node.GridNetworkNode; import com.refinedmods.refinedstorage.container.GridContainerMenu; import com.refinedmods.refinedstorage.container.slot.filter.FilterSlot; import com.refinedmods.refinedstorage.container.slot.legacy.LegacyFilterSlot; + +import java.util.HashSet; +import java.util.Set; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.HashSet; -import java.util.Set; -import java.util.function.Supplier; +public class SetFilterSlotMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "set_filter_slot"); -public class SetFilterSlotMessage { private final int containerSlot; private final ItemStack stack; @@ -30,27 +33,16 @@ public static SetFilterSlotMessage decode(FriendlyByteBuf buf) { return new SetFilterSlotMessage(buf.readInt(), buf.readItem()); } - public static void encode(SetFilterSlotMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.containerSlot); - buf.writeItem(message.stack); - } - - public static void handle(SetFilterSlotMessage message, Supplier ctx) { - if (!message.stack.isEmpty() && message.stack.getCount() <= message.stack.getMaxStackSize()) { - Player player = ctx.get().getSender(); + public static void handle(SetFilterSlotMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (!message.stack.isEmpty() && message.stack.getCount() <= message.stack.getMaxStackSize()) { + AbstractContainerMenu container = player.containerMenu; - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; - - if (container != null && message.containerSlot >= 0 && message.containerSlot < container.slots.size()) { - handle(message, container); - } - }); + if (container != null && message.containerSlot >= 0 && message.containerSlot < container.slots.size()) { + handle(message, container); + } } - } - - ctx.get().setPacketHandled(true); + })); } private static void handle(SetFilterSlotMessage message, AbstractContainerMenu container) { @@ -64,8 +56,10 @@ private static void handle(SetFilterSlotMessage message, AbstractContainerMenu c if (container instanceof GridContainerMenu) { IGrid grid = ((GridContainerMenu) container).getGrid(); //exclude output slots - if (grid instanceof GridNetworkNode && slot.getSlotIndex() < ((GridNetworkNode) grid).getAllowedTagList().getAllowedItemTags().size()) { - Set list = new HashSet<>(((GridNetworkNode) grid).getAllowedTagList().getAllowedItemTags().get(slot.getSlotIndex())); + if (grid instanceof GridNetworkNode && + slot.getSlotIndex() < ((GridNetworkNode) grid).getAllowedTagList().getAllowedItemTags().size()) { + Set list = new HashSet<>( + ((GridNetworkNode) grid).getAllowedTagList().getAllowedItemTags().get(slot.getSlotIndex())); postAction = () -> { ((GridNetworkNode) grid).getAllowedTagList().setAllowedItemTags(slot.getSlotIndex(), list); @@ -78,4 +72,15 @@ private static void handle(SetFilterSlotMessage message, AbstractContainerMenu c postAction.run(); } } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(containerSlot); + buf.writeItem(stack); + } + + @Override + public ResourceLocation id() { + return ID; + } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/SetFluidFilterSlotMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/SetFluidFilterSlotMessage.java index aaa2620900..035425225b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/SetFluidFilterSlotMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/SetFluidFilterSlotMessage.java @@ -1,22 +1,25 @@ package com.refinedmods.refinedstorage.network; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.apiimpl.network.node.GridNetworkNode; import com.refinedmods.refinedstorage.container.GridContainerMenu; import com.refinedmods.refinedstorage.container.slot.filter.FluidFilterSlot; + +import java.util.HashSet; +import java.util.Set; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.Slot; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.HashSet; -import java.util.Set; -import java.util.function.Supplier; +public class SetFluidFilterSlotMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "set_fluid_filter_slot"); -public class SetFluidFilterSlotMessage { private final int containerSlot; private final FluidStack stack; @@ -29,27 +32,15 @@ public static SetFluidFilterSlotMessage decode(FriendlyByteBuf buf) { return new SetFluidFilterSlotMessage(buf.readInt(), FluidStack.readFromPacket(buf)); } - public static void encode(SetFluidFilterSlotMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.containerSlot); - message.stack.writeToPacket(buf); - } - - public static void handle(SetFluidFilterSlotMessage message, Supplier ctx) { - if (!message.stack.isEmpty()) { - Player player = ctx.get().getSender(); + public static void handle(SetFluidFilterSlotMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + AbstractContainerMenu container = player.containerMenu; - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; - - if (container != null && message.containerSlot >= 0 && message.containerSlot < container.slots.size()) { - handle(message, container); - } - }); + if (!message.stack.isEmpty() && container != null && message.containerSlot >= 0 && + message.containerSlot < container.slots.size()) { + handle(message, container); } - } - - ctx.get().setPacketHandled(true); + })); } private static void handle(SetFluidFilterSlotMessage message, AbstractContainerMenu container) { @@ -62,8 +53,10 @@ private static void handle(SetFluidFilterSlotMessage message, AbstractContainerM // Prevent the grid crafting matrix inventory listener from resetting the list. if (container instanceof GridContainerMenu) { IGrid grid = ((GridContainerMenu) container).getGrid(); - if (grid instanceof GridNetworkNode && slot.getSlotIndex() < ((GridNetworkNode) grid).getAllowedTagList().getAllowedFluidTags().size()) { - Set list = new HashSet<>(((GridNetworkNode) grid).getAllowedTagList().getAllowedFluidTags().get(slot.getSlotIndex())); + if (grid instanceof GridNetworkNode && + slot.getSlotIndex() < ((GridNetworkNode) grid).getAllowedTagList().getAllowedFluidTags().size()) { + Set list = new HashSet<>( + ((GridNetworkNode) grid).getAllowedTagList().getAllowedFluidTags().get(slot.getSlotIndex())); postAction = () -> { ((GridNetworkNode) grid).getAllowedTagList().setAllowedFluidTags(slot.getSlotIndex(), list); @@ -78,4 +71,15 @@ private static void handle(SetFluidFilterSlotMessage message, AbstractContainerM postAction.run(); } } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(containerSlot); + stack.writeToPacket(buf); + } + + @Override + public ResourceLocation id() { + return ID; + } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/SplitPacketMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/SplitPacketMessage.java deleted file mode 100644 index 0015b66a74..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/network/SplitPacketMessage.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.refinedmods.refinedstorage.network; - -import com.refinedmods.refinedstorage.RS; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.network.NetworkEvent; - -import java.util.function.Supplier; - -public class SplitPacketMessage { - /** - * The payload. - */ - private final byte[] payload; - /** - * Internal communication id. Used to indicate to what wrapped message this belongs to. - */ - private int communicationId; - /** - * The index of the split message in the wrapped message. - */ - private int packetIndex; - - public SplitPacketMessage(final int communicationId, final int packetIndex, final byte[] payload) { - this.communicationId = communicationId; - this.packetIndex = packetIndex; - this.payload = payload; - } - - public static void encode(SplitPacketMessage message, FriendlyByteBuf buf) { - buf.writeVarInt(message.communicationId); - buf.writeVarInt(message.packetIndex); - buf.writeByteArray(message.payload); - } - - public static SplitPacketMessage decode(final FriendlyByteBuf buf) { - return new SplitPacketMessage(buf.readVarInt(), buf.readVarInt(), buf.readByteArray()); - } - - public static boolean handle(SplitPacketMessage data, Supplier ctx) { - RS.NETWORK_HANDLER.addPackagePart(data.communicationId, data.packetIndex, data.payload); - ctx.get().setPacketHandled(true); - return true; - } -} diff --git a/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorCancelMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorCancelMessage.java index 35ee185867..ee1d917dba 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorCancelMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorCancelMessage.java @@ -1,15 +1,20 @@ package com.refinedmods.refinedstorage.network.craftingmonitor; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.container.CraftingMonitorContainerMenu; + +import java.util.UUID; +import javax.annotation.Nullable; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import javax.annotation.Nullable; -import java.util.UUID; -import java.util.function.Supplier; +public class CraftingMonitorCancelMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "crafting_monitor_cancel"); -public class CraftingMonitorCancelMessage { @Nullable private final UUID taskId; @@ -21,25 +26,28 @@ public static CraftingMonitorCancelMessage decode(FriendlyByteBuf buf) { return new CraftingMonitorCancelMessage(buf.readBoolean() ? buf.readUUID() : null); } - public static void encode(CraftingMonitorCancelMessage message, FriendlyByteBuf buf) { - buf.writeBoolean(message.taskId != null); - - if (message.taskId != null) { - buf.writeUUID(message.taskId); - } + public static void handle(CraftingMonitorCancelMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof CraftingMonitorContainerMenu) { + ((CraftingMonitorContainerMenu) player.containerMenu).getCraftingMonitor().onCancelled( + (ServerPlayer) player, + message.taskId + ); + } + })); } - public static void handle(CraftingMonitorCancelMessage message, Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); + @Override + public void write(FriendlyByteBuf buf) { + buf.writeBoolean(taskId != null); - if (player != null) { - ctx.get().enqueueWork(() -> { - if (player.containerMenu instanceof CraftingMonitorContainerMenu) { - ((CraftingMonitorContainerMenu) player.containerMenu).getCraftingMonitor().onCancelled(player, message.taskId); - } - }); + if (taskId != null) { + buf.writeUUID(taskId); } + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorSyncTask.java b/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorSyncTask.java new file mode 100644 index 0000000000..339955231d --- /dev/null +++ b/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorSyncTask.java @@ -0,0 +1,15 @@ +package com.refinedmods.refinedstorage.network.craftingmonitor; + +import com.refinedmods.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorElement; +import com.refinedmods.refinedstorage.api.autocrafting.task.ICraftingRequestInfo; + +import java.util.List; +import java.util.UUID; + +public record CraftingMonitorSyncTask(UUID id, + ICraftingRequestInfo requestInfo, + int quantity, + long startTime, + int completionPercentage, + List elements) { +} diff --git a/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorUpdateMessage.java index d1ca658f57..2047aff77d 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/CraftingMonitorUpdateMessage.java @@ -1,44 +1,43 @@ package com.refinedmods.refinedstorage.network.craftingmonitor; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.autocrafting.craftingmonitor.ICraftingMonitorElement; import com.refinedmods.refinedstorage.api.autocrafting.task.CraftingTaskReadException; import com.refinedmods.refinedstorage.api.autocrafting.task.ICraftingRequestInfo; import com.refinedmods.refinedstorage.api.autocrafting.task.ICraftingTask; import com.refinedmods.refinedstorage.api.network.grid.IGridTab; import com.refinedmods.refinedstorage.apiimpl.API; +import com.refinedmods.refinedstorage.blockentity.craftingmonitor.ICraftingMonitor; import com.refinedmods.refinedstorage.network.ClientProxy; import com.refinedmods.refinedstorage.screen.CraftingMonitorScreen; -import com.refinedmods.refinedstorage.blockentity.craftingmonitor.ICraftingMonitor; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.network.NetworkEvent; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.List; import java.util.UUID; import java.util.function.Function; -import java.util.function.Supplier; -public class CraftingMonitorUpdateMessage { - private static final Logger LOGGER = LogManager.getLogger(CraftingMonitorUpdateMessage.class); +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; - private ICraftingMonitor craftingMonitor; +public class CraftingMonitorUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "crafting_monitor_update"); - private List tasks = new ArrayList<>(); + private static final Logger LOGGER = LogManager.getLogger(CraftingMonitorUpdateMessage.class); - public CraftingMonitorUpdateMessage(ICraftingMonitor craftingMonitor) { - this.craftingMonitor = craftingMonitor; - } + private final List tasks; - public CraftingMonitorUpdateMessage(List tasks) { + public CraftingMonitorUpdateMessage(List tasks) { this.tasks = tasks; } public static CraftingMonitorUpdateMessage decode(FriendlyByteBuf buf) { int size = buf.readInt(); - List tasks = new ArrayList<>(); + List tasks = new ArrayList<>(); for (int i = 0; i < size; ++i) { UUID id = buf.readUUID(); @@ -59,30 +58,40 @@ public static CraftingMonitorUpdateMessage decode(FriendlyByteBuf buf) { int elementCount = buf.readInt(); for (int j = 0; j < elementCount; ++j) { - Function factory = API.instance().getCraftingMonitorElementRegistry().get(buf.readResourceLocation()); + Function factory = + API.instance().getCraftingMonitorElementRegistry().get(buf.readResourceLocation()); if (factory != null) { elements.add(factory.apply(buf)); } } - tasks.add(new CraftingMonitorScreen.Task(id, requested, qty, executionStarted, percentage, elements)); + tasks.add(new CraftingMonitorSyncTask(id, requested, qty, executionStarted, percentage, elements)); } return new CraftingMonitorUpdateMessage(tasks); } - public static void encode(CraftingMonitorUpdateMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.craftingMonitor.getTasks().size()); + public static void handle(CraftingMonitorUpdateMessage message, PlayPayloadContext ctx) { + ctx.workHandler().submitAsync(() -> ClientProxy.onReceivedCraftingMonitorUpdateMessage(message)); + } + + public List getTasks() { + return tasks; + } - for (ICraftingTask task : message.craftingMonitor.getTasks()) { - buf.writeUUID(task.getId()); - buf.writeNbt(task.getRequested().writeToNbt()); - buf.writeInt(task.getQuantity()); - buf.writeLong(task.getStartTime()); - buf.writeInt(task.getCompletionPercentage()); + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(tasks.size()); - List elements = task.getCraftingMonitorElements(); + for (CraftingMonitorSyncTask task : tasks) { + buf.writeUUID(task.id()); + buf.writeNbt(task.requestInfo().writeToNbt()); + buf.writeInt(task.quantity()); + buf.writeLong(task.startTime()); + buf.writeInt(task.completionPercentage()); + + List elements = task.elements(); buf.writeInt(elements.size()); @@ -94,12 +103,8 @@ public static void encode(CraftingMonitorUpdateMessage message, FriendlyByteBuf } } - public static void handle(CraftingMonitorUpdateMessage message, Supplier ctx) { - ctx.get().enqueueWork(() -> ClientProxy.onReceivedCraftingMonitorUpdateMessage(message)); - ctx.get().setPacketHandled(true); - } - - public List getTasks() { - return tasks; + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/WirelessCraftingMonitorSettingsUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/WirelessCraftingMonitorSettingsUpdateMessage.java index 250a551078..e6a26f7113 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/WirelessCraftingMonitorSettingsUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/craftingmonitor/WirelessCraftingMonitorSettingsUpdateMessage.java @@ -1,16 +1,20 @@ package com.refinedmods.refinedstorage.network.craftingmonitor; -import com.refinedmods.refinedstorage.container.CraftingMonitorContainerMenu; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.blockentity.craftingmonitor.WirelessCraftingMonitor; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.network.NetworkEvent; +import com.refinedmods.refinedstorage.container.CraftingMonitorContainerMenu; import java.util.Optional; import java.util.UUID; -import java.util.function.Supplier; -public class WirelessCraftingMonitorSettingsUpdateMessage { +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; + +public class WirelessCraftingMonitorSettingsUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "wireless_crafting_monitor_settings_update"); + private final Optional tabSelected; private final int tabPage; @@ -31,25 +35,26 @@ public static WirelessCraftingMonitorSettingsUpdateMessage decode(FriendlyByteBu return new WirelessCraftingMonitorSettingsUpdateMessage(tabSelected, tabPage); } - public static void encode(WirelessCraftingMonitorSettingsUpdateMessage message, FriendlyByteBuf buf) { - buf.writeBoolean(message.tabSelected.isPresent()); - - message.tabSelected.ifPresent(buf::writeUUID); - - buf.writeInt(message.tabPage); + public static void handle(WirelessCraftingMonitorSettingsUpdateMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof CraftingMonitorContainerMenu) { + ((WirelessCraftingMonitor) ((CraftingMonitorContainerMenu) player.containerMenu).getCraftingMonitor()).setSettings( + message.tabSelected, message.tabPage); + } + })); } - public static void handle(WirelessCraftingMonitorSettingsUpdateMessage message, Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); + @Override + public void write(FriendlyByteBuf buf) { + buf.writeBoolean(tabSelected.isPresent()); - if (player != null) { - ctx.get().enqueueWork(() -> { - if (player.containerMenu instanceof CraftingMonitorContainerMenu) { - ((WirelessCraftingMonitor) ((CraftingMonitorContainerMenu) player.containerMenu).getCraftingMonitor()).setSettings(message.tabSelected, message.tabPage); - } - }); - } + tabSelected.ifPresent(buf::writeUUID); + + buf.writeInt(tabPage); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/disk/StorageDiskSizeRequestMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/disk/StorageDiskSizeRequestMessage.java index 8789caa73c..18a132a226 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/disk/StorageDiskSizeRequestMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/disk/StorageDiskSizeRequestMessage.java @@ -4,12 +4,16 @@ import com.refinedmods.refinedstorage.api.storage.disk.IStorageDisk; import com.refinedmods.refinedstorage.apiimpl.API; import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.network.NetworkEvent; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; import java.util.UUID; -import java.util.function.Supplier; -public class StorageDiskSizeRequestMessage { +public class StorageDiskSizeRequestMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "storage_disk_size_request"); + private final UUID id; public StorageDiskSizeRequestMessage(UUID id) { @@ -20,18 +24,23 @@ public static StorageDiskSizeRequestMessage decode(FriendlyByteBuf buf) { return new StorageDiskSizeRequestMessage(buf.readUUID()); } - public static void encode(StorageDiskSizeRequestMessage message, FriendlyByteBuf buf) { - buf.writeUUID(message.id); - } - - public static void handle(StorageDiskSizeRequestMessage message, Supplier ctx) { - ctx.get().enqueueWork(() -> { - IStorageDisk disk = API.instance().getStorageDiskManager(ctx.get().getSender().serverLevel()).get(message.id); + public static void handle(StorageDiskSizeRequestMessage message, PlayPayloadContext context) { + context.player().ifPresent(player -> context.workHandler().submitAsync(() -> { + IStorageDisk disk = API.instance().getStorageDiskManager(((ServerPlayer) player).serverLevel()).get(message.id); if (disk != null) { - RS.NETWORK_HANDLER.sendTo(ctx.get().getSender(), new StorageDiskSizeResponseMessage(message.id, disk.getStored(), disk.getCapacity())); + RS.NETWORK_HANDLER.sendTo((ServerPlayer) player, new StorageDiskSizeResponseMessage(message.id, disk.getStored(), disk.getCapacity())); } - }); - ctx.get().setPacketHandled(true); + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeUUID(id); + } + + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/disk/StorageDiskSizeResponseMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/disk/StorageDiskSizeResponseMessage.java index 600ae35472..fa4bf8134f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/disk/StorageDiskSizeResponseMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/disk/StorageDiskSizeResponseMessage.java @@ -1,15 +1,20 @@ package com.refinedmods.refinedstorage.network.disk; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.storage.disk.StorageDiskSyncData; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.apiimpl.storage.disk.StorageDiskSync; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.network.NetworkEvent; import java.util.UUID; -import java.util.function.Supplier; -public class StorageDiskSizeResponseMessage { +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; + +public class StorageDiskSizeResponseMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "storage_disk_size_response"); + private final UUID id; private final int stored; private final int capacity; @@ -20,18 +25,26 @@ public StorageDiskSizeResponseMessage(UUID id, int stored, int capacity) { this.capacity = capacity; } - public static void encode(StorageDiskSizeResponseMessage message, FriendlyByteBuf buf) { - buf.writeUUID(message.id); - buf.writeInt(message.stored); - buf.writeInt(message.capacity); - } - public static StorageDiskSizeResponseMessage decode(FriendlyByteBuf buf) { return new StorageDiskSizeResponseMessage(buf.readUUID(), buf.readInt(), buf.readInt()); } - public static void handle(StorageDiskSizeResponseMessage message, Supplier ctx) { - ctx.get().enqueueWork(() -> ((StorageDiskSync) API.instance().getStorageDiskSync()).setData(message.id, new StorageDiskSyncData(message.stored, message.capacity))); - ctx.get().setPacketHandled(true); + public static void handle(StorageDiskSizeResponseMessage message, PlayPayloadContext context) { + context.workHandler().submitAsync(() -> ((StorageDiskSync) API.instance().getStorageDiskSync()).setData( + message.id, + new StorageDiskSyncData(message.stored, message.capacity) + )); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeUUID(id); + buf.writeInt(stored); + buf.writeInt(capacity); + } + + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridClearMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridClearMessage.java index 28a682fba2..e7fef3611b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridClearMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridClearMessage.java @@ -1,26 +1,34 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.container.GridContainerMenu; -import net.minecraft.world.entity.player.Player; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class GridClearMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_clear"); -public class GridClearMessage { - public static void handle(Supplier ctx) { - Player player = ctx.get().getSender(); + public static void handle(GridClearMessage msg, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + AbstractContainerMenu container = player.containerMenu; - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; + if (container instanceof GridContainerMenu) { + ((GridContainerMenu) container).getGrid().onClear(player); + } + })); + } - if (container instanceof GridContainerMenu) { - ((GridContainerMenu) container).getGrid().onClear(player); - } - }); - } + @Override + public void write(FriendlyByteBuf buf) { + // no op + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingPreviewRequestMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingPreviewRequestMessage.java index 9a6adbbab7..5e0127b080 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingPreviewRequestMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingPreviewRequestMessage.java @@ -1,16 +1,21 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.container.GridContainerMenu; + +import java.util.UUID; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.UUID; -import java.util.function.Supplier; +public class GridCraftingPreviewRequestMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_crafting_preview_request"); -public class GridCraftingPreviewRequestMessage { private final UUID id; private final int quantity; private final boolean noPreview; @@ -32,36 +37,40 @@ public static GridCraftingPreviewRequestMessage decode(FriendlyByteBuf buf) { ); } - public static void encode(GridCraftingPreviewRequestMessage message, FriendlyByteBuf buf) { - buf.writeUUID(message.id); - buf.writeInt(message.quantity); - buf.writeBoolean(message.noPreview); - buf.writeBoolean(message.fluids); - } - - public static void handle(GridCraftingPreviewRequestMessage message, Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); + public static void handle(GridCraftingPreviewRequestMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + AbstractContainerMenu container = player.containerMenu; - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; + if (container instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) container).getGrid(); - if (container instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) container).getGrid(); - - if (message.fluids) { - if (grid.getFluidHandler() != null) { - grid.getFluidHandler().onCraftingPreviewRequested(player, message.id, message.quantity, message.noPreview); - } - } else { - if (grid.getItemHandler() != null) { - grid.getItemHandler().onCraftingPreviewRequested(player, message.id, message.quantity, message.noPreview); - } + if (message.fluids) { + if (grid.getFluidHandler() != null) { + grid.getFluidHandler() + .onCraftingPreviewRequested((ServerPlayer) player, message.id, message.quantity, + message.noPreview); + } + } else { + if (grid.getItemHandler() != null) { + grid.getItemHandler() + .onCraftingPreviewRequested((ServerPlayer) player, message.id, message.quantity, + message.noPreview); } } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeUUID(id); + buf.writeInt(quantity); + buf.writeBoolean(noPreview); + buf.writeBoolean(fluids); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingPreviewResponseMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingPreviewResponseMessage.java index 4a3118a7a2..6e14aea1f4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingPreviewResponseMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingPreviewResponseMessage.java @@ -1,24 +1,29 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.autocrafting.preview.ICraftingPreviewElement; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.network.ClientProxy; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.network.NetworkEvent; import java.util.LinkedList; import java.util.List; import java.util.UUID; -import java.util.function.Supplier; -public class GridCraftingPreviewResponseMessage { +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; + +public class GridCraftingPreviewResponseMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_crafting_preview_response"); + private final List elements; private final UUID id; private final int quantity; private final boolean fluids; - public GridCraftingPreviewResponseMessage(List elements, UUID id, int quantity, boolean fluids) { + public GridCraftingPreviewResponseMessage(List elements, UUID id, int quantity, + boolean fluids) { this.elements = elements; this.id = id; this.quantity = quantity; @@ -42,21 +47,8 @@ public static GridCraftingPreviewResponseMessage decode(FriendlyByteBuf buf) { return new GridCraftingPreviewResponseMessage(elements, id, quantity, fluids); } - public static void encode(GridCraftingPreviewResponseMessage message, FriendlyByteBuf buf) { - buf.writeUUID(message.id); - buf.writeInt(message.quantity); - buf.writeBoolean(message.fluids); - buf.writeInt(message.elements.size()); - - for (ICraftingPreviewElement element : message.elements) { - buf.writeResourceLocation(element.getId()); - element.write(buf); - } - } - - public static void handle(GridCraftingPreviewResponseMessage message, Supplier ctx) { - ctx.get().enqueueWork(() -> ClientProxy.onReceivedCraftingPreviewResponseMessage(message)); - ctx.get().setPacketHandled(true); + public static void handle(GridCraftingPreviewResponseMessage message, PlayPayloadContext ctx) { + ctx.workHandler().submitAsync(() -> ClientProxy.onReceivedCraftingPreviewResponseMessage(message)); } public List getElements() { @@ -74,4 +66,22 @@ public int getQuantity() { public boolean isFluids() { return fluids; } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeUUID(id); + buf.writeInt(quantity); + buf.writeBoolean(fluids); + buf.writeInt(elements.size()); + + for (ICraftingPreviewElement element : elements) { + buf.writeResourceLocation(element.getId()); + element.write(buf); + } + } + + @Override + public ResourceLocation id() { + return ID; + } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingStartRequestMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingStartRequestMessage.java index 93cf146abf..bf5a977e67 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingStartRequestMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingStartRequestMessage.java @@ -1,16 +1,21 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.container.GridContainerMenu; + +import java.util.UUID; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.UUID; -import java.util.function.Supplier; +public class GridCraftingStartRequestMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_crafting_start_request"); -public class GridCraftingStartRequestMessage { private final UUID id; private final int quantity; private final boolean fluids; @@ -29,35 +34,35 @@ public static GridCraftingStartRequestMessage decode(FriendlyByteBuf buf) { ); } - public static void encode(GridCraftingStartRequestMessage message, FriendlyByteBuf buf) { - buf.writeUUID(message.id); - buf.writeInt(message.quantity); - buf.writeBoolean(message.fluids); - } - - public static void handle(GridCraftingStartRequestMessage message, Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); + public static void handle(GridCraftingStartRequestMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + AbstractContainerMenu container = player.containerMenu; - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; + if (container instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) container).getGrid(); - if (container instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) container).getGrid(); - - if (message.fluids) { - if (grid.getFluidHandler() != null) { - grid.getFluidHandler().onCraftingRequested(player, message.id, message.quantity); - } - } else { - if (grid.getItemHandler() != null) { - grid.getItemHandler().onCraftingRequested(player, message.id, message.quantity); - } + if (message.fluids) { + if (grid.getFluidHandler() != null) { + grid.getFluidHandler().onCraftingRequested((ServerPlayer) player, message.id, message.quantity); + } + } else { + if (grid.getItemHandler() != null) { + grid.getItemHandler().onCraftingRequested((ServerPlayer) player, message.id, message.quantity); } } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeUUID(id); + buf.writeInt(quantity); + buf.writeBoolean(fluids); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingStartResponseMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingStartResponseMessage.java index 5995189cbd..0d0ab03497 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingStartResponseMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridCraftingStartResponseMessage.java @@ -1,13 +1,27 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.network.ClientProxy; -import net.minecraftforge.network.NetworkEvent; -import java.util.function.Supplier; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -public class GridCraftingStartResponseMessage { - public static void handle(Supplier ctx) { - ctx.get().enqueueWork(() -> ClientProxy.onReceivedCraftingStartResponseMessage()); - ctx.get().setPacketHandled(true); +public class GridCraftingStartResponseMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_crafting_start_response"); + + public static void handle(GridCraftingStartResponseMessage msg, PlayPayloadContext ctx) { + ctx.workHandler().submitAsync(ClientProxy::onReceivedCraftingStartResponseMessage); + } + + @Override + public void write(FriendlyByteBuf buf) { + // no op + } + + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidDeltaMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidDeltaMessage.java index 51dda0b30e..4c575a6690 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidDeltaMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidDeltaMessage.java @@ -1,70 +1,50 @@ package com.refinedmods.refinedstorage.network.grid; -import com.refinedmods.refinedstorage.api.network.INetwork; -import com.refinedmods.refinedstorage.api.util.IComparer; -import com.refinedmods.refinedstorage.api.util.StackListEntry; -import com.refinedmods.refinedstorage.api.util.StackListResult; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.screen.BaseScreen; import com.refinedmods.refinedstorage.screen.grid.GridScreen; -import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.network.NetworkEvent; -import org.apache.commons.lang3.tuple.Pair; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import javax.annotation.Nullable; import java.util.LinkedList; import java.util.List; -import java.util.function.Supplier; -public class GridFluidDeltaMessage { - @Nullable - private INetwork network; - private List> deltas; +public class GridFluidDeltaMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_fluid_delta"); - private List> clientDeltas; + private final List> deltas; - public GridFluidDeltaMessage(INetwork network, List> deltas) { - this.network = network; + public GridFluidDeltaMessage(List> deltas) { this.deltas = deltas; } - public GridFluidDeltaMessage(List> clientDeltas) { - this.clientDeltas = clientDeltas; - } - public static GridFluidDeltaMessage decode(FriendlyByteBuf buf) { - int size = buf.readInt(); - - List> clientDeltas = new LinkedList<>(); - + final int size = buf.readInt(); + final List> deltas = new LinkedList<>(); for (int i = 0; i < size; ++i) { - int delta = buf.readInt(); - - clientDeltas.add(Pair.of(StackUtils.readFluidGridStack(buf), delta)); + deltas.add(StackUtils.readFluidGridStackDelta(buf)); } - - return new GridFluidDeltaMessage(clientDeltas); + return new GridFluidDeltaMessage(deltas); } - public static void encode(GridFluidDeltaMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.deltas.size()); - - for (StackListResult delta : message.deltas) { - buf.writeInt(delta.getChange()); - - StackListEntry craftingEntry = message.network.getFluidStorageCache().getCraftablesList().getEntry(delta.getStack(), IComparer.COMPARE_NBT); - - StackUtils.writeFluidGridStack(buf, delta.getStack(), delta.getId(), craftingEntry != null ? craftingEntry.getId() : null, false, message.network.getFluidStorageTracker().get(delta.getStack())); - } - } - - public static void handle(GridFluidDeltaMessage message, Supplier ctx) { + public static void handle(GridFluidDeltaMessage message, PlayPayloadContext ctx) { BaseScreen.executeLater(GridScreen.class, grid -> { - message.clientDeltas.forEach(p -> grid.getView().postChange(p.getLeft(), p.getRight())); + message.deltas.forEach(p -> grid.getView().postChange(p.stack(), p.change())); }); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(deltas.size()); + deltas.forEach(delta -> StackUtils.writeFluidGridStackDelta(buf, delta)); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidInsertHeldMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidInsertHeldMessage.java index a0b559ec0d..732f230280 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidInsertHeldMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidInsertHeldMessage.java @@ -1,31 +1,40 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.container.GridContainerMenu; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraftforge.network.NetworkEvent; - -import java.util.function.Supplier; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -public class GridFluidInsertHeldMessage { - public static void handle(Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); +public class GridFluidInsertHeldMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_fluid_insert_held"); - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; + public static void handle(GridFluidInsertHeldMessage msg, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + AbstractContainerMenu container = player.containerMenu; - if (container instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) container).getGrid(); + if (container instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) container).getGrid(); - if (grid.getFluidHandler() != null) { - grid.getFluidHandler().onInsertHeldContainer(player); - } + if (grid.getFluidHandler() != null) { + grid.getFluidHandler().onInsertHeldContainer((ServerPlayer) player); } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + // no op + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidPullMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidPullMessage.java index 7fbe17beb7..68c1257315 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidPullMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidPullMessage.java @@ -1,16 +1,21 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.container.GridContainerMenu; + +import java.util.UUID; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.UUID; -import java.util.function.Supplier; +public class GridFluidPullMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_fluid_pull"); -public class GridFluidPullMessage { private final UUID id; private final boolean shift; @@ -23,28 +28,28 @@ public static GridFluidPullMessage decode(FriendlyByteBuf buf) { return new GridFluidPullMessage(buf.readUUID(), buf.readBoolean()); } - public static void encode(GridFluidPullMessage message, FriendlyByteBuf buf) { - buf.writeUUID(message.id); - buf.writeBoolean(message.shift); - } - - public static void handle(GridFluidPullMessage message, Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; + public static void handle(GridFluidPullMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + AbstractContainerMenu container = player.containerMenu; - if (container instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) container).getGrid(); + if (container instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) container).getGrid(); - if (grid.getFluidHandler() != null) { - grid.getFluidHandler().onExtract(player, message.id, message.shift); - } + if (grid.getFluidHandler() != null) { + grid.getFluidHandler().onExtract((ServerPlayer) player, message.id, message.shift); } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeUUID(id); + buf.writeBoolean(shift); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidUpdateMessage.java index d37d35a034..feda5423ad 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridFluidUpdateMessage.java @@ -1,78 +1,64 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.INetwork; import com.refinedmods.refinedstorage.api.util.IComparer; import com.refinedmods.refinedstorage.api.util.StackListEntry; import com.refinedmods.refinedstorage.screen.BaseScreen; import com.refinedmods.refinedstorage.screen.grid.GridScreen; +import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; import com.refinedmods.refinedstorage.screen.grid.view.GridViewImpl; import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.network.NetworkEvent; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; import java.util.ArrayList; import java.util.List; -import java.util.function.Supplier; -public class GridFluidUpdateMessage { +public class GridFluidUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_fluid_update"); + private final boolean canCraft; - private INetwork network; - private List stacks = new ArrayList<>(); + private final List stacks; - public GridFluidUpdateMessage(boolean canCraft, List stacks) { + public GridFluidUpdateMessage(final boolean canCraft, final List stacks) { this.canCraft = canCraft; this.stacks = stacks; } - public GridFluidUpdateMessage(INetwork network, boolean canCraft) { - this.network = network; - this.canCraft = canCraft; - } - public static GridFluidUpdateMessage decode(FriendlyByteBuf buf) { - boolean canCraft = buf.readBoolean(); - - int size = buf.readInt(); - - List stacks = new ArrayList<>(); - + final boolean canCraft = buf.readBoolean(); + final int size = buf.readInt(); + final List stacks = new ArrayList<>(); for (int i = 0; i < size; ++i) { stacks.add(StackUtils.readFluidGridStack(buf)); } - return new GridFluidUpdateMessage(canCraft, stacks); } - public static void encode(GridFluidUpdateMessage message, FriendlyByteBuf buf) { - buf.writeBoolean(message.canCraft); - - int size = message.network.getFluidStorageCache().getList().getStacks().size() + message.network.getFluidStorageCache().getCraftablesList().getStacks().size(); - - buf.writeInt(size); - - for (StackListEntry stack : message.network.getFluidStorageCache().getList().getStacks()) { - StackListEntry craftingEntry = message.network.getFluidStorageCache().getCraftablesList().getEntry(stack.getStack(), IComparer.COMPARE_NBT); - - StackUtils.writeFluidGridStack(buf, stack.getStack(), stack.getId(), craftingEntry != null ? craftingEntry.getId() : null, false, message.network.getFluidStorageTracker().get(stack.getStack())); - } - - for (StackListEntry stack : message.network.getFluidStorageCache().getCraftablesList().getStacks()) { - StackListEntry regularEntry = message.network.getFluidStorageCache().getList().getEntry(stack.getStack(), IComparer.COMPARE_NBT); - - StackUtils.writeFluidGridStack(buf, stack.getStack(), stack.getId(), regularEntry != null ? regularEntry.getId() : null, true, message.network.getFluidStorageTracker().get(stack.getStack())); - } - } - - public static void handle(GridFluidUpdateMessage message, Supplier ctx) { + public static void handle(GridFluidUpdateMessage message, PlayPayloadContext ctx) { BaseScreen.executeLater(GridScreen.class, grid -> { grid.setView(new GridViewImpl(grid, GridScreen.getDefaultSorter(), GridScreen.getSorters())); grid.getView().setCanCraft(message.canCraft); grid.getView().setStacks(message.stacks); grid.getView().forceSort(); }); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeBoolean(canCraft); + buf.writeInt(stacks.size()); + stacks.forEach(stack -> StackUtils.writeFluidGridStack(buf, stack)); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemDeltaMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemDeltaMessage.java index 6a6fb84dad..e6976e63ee 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemDeltaMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemDeltaMessage.java @@ -1,70 +1,51 @@ package com.refinedmods.refinedstorage.network.grid; -import com.refinedmods.refinedstorage.api.network.INetwork; -import com.refinedmods.refinedstorage.api.util.IComparer; -import com.refinedmods.refinedstorage.api.util.StackListEntry; -import com.refinedmods.refinedstorage.api.util.StackListResult; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.screen.BaseScreen; import com.refinedmods.refinedstorage.screen.grid.GridScreen; -import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; import com.refinedmods.refinedstorage.util.StackUtils; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; -import org.apache.commons.lang3.tuple.Pair; -import javax.annotation.Nullable; import java.util.LinkedList; import java.util.List; -import java.util.function.Supplier; -public class GridItemDeltaMessage { - @Nullable - private INetwork network; - private List> deltas; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; - private List> clientDeltas; +public class GridItemDeltaMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_item_delta"); - public GridItemDeltaMessage(INetwork network, List> deltas) { - this.network = network; - this.deltas = deltas; - } + private final List> deltas; - public GridItemDeltaMessage(List> clientDeltas) { - this.clientDeltas = clientDeltas; + public GridItemDeltaMessage(List> deltas) { + this.deltas = deltas; } public static GridItemDeltaMessage decode(FriendlyByteBuf buf) { - int size = buf.readInt(); - - List> clientDeltas = new LinkedList<>(); - + final int size = buf.readInt(); + final List> deltas = new LinkedList<>(); for (int i = 0; i < size; ++i) { - int delta = buf.readInt(); - - clientDeltas.add(Pair.of(StackUtils.readItemGridStack(buf), delta)); - } - - return new GridItemDeltaMessage(clientDeltas); - } - - public static void encode(GridItemDeltaMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.deltas.size()); - - for (StackListResult delta : message.deltas) { - buf.writeInt(delta.getChange()); - - StackListEntry craftingEntry = message.network.getItemStorageCache().getCraftablesList().getEntry(delta.getStack(), IComparer.COMPARE_NBT); - - StackUtils.writeItemGridStack(buf, delta.getStack(), delta.getId(), craftingEntry != null ? craftingEntry.getId() : null, false, message.network.getItemStorageTracker().get(delta.getStack())); + deltas.add(StackUtils.readItemGridStackDelta(buf)); } + return new GridItemDeltaMessage(deltas); } - public static void handle(GridItemDeltaMessage message, Supplier ctx) { + public static void handle(GridItemDeltaMessage message, PlayPayloadContext ctx) { BaseScreen.executeLater(GridScreen.class, grid -> { - message.clientDeltas.forEach(p -> grid.getView().postChange(p.getLeft(), p.getRight())); + message.deltas.forEach(p -> grid.getView().postChange(p.stack(), p.change())); }); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(deltas.size()); + deltas.forEach(delta -> StackUtils.writeItemGridStackDelta(buf, delta)); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemGridScrollMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemGridScrollMessage.java index 362e858c96..f9c2ddd5ca 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemGridScrollMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemGridScrollMessage.java @@ -1,15 +1,19 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.container.GridContainerMenu; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; import javax.annotation.Nullable; import java.util.UUID; -import java.util.function.Supplier; -public class GridItemGridScrollMessage { +public class GridItemGridScrollMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_item_grid_scroll"); + private final UUID id; private final boolean shift; private final boolean up; @@ -24,24 +28,28 @@ public static GridItemGridScrollMessage decode(FriendlyByteBuf buf) { return new GridItemGridScrollMessage(buf.readBoolean() ? buf.readUUID() : null, buf.readBoolean(), buf.readBoolean()); } - public static void encode(GridItemGridScrollMessage message, FriendlyByteBuf buf) { - boolean hasId = message.id != null; + public static void handle(GridItemGridScrollMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof GridContainerMenu && ((GridContainerMenu) player.containerMenu).getGrid().getItemHandler() != null) { + ((GridContainerMenu) player.containerMenu).getGrid().getItemHandler().onGridScroll((ServerPlayer) player, message.id, message.shift, message.up); + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + boolean hasId = id != null; buf.writeBoolean(hasId); if (hasId) { - buf.writeUUID(message.id); + buf.writeUUID(id); } - buf.writeBoolean(message.shift); - buf.writeBoolean(message.up); + buf.writeBoolean(shift); + buf.writeBoolean(up); } - public static void handle(GridItemGridScrollMessage message, Supplier ctx) { - ctx.get().enqueueWork(() -> { - ServerPlayer player = ctx.get().getSender(); - if (player != null && player.containerMenu instanceof GridContainerMenu && ((GridContainerMenu) player.containerMenu).getGrid().getItemHandler() != null) { - ((GridContainerMenu) player.containerMenu).getGrid().getItemHandler().onGridScroll(player, message.id, message.shift, message.up); - } - }); - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemInsertHeldMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemInsertHeldMessage.java index a83daa6a9e..8a8757249c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemInsertHeldMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemInsertHeldMessage.java @@ -1,15 +1,18 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.container.GridContainerMenu; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class GridItemInsertHeldMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_item_insert_held"); -public class GridItemInsertHeldMessage { private final boolean single; public GridItemInsertHeldMessage(boolean single) { @@ -20,27 +23,27 @@ public static GridItemInsertHeldMessage decode(FriendlyByteBuf buf) { return new GridItemInsertHeldMessage(buf.readBoolean()); } - public static void encode(GridItemInsertHeldMessage message, FriendlyByteBuf buf) { - buf.writeBoolean(message.single); - } - - public static void handle(GridItemInsertHeldMessage message, Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; + public static void handle(GridItemInsertHeldMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + AbstractContainerMenu container = player.containerMenu; - if (container instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) container).getGrid(); + if (container instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) container).getGrid(); - if (grid.getItemHandler() != null) { - grid.getItemHandler().onInsertHeldItem(player, message.single); - } + if (grid.getItemHandler() != null) { + grid.getItemHandler().onInsertHeldItem((ServerPlayer) player, message.single); } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeBoolean(single); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemInventoryScrollMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemInventoryScrollMessage.java index 72b9050790..a77a5e10be 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemInventoryScrollMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemInventoryScrollMessage.java @@ -1,13 +1,16 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.container.GridContainerMenu; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class GridItemInventoryScrollMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_item_inventory_scroll"); -public class GridItemInventoryScrollMessage { private final int slot; private final boolean shift; private final boolean up; @@ -22,19 +25,23 @@ public static GridItemInventoryScrollMessage decode(FriendlyByteBuf buf) { return new GridItemInventoryScrollMessage(buf.readInt(), buf.readBoolean(), buf.readBoolean()); } - public static void encode(GridItemInventoryScrollMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.slot); - buf.writeBoolean(message.shift); - buf.writeBoolean(message.up); + public static void handle(GridItemInventoryScrollMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof GridContainerMenu && ((GridContainerMenu) player.containerMenu).getGrid().getItemHandler() != null) { + ((GridContainerMenu) player.containerMenu).getGrid().getItemHandler().onInventoryScroll((ServerPlayer) player, message.slot, message.shift, message.up); + } + })); } - public static void handle(GridItemInventoryScrollMessage message, Supplier ctx) { - ctx.get().enqueueWork(() -> { - ServerPlayer player = ctx.get().getSender(); - if (player != null && player.containerMenu instanceof GridContainerMenu && ((GridContainerMenu) player.containerMenu).getGrid().getItemHandler() != null) { - ((GridContainerMenu) player.containerMenu).getGrid().getItemHandler().onInventoryScroll(player, message.slot, message.shift, message.up); - } - }); - ctx.get().setPacketHandled(true); + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(slot); + buf.writeBoolean(shift); + buf.writeBoolean(up); + } + + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemPullMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemPullMessage.java index 772ca9ca46..5482b144db 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemPullMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemPullMessage.java @@ -1,16 +1,20 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.container.GridContainerMenu; import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; import java.util.UUID; -import java.util.function.Supplier; -public class GridItemPullMessage { +public class GridItemPullMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_item_pull"); + private final UUID id; private final int flags; @@ -23,28 +27,28 @@ public static GridItemPullMessage decode(FriendlyByteBuf buf) { return new GridItemPullMessage(buf.readUUID(), buf.readInt()); } - public static void encode(GridItemPullMessage message, FriendlyByteBuf buf) { - buf.writeUUID(message.id); - buf.writeInt(message.flags); - } - - public static void handle(GridItemPullMessage message, Supplier ctx) { - ServerPlayer player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu container = player.containerMenu; + public static void handle(GridItemPullMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + AbstractContainerMenu container = player.containerMenu; - if (container instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) container).getGrid(); + if (container instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) container).getGrid(); - if (grid.getItemHandler() != null) { - grid.getItemHandler().onExtract(player, message.id, -1, message.flags); - } + if (grid.getItemHandler() != null) { + grid.getItemHandler().onExtract((ServerPlayer) player, message.id, -1, message.flags); } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeUUID(id); + buf.writeInt(flags); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemUpdateMessage.java index 3439e45139..f867ec6a24 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridItemUpdateMessage.java @@ -1,78 +1,62 @@ package com.refinedmods.refinedstorage.network.grid; -import com.refinedmods.refinedstorage.api.network.INetwork; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.util.IComparer; import com.refinedmods.refinedstorage.api.util.StackListEntry; import com.refinedmods.refinedstorage.screen.BaseScreen; import com.refinedmods.refinedstorage.screen.grid.GridScreen; -import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; +import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; import com.refinedmods.refinedstorage.screen.grid.view.GridViewImpl; import com.refinedmods.refinedstorage.util.StackUtils; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; import java.util.ArrayList; import java.util.List; -import java.util.function.Supplier; -public class GridItemUpdateMessage { +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; + +public class GridItemUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_item_update"); + private final boolean canCraft; - private INetwork network; - private List stacks = new ArrayList<>(); + private final List stacks; - public GridItemUpdateMessage(boolean canCraft, List stacks) { + public GridItemUpdateMessage(boolean canCraft, List stacks) { this.canCraft = canCraft; this.stacks = stacks; } - public GridItemUpdateMessage(INetwork network, boolean canCraft) { - this.network = network; - this.canCraft = canCraft; - } - public static GridItemUpdateMessage decode(FriendlyByteBuf buf) { - boolean canCraft = buf.readBoolean(); - - int size = buf.readInt(); - - List stacks = new ArrayList<>(); - + final boolean canCraft = buf.readBoolean(); + final int size = buf.readInt(); + final List stacks = new ArrayList<>(); for (int i = 0; i < size; ++i) { stacks.add(StackUtils.readItemGridStack(buf)); } - return new GridItemUpdateMessage(canCraft, stacks); } - public static void encode(GridItemUpdateMessage message, FriendlyByteBuf buf) { - buf.writeBoolean(message.canCraft); - - int size = message.network.getItemStorageCache().getList().getStacks().size() + message.network.getItemStorageCache().getCraftablesList().getStacks().size(); - - buf.writeInt(size); - - for (StackListEntry stack : message.network.getItemStorageCache().getList().getStacks()) { - StackListEntry craftingEntry = message.network.getItemStorageCache().getCraftablesList().getEntry(stack.getStack(), IComparer.COMPARE_NBT); - - StackUtils.writeItemGridStack(buf, stack.getStack(), stack.getId(), craftingEntry != null ? craftingEntry.getId() : null, false, message.network.getItemStorageTracker().get(stack.getStack())); - } - - for (StackListEntry stack : message.network.getItemStorageCache().getCraftablesList().getStacks()) { - StackListEntry regularEntry = message.network.getItemStorageCache().getList().getEntry(stack.getStack(), IComparer.COMPARE_NBT); - - StackUtils.writeItemGridStack(buf, stack.getStack(), stack.getId(), regularEntry != null ? regularEntry.getId() : null, true, message.network.getItemStorageTracker().get(stack.getStack())); - } - } - - public static void handle(GridItemUpdateMessage message, Supplier ctx) { + public static void handle(GridItemUpdateMessage message, PlayPayloadContext ctx) { BaseScreen.executeLater(GridScreen.class, grid -> { grid.setView(new GridViewImpl(grid, GridScreen.getDefaultSorter(), GridScreen.getSorters())); grid.getView().setCanCraft(message.canCraft); grid.getView().setStacks(message.stacks); grid.getView().forceSort(); }); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeBoolean(canCraft); + buf.writeInt(stacks.size()); + stacks.forEach(stack -> StackUtils.writeItemGridStack(buf, stack)); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridPatternCreateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridPatternCreateMessage.java index 93ed5652b7..2506c32123 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridPatternCreateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridPatternCreateMessage.java @@ -1,16 +1,18 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.GridType; import com.refinedmods.refinedstorage.blockentity.grid.GridBlockEntity; import net.minecraft.core.BlockPos; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class GridPatternCreateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_pattern_create"); -public class GridPatternCreateMessage { private final BlockPos pos; public GridPatternCreateMessage(BlockPos pos) { @@ -21,23 +23,24 @@ public static GridPatternCreateMessage decode(FriendlyByteBuf buf) { return new GridPatternCreateMessage(buf.readBlockPos()); } - public static void encode(GridPatternCreateMessage message, FriendlyByteBuf buf) { - buf.writeBlockPos(message.pos); - } - - public static void handle(GridPatternCreateMessage message, Supplier ctx) { - Player player = ctx.get().getSender(); + public static void handle(GridPatternCreateMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + BlockEntity blockEntity = player.getCommandSenderWorld().getBlockEntity(message.pos); - if (player != null) { - ctx.get().enqueueWork(() -> { - BlockEntity blockEntity = player.getCommandSenderWorld().getBlockEntity(message.pos); + if (blockEntity instanceof GridBlockEntity && + ((GridBlockEntity) blockEntity).getNode().getGridType() == GridType.PATTERN) { + ((GridBlockEntity) blockEntity).getNode().onCreatePattern(); + } + })); + } - if (blockEntity instanceof GridBlockEntity && ((GridBlockEntity) blockEntity).getNode().getGridType() == GridType.PATTERN) { - ((GridBlockEntity) blockEntity).getNode().onCreatePattern(); - } - }); - } + @Override + public void write(FriendlyByteBuf buf) { + buf.writeBlockPos(pos); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridProcessingTransferMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridProcessingTransferMessage.java index 5cf8c9821d..554101d702 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridProcessingTransferMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridProcessingTransferMessage.java @@ -1,5 +1,6 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.GridType; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.apiimpl.network.node.GridNetworkNode; @@ -8,17 +9,19 @@ import com.refinedmods.refinedstorage.inventory.item.BaseItemHandler; import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; import java.util.ArrayList; import java.util.Collection; import java.util.List; -import java.util.function.Supplier; -public class GridProcessingTransferMessage { +public class GridProcessingTransferMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_processing_transfer"); + private final Collection inputs; private final Collection outputs; private final Collection fluidInputs; @@ -67,59 +70,59 @@ public static GridProcessingTransferMessage decode(FriendlyByteBuf buf) { return new GridProcessingTransferMessage(inputs, outputs, fluidInputs, fluidOutputs); } - public static void encode(GridProcessingTransferMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.inputs.size()); + public static void handle(GridProcessingTransferMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); + + if (grid.getGridType() == GridType.PATTERN) { + BaseItemHandler handler = ((GridNetworkNode) grid).getProcessingMatrix(); + FluidInventory handlerFluid = ((GridNetworkNode) grid).getProcessingMatrixFluids(); + + clearInputsAndOutputs(handler); + clearInputsAndOutputs(handlerFluid); + + setInputs(handler, message.inputs, handlerFluid, message.fluidInputs); + setOutputs(handler, message.outputs, handlerFluid, message.fluidOutputs); + + + ((GridNetworkNode) grid).setProcessingPattern(true); + ((GridNetworkNode) grid).markDirty(); + } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(inputs.size()); - for (ItemStack stack : message.inputs) { + for (ItemStack stack : inputs) { StackUtils.writeItemStack(buf, stack); } - buf.writeInt(message.outputs.size()); + buf.writeInt(outputs.size()); - for (ItemStack stack : message.outputs) { + for (ItemStack stack : outputs) { StackUtils.writeItemStack(buf, stack); } - buf.writeInt(message.fluidInputs.size()); + buf.writeInt(fluidInputs.size()); - for (FluidStack stack : message.fluidInputs) { + for (FluidStack stack : fluidInputs) { stack.writeToPacket(buf); } - buf.writeInt(message.fluidOutputs.size()); + buf.writeInt(fluidOutputs.size()); - for (FluidStack stack : message.fluidOutputs) { + for (FluidStack stack : fluidOutputs) { stack.writeToPacket(buf); } } - public static void handle(GridProcessingTransferMessage message, Supplier ctx) { - Player player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - if (player.containerMenu instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); - - if (grid.getGridType() == GridType.PATTERN) { - BaseItemHandler handler = ((GridNetworkNode) grid).getProcessingMatrix(); - FluidInventory handlerFluid = ((GridNetworkNode) grid).getProcessingMatrixFluids(); - - clearInputsAndOutputs(handler); - clearInputsAndOutputs(handlerFluid); - - setInputs(handler, message.inputs, handlerFluid, message.fluidInputs); - setOutputs(handler, message.outputs, handlerFluid, message.fluidOutputs); - - - ((GridNetworkNode) grid).setProcessingPattern(true); - ((GridNetworkNode) grid).markDirty(); - } - } - }); - } - - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } private static void clearInputsAndOutputs(BaseItemHandler handler) { diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridStackDelta.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridStackDelta.java new file mode 100644 index 0000000000..0bf4904cb3 --- /dev/null +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridStackDelta.java @@ -0,0 +1,6 @@ +package com.refinedmods.refinedstorage.network.grid; + +import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; + +public record GridStackDelta(int change, T stack) { +} diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridTransferMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridTransferMessage.java index a2fec97297..45c08c4e0a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/GridTransferMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/GridTransferMessage.java @@ -1,20 +1,23 @@ package com.refinedmods.refinedstorage.network.grid; - +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.GridType; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.container.GridContainerMenu; import com.refinedmods.refinedstorage.util.StackUtils; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; import java.util.List; -import java.util.function.Supplier; -public class GridTransferMessage { + +public class GridTransferMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "grid_transfer"); + private ItemStack[][] recipe; - List> inputs; + private List> inputs; public GridTransferMessage() { } @@ -39,10 +42,22 @@ public static GridTransferMessage decode(FriendlyByteBuf buf) { return msg; } - public static void encode(GridTransferMessage message, FriendlyByteBuf buf) { + public static void handle(GridTransferMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); + + if (grid.getGridType() == GridType.CRAFTING || grid.getGridType() == GridType.PATTERN) { + grid.onRecipeTransfer(player, message.recipe); + } + } + })); + } - buf.writeInt(message.inputs.size()); - for (List stacks : message.inputs) { + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(inputs.size()); + for (List stacks : inputs) { buf.writeInt(stacks.size()); for (ItemStack possibleStack : stacks) { @@ -51,22 +66,8 @@ public static void encode(GridTransferMessage message, FriendlyByteBuf buf) { } } - - public static void handle(GridTransferMessage message, Supplier ctx) { - Player player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - if (player.containerMenu instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); - - if (grid.getGridType() == GridType.CRAFTING || grid.getGridType() == GridType.PATTERN) { - grid.onRecipeTransfer(player, message.recipe); - } - } - }); - } - - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridFluidDeltaMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridFluidDeltaMessage.java deleted file mode 100644 index 0b7593b388..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridFluidDeltaMessage.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.refinedmods.refinedstorage.network.grid; - -import com.refinedmods.refinedstorage.api.util.StackListResult; -import com.refinedmods.refinedstorage.screen.BaseScreen; -import com.refinedmods.refinedstorage.screen.grid.GridScreen; -import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; -import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; -import com.refinedmods.refinedstorage.util.StackUtils; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.network.NetworkEvent; -import org.apache.commons.lang3.tuple.Pair; - -import java.util.LinkedList; -import java.util.List; -import java.util.function.Supplier; - -public class PortableGridFluidDeltaMessage { - private IPortableGrid portableGrid; - private List> deltas; - - private List> clientDeltas; - - public PortableGridFluidDeltaMessage(IPortableGrid portableGrid, List> deltas) { - this.portableGrid = portableGrid; - this.deltas = deltas; - } - - public PortableGridFluidDeltaMessage(List> clientDeltas) { - this.clientDeltas = clientDeltas; - } - - public static PortableGridFluidDeltaMessage decode(FriendlyByteBuf buf) { - int size = buf.readInt(); - - List> clientDeltas = new LinkedList<>(); - - for (int i = 0; i < size; ++i) { - int delta = buf.readInt(); - - clientDeltas.add(Pair.of(StackUtils.readFluidGridStack(buf), delta)); - } - - return new PortableGridFluidDeltaMessage(clientDeltas); - } - - public static void encode(PortableGridFluidDeltaMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.deltas.size()); - - for (StackListResult delta : message.deltas) { - buf.writeInt(delta.getChange()); - - StackUtils.writeFluidGridStack(buf, delta.getStack(), delta.getId(), null, false, message.portableGrid.getFluidStorageTracker().get(delta.getStack())); - } - } - - public static void handle(PortableGridFluidDeltaMessage message, Supplier ctx) { - BaseScreen.executeLater(GridScreen.class, grid -> { - message.clientDeltas.forEach(p -> grid.getView().postChange(p.getLeft(), p.getRight())); - }); - - ctx.get().setPacketHandled(true); - } -} diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridFluidUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridFluidUpdateMessage.java deleted file mode 100644 index e179f91696..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridFluidUpdateMessage.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.refinedmods.refinedstorage.network.grid; - -import com.refinedmods.refinedstorage.api.util.StackListEntry; -import com.refinedmods.refinedstorage.screen.BaseScreen; -import com.refinedmods.refinedstorage.screen.grid.GridScreen; -import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; -import com.refinedmods.refinedstorage.screen.grid.view.GridViewImpl; -import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; -import com.refinedmods.refinedstorage.util.StackUtils; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.network.NetworkEvent; - -import java.util.ArrayList; -import java.util.List; -import java.util.function.Supplier; - -public class PortableGridFluidUpdateMessage { - private IPortableGrid portableGrid; - - private List stacks = new ArrayList<>(); - - public PortableGridFluidUpdateMessage(List stacks) { - this.stacks = stacks; - } - - public PortableGridFluidUpdateMessage(IPortableGrid portableGrid) { - this.portableGrid = portableGrid; - } - - public static PortableGridFluidUpdateMessage decode(FriendlyByteBuf buf) { - int size = buf.readInt(); - - List stacks = new ArrayList<>(); - - for (int i = 0; i < size; ++i) { - stacks.add(StackUtils.readFluidGridStack(buf)); - } - - return new PortableGridFluidUpdateMessage(stacks); - } - - public static void encode(PortableGridFluidUpdateMessage message, FriendlyByteBuf buf) { - int size = message.portableGrid.getFluidCache().getList().getStacks().size(); - - buf.writeInt(size); - - for (StackListEntry stack : message.portableGrid.getFluidCache().getList().getStacks()) { - StackUtils.writeFluidGridStack(buf, stack.getStack(), stack.getId(), null, false, message.portableGrid.getFluidStorageTracker().get(stack.getStack())); - } - } - - public static void handle(PortableGridFluidUpdateMessage message, Supplier ctx) { - BaseScreen.executeLater(GridScreen.class, grid -> { - grid.setView(new GridViewImpl(grid, GridScreen.getDefaultSorter(), GridScreen.getSorters())); - grid.getView().setStacks(message.stacks); - grid.getView().forceSort(); - }); - - ctx.get().setPacketHandled(true); - } -} diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridItemDeltaMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridItemDeltaMessage.java deleted file mode 100644 index b494bf03ef..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridItemDeltaMessage.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.refinedmods.refinedstorage.network.grid; - -import com.refinedmods.refinedstorage.api.util.StackListResult; -import com.refinedmods.refinedstorage.screen.BaseScreen; -import com.refinedmods.refinedstorage.screen.grid.GridScreen; -import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; -import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; -import com.refinedmods.refinedstorage.util.StackUtils; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; -import org.apache.commons.lang3.tuple.Pair; - -import javax.annotation.Nullable; -import java.util.LinkedList; -import java.util.List; -import java.util.function.Supplier; - -public class PortableGridItemDeltaMessage { - @Nullable - private IPortableGrid portableGrid; - private List> deltas; - - private List> clientDeltas; - - public PortableGridItemDeltaMessage(IPortableGrid portableGrid, List> deltas) { - this.portableGrid = portableGrid; - this.deltas = deltas; - } - - public PortableGridItemDeltaMessage(List> clientDeltas) { - this.clientDeltas = clientDeltas; - } - - public static PortableGridItemDeltaMessage decode(FriendlyByteBuf buf) { - int size = buf.readInt(); - - List> clientDeltas = new LinkedList<>(); - - for (int i = 0; i < size; ++i) { - int delta = buf.readInt(); - - clientDeltas.add(Pair.of(StackUtils.readItemGridStack(buf), delta)); - } - - return new PortableGridItemDeltaMessage(clientDeltas); - } - - public static void encode(PortableGridItemDeltaMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.deltas.size()); - - for (StackListResult delta : message.deltas) { - buf.writeInt(delta.getChange()); - - StackUtils.writeItemGridStack(buf, delta.getStack(), delta.getId(), null, false, message.portableGrid.getItemStorageTracker().get(delta.getStack())); - } - } - - public static void handle(PortableGridItemDeltaMessage message, Supplier ctx) { - BaseScreen.executeLater(GridScreen.class, grid -> { - message.clientDeltas.forEach(p -> grid.getView().postChange(p.getLeft(), p.getRight())); - }); - - ctx.get().setPacketHandled(true); - } -} diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridItemUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridItemUpdateMessage.java deleted file mode 100644 index e816c45350..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridItemUpdateMessage.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.refinedmods.refinedstorage.network.grid; - -import com.refinedmods.refinedstorage.api.util.StackListEntry; -import com.refinedmods.refinedstorage.screen.BaseScreen; -import com.refinedmods.refinedstorage.screen.grid.GridScreen; -import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; -import com.refinedmods.refinedstorage.screen.grid.view.GridViewImpl; -import com.refinedmods.refinedstorage.blockentity.grid.portable.IPortableGrid; -import com.refinedmods.refinedstorage.util.StackUtils; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; - -import java.util.ArrayList; -import java.util.List; -import java.util.function.Supplier; - -public class PortableGridItemUpdateMessage { - private IPortableGrid portableGrid; - - private List stacks = new ArrayList<>(); - - public PortableGridItemUpdateMessage(List stacks) { - this.stacks = stacks; - } - - public PortableGridItemUpdateMessage(IPortableGrid portableGrid) { - this.portableGrid = portableGrid; - } - - public static PortableGridItemUpdateMessage decode(FriendlyByteBuf buf) { - int size = buf.readInt(); - - List stacks = new ArrayList<>(); - - for (int i = 0; i < size; ++i) { - stacks.add(StackUtils.readItemGridStack(buf)); - } - - return new PortableGridItemUpdateMessage(stacks); - } - - public static void encode(PortableGridItemUpdateMessage message, FriendlyByteBuf buf) { - int size = message.portableGrid.getItemCache().getList().getStacks().size(); - - buf.writeInt(size); - - for (StackListEntry stack : message.portableGrid.getItemCache().getList().getStacks()) { - StackUtils.writeItemGridStack(buf, stack.getStack(), stack.getId(), null, false, message.portableGrid.getItemStorageTracker().get(stack.getStack())); - } - } - - public static void handle(PortableGridItemUpdateMessage message, Supplier ctx) { - BaseScreen.executeLater(GridScreen.class, grid -> { - grid.setView(new GridViewImpl(grid, GridScreen.getDefaultSorter(), GridScreen.getSorters())); - grid.getView().setStacks(message.stacks); - grid.getView().forceSort(); - }); - - ctx.get().setPacketHandled(true); - } -} diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridSettingsUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridSettingsUpdateMessage.java index abf5063872..6b62b0c5c9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridSettingsUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/PortableGridSettingsUpdateMessage.java @@ -1,18 +1,20 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.apiimpl.network.node.GridNetworkNode; import com.refinedmods.refinedstorage.container.GridContainerMenu; import com.refinedmods.refinedstorage.blockentity.grid.portable.PortableGrid; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class PortableGridSettingsUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "portable_grid_settings_update"); -public class PortableGridSettingsUpdateMessage { private final int viewType; private final int sortingDirection; private final int sortingType; @@ -43,58 +45,58 @@ public static PortableGridSettingsUpdateMessage decode(FriendlyByteBuf buf) { ); } - public static void encode(PortableGridSettingsUpdateMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.viewType); - buf.writeInt(message.sortingDirection); - buf.writeInt(message.sortingType); - buf.writeInt(message.searchBoxMode); - buf.writeInt(message.size); - buf.writeInt(message.tabSelected); - buf.writeInt(message.tabPage); - } - - public static void handle(PortableGridSettingsUpdateMessage message, Supplier ctx) { - Player player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - if (player.containerMenu instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); - - if (grid instanceof PortableGrid) { - ItemStack stack = ((PortableGrid) grid).getStack(); + public static void handle(PortableGridSettingsUpdateMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); - if (!stack.hasTag()) { - stack.setTag(new CompoundTag()); - } + if (grid instanceof PortableGrid) { + ItemStack stack = ((PortableGrid) grid).getStack(); - if (IGrid.isValidViewType(message.viewType)) { - stack.getTag().putInt(GridNetworkNode.NBT_VIEW_TYPE, message.viewType); - } + if (!stack.hasTag()) { + stack.setTag(new CompoundTag()); + } - if (IGrid.isValidSortingDirection(message.sortingDirection)) { - stack.getTag().putInt(GridNetworkNode.NBT_SORTING_DIRECTION, message.sortingDirection); - } + if (IGrid.isValidViewType(message.viewType)) { + stack.getTag().putInt(GridNetworkNode.NBT_VIEW_TYPE, message.viewType); + } - if (IGrid.isValidSortingType(message.sortingType)) { - stack.getTag().putInt(GridNetworkNode.NBT_SORTING_TYPE, message.sortingType); - } + if (IGrid.isValidSortingDirection(message.sortingDirection)) { + stack.getTag().putInt(GridNetworkNode.NBT_SORTING_DIRECTION, message.sortingDirection); + } - if (IGrid.isValidSearchBoxMode(message.searchBoxMode)) { - stack.getTag().putInt(GridNetworkNode.NBT_SEARCH_BOX_MODE, message.searchBoxMode); - } + if (IGrid.isValidSortingType(message.sortingType)) { + stack.getTag().putInt(GridNetworkNode.NBT_SORTING_TYPE, message.sortingType); + } - if (IGrid.isValidSize(message.size)) { - stack.getTag().putInt(GridNetworkNode.NBT_SIZE, message.size); - } + if (IGrid.isValidSearchBoxMode(message.searchBoxMode)) { + stack.getTag().putInt(GridNetworkNode.NBT_SEARCH_BOX_MODE, message.searchBoxMode); + } - stack.getTag().putInt(GridNetworkNode.NBT_TAB_SELECTED, message.tabSelected); - stack.getTag().putInt(GridNetworkNode.NBT_TAB_PAGE, message.tabPage); + if (IGrid.isValidSize(message.size)) { + stack.getTag().putInt(GridNetworkNode.NBT_SIZE, message.size); } + + stack.getTag().putInt(GridNetworkNode.NBT_TAB_SELECTED, message.tabSelected); + stack.getTag().putInt(GridNetworkNode.NBT_TAB_PAGE, message.tabPage); } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(viewType); + buf.writeInt(sortingDirection); + buf.writeInt(sortingType); + buf.writeInt(searchBoxMode); + buf.writeInt(size); + buf.writeInt(tabSelected); + buf.writeInt(tabPage); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/WirelessFluidGridSettingsUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/WirelessFluidGridSettingsUpdateMessage.java index 45ee1950a3..d94e5cd2c8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/WirelessFluidGridSettingsUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/WirelessFluidGridSettingsUpdateMessage.java @@ -1,17 +1,19 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.apiimpl.network.node.GridNetworkNode; import com.refinedmods.refinedstorage.container.GridContainerMenu; import com.refinedmods.refinedstorage.blockentity.grid.WirelessFluidGrid; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class WirelessFluidGridSettingsUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "wireless_fluid_grid_settings_update"); -public class WirelessFluidGridSettingsUpdateMessage { private final int sortingDirection; private final int sortingType; private final int searchBoxMode; @@ -39,49 +41,49 @@ public static WirelessFluidGridSettingsUpdateMessage decode(FriendlyByteBuf buf) ); } - public static void encode(WirelessFluidGridSettingsUpdateMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.sortingDirection); - buf.writeInt(message.sortingType); - buf.writeInt(message.searchBoxMode); - buf.writeInt(message.size); - buf.writeInt(message.tabSelected); - buf.writeInt(message.tabPage); - } - - public static void handle(WirelessFluidGridSettingsUpdateMessage message, Supplier ctx) { - Player player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - if (player.containerMenu instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); + public static void handle(WirelessFluidGridSettingsUpdateMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); - if (grid instanceof WirelessFluidGrid) { - ItemStack stack = ((WirelessFluidGrid) grid).getStack(); + if (grid instanceof WirelessFluidGrid) { + ItemStack stack = ((WirelessFluidGrid) grid).getStack(); - if (IGrid.isValidSortingDirection(message.sortingDirection)) { - stack.getTag().putInt(GridNetworkNode.NBT_SORTING_DIRECTION, message.sortingDirection); - } - - if (IGrid.isValidSortingType(message.sortingType)) { - stack.getTag().putInt(GridNetworkNode.NBT_SORTING_TYPE, message.sortingType); - } + if (IGrid.isValidSortingDirection(message.sortingDirection)) { + stack.getTag().putInt(GridNetworkNode.NBT_SORTING_DIRECTION, message.sortingDirection); + } - if (IGrid.isValidSearchBoxMode(message.searchBoxMode)) { - stack.getTag().putInt(GridNetworkNode.NBT_SEARCH_BOX_MODE, message.searchBoxMode); - } + if (IGrid.isValidSortingType(message.sortingType)) { + stack.getTag().putInt(GridNetworkNode.NBT_SORTING_TYPE, message.sortingType); + } - if (IGrid.isValidSize(message.size)) { - stack.getTag().putInt(GridNetworkNode.NBT_SIZE, message.size); - } + if (IGrid.isValidSearchBoxMode(message.searchBoxMode)) { + stack.getTag().putInt(GridNetworkNode.NBT_SEARCH_BOX_MODE, message.searchBoxMode); + } - stack.getTag().putInt(GridNetworkNode.NBT_TAB_SELECTED, message.tabSelected); - stack.getTag().putInt(GridNetworkNode.NBT_TAB_PAGE, message.tabPage); + if (IGrid.isValidSize(message.size)) { + stack.getTag().putInt(GridNetworkNode.NBT_SIZE, message.size); } + + stack.getTag().putInt(GridNetworkNode.NBT_TAB_SELECTED, message.tabSelected); + stack.getTag().putInt(GridNetworkNode.NBT_TAB_PAGE, message.tabPage); } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(sortingDirection); + buf.writeInt(sortingType); + buf.writeInt(searchBoxMode); + buf.writeInt(size); + buf.writeInt(tabSelected); + buf.writeInt(tabPage); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/grid/WirelessGridSettingsUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/grid/WirelessGridSettingsUpdateMessage.java index cde42562a6..2cbfdb1383 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/grid/WirelessGridSettingsUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/grid/WirelessGridSettingsUpdateMessage.java @@ -1,18 +1,20 @@ package com.refinedmods.refinedstorage.network.grid; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.apiimpl.network.node.GridNetworkNode; import com.refinedmods.refinedstorage.container.GridContainerMenu; import com.refinedmods.refinedstorage.blockentity.grid.WirelessGrid; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class WirelessGridSettingsUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "wireless_grid_settings_update"); -public class WirelessGridSettingsUpdateMessage { private final int viewType; private final int sortingDirection; private final int sortingType; @@ -43,58 +45,58 @@ public static WirelessGridSettingsUpdateMessage decode(FriendlyByteBuf buf) { ); } - public static void encode(WirelessGridSettingsUpdateMessage message, FriendlyByteBuf buf) { - buf.writeInt(message.viewType); - buf.writeInt(message.sortingDirection); - buf.writeInt(message.sortingType); - buf.writeInt(message.searchBoxMode); - buf.writeInt(message.size); - buf.writeInt(message.tabSelected); - buf.writeInt(message.tabPage); - } - - public static void handle(WirelessGridSettingsUpdateMessage message, Supplier ctx) { - Player player = ctx.get().getSender(); - - if (player != null) { - ctx.get().enqueueWork(() -> { - if (player.containerMenu instanceof GridContainerMenu) { - IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); - - if (grid instanceof WirelessGrid) { - ItemStack stack = ((WirelessGrid) grid).getStack(); + public static void handle(WirelessGridSettingsUpdateMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof GridContainerMenu) { + IGrid grid = ((GridContainerMenu) player.containerMenu).getGrid(); - if (!stack.hasTag()) { - stack.setTag(new CompoundTag()); - } + if (grid instanceof WirelessGrid) { + ItemStack stack = ((WirelessGrid) grid).getStack(); - if (IGrid.isValidViewType(message.viewType)) { - stack.getTag().putInt(GridNetworkNode.NBT_VIEW_TYPE, message.viewType); - } + if (!stack.hasTag()) { + stack.setTag(new CompoundTag()); + } - if (IGrid.isValidSortingDirection(message.sortingDirection)) { - stack.getTag().putInt(GridNetworkNode.NBT_SORTING_DIRECTION, message.sortingDirection); - } + if (IGrid.isValidViewType(message.viewType)) { + stack.getTag().putInt(GridNetworkNode.NBT_VIEW_TYPE, message.viewType); + } - if (IGrid.isValidSortingType(message.sortingType)) { - stack.getTag().putInt(GridNetworkNode.NBT_SORTING_TYPE, message.sortingType); - } + if (IGrid.isValidSortingDirection(message.sortingDirection)) { + stack.getTag().putInt(GridNetworkNode.NBT_SORTING_DIRECTION, message.sortingDirection); + } - if (IGrid.isValidSearchBoxMode(message.searchBoxMode)) { - stack.getTag().putInt(GridNetworkNode.NBT_SEARCH_BOX_MODE, message.searchBoxMode); - } + if (IGrid.isValidSortingType(message.sortingType)) { + stack.getTag().putInt(GridNetworkNode.NBT_SORTING_TYPE, message.sortingType); + } - if (IGrid.isValidSize(message.size)) { - stack.getTag().putInt(GridNetworkNode.NBT_SIZE, message.size); - } + if (IGrid.isValidSearchBoxMode(message.searchBoxMode)) { + stack.getTag().putInt(GridNetworkNode.NBT_SEARCH_BOX_MODE, message.searchBoxMode); + } - stack.getTag().putInt(GridNetworkNode.NBT_TAB_SELECTED, message.tabSelected); - stack.getTag().putInt(GridNetworkNode.NBT_TAB_PAGE, message.tabPage); + if (IGrid.isValidSize(message.size)) { + stack.getTag().putInt(GridNetworkNode.NBT_SIZE, message.size); } + + stack.getTag().putInt(GridNetworkNode.NBT_TAB_SELECTED, message.tabSelected); + stack.getTag().putInt(GridNetworkNode.NBT_TAB_PAGE, message.tabPage); } - }); - } + } + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeInt(viewType); + buf.writeInt(sortingDirection); + buf.writeInt(sortingType); + buf.writeInt(searchBoxMode); + buf.writeInt(size); + buf.writeInt(tabSelected); + buf.writeInt(tabPage); + } - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParameterMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParameterMessage.java index bfd900675f..a22ea45801 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParameterMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParameterMessage.java @@ -1,50 +1,50 @@ package com.refinedmods.refinedstorage.network.sync; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationManager; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.Supplier; +public class BlockEntitySynchronizationParameterMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "sync_param"); -public class BlockEntitySynchronizationParameterMessage { - private final BlockEntity blockEntity; - private final BlockEntitySynchronizationParameter parameter; + private final BlockEntitySynchronizationParameter parameter; + private final T value; private final boolean initial; - public BlockEntitySynchronizationParameterMessage(BlockEntity blockEntity, BlockEntitySynchronizationParameter parameter, boolean initial) { - this.blockEntity = blockEntity; + public BlockEntitySynchronizationParameterMessage(BlockEntitySynchronizationParameter parameter, + T value, + boolean initial) { this.parameter = parameter; + this.value = value; this.initial = initial; } public static BlockEntitySynchronizationParameterMessage decode(FriendlyByteBuf buf) { ResourceLocation id = buf.readResourceLocation(); boolean initial = buf.readBoolean(); - BlockEntitySynchronizationParameter parameter = BlockEntitySynchronizationManager.getParameter(id); - - if (parameter != null) { - try { - parameter.setValue(initial, parameter.getSerializer().read(buf)); - } catch (Exception e) { - // NO OP - } - } - - return new BlockEntitySynchronizationParameterMessage(null, null, initial); + return new BlockEntitySynchronizationParameterMessage(parameter, parameter.getSerializer().read(buf), initial); } - public static void encode(BlockEntitySynchronizationParameterMessage message, FriendlyByteBuf buf) { - buf.writeResourceLocation(message.parameter.getId()); - buf.writeBoolean(message.initial); + public static void handle(BlockEntitySynchronizationParameterMessage msg, PlayPayloadContext ctx) { + msg.parameter.setValue(msg.initial, msg.value); + } - message.parameter.getSerializer().write(buf, message.parameter.getValueProducer().apply(message.blockEntity)); + @Override + public void write(FriendlyByteBuf buf) { + buf.writeResourceLocation(parameter.getId()); + buf.writeBoolean(initial); + parameter.getSerializer().write(buf, value); } - public static void handle(Supplier ctx) { - ctx.get().setPacketHandled(true); + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParamaterUpdateMessage.java b/src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParameterUpdateMessage.java similarity index 52% rename from src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParamaterUpdateMessage.java rename to src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParameterUpdateMessage.java index 5f539d67f0..cc3651fa02 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParamaterUpdateMessage.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/sync/BlockEntitySynchronizationParameterUpdateMessage.java @@ -1,26 +1,29 @@ package com.refinedmods.refinedstorage.network.sync; +import com.refinedmods.refinedstorage.RS; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationManager; import com.refinedmods.refinedstorage.blockentity.data.BlockEntitySynchronizationParameter; import com.refinedmods.refinedstorage.container.BaseContainerMenu; + +import java.util.function.BiConsumer; + import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.inventory.AbstractContainerMenu; -import net.minecraftforge.network.NetworkEvent; +import net.neoforged.neoforge.network.handling.PlayPayloadContext; -import java.util.function.BiConsumer; -import java.util.function.Supplier; +public class BlockEntitySynchronizationParameterUpdateMessage implements CustomPacketPayload { + public static final ResourceLocation ID = new ResourceLocation(RS.ID, "sync_param_update"); -public class BlockEntitySynchronizationParamaterUpdateMessage { private final BlockEntitySynchronizationParameter parameter; private final Object value; - public BlockEntitySynchronizationParamaterUpdateMessage(BlockEntitySynchronizationParameter parameter, Object value) { + public BlockEntitySynchronizationParameterUpdateMessage(BlockEntitySynchronizationParameter parameter, Object value) { this.parameter = parameter; this.value = value; } - public static BlockEntitySynchronizationParamaterUpdateMessage decode(FriendlyByteBuf buf) { + public static BlockEntitySynchronizationParameterUpdateMessage decode(FriendlyByteBuf buf) { ResourceLocation id = buf.readResourceLocation(); BlockEntitySynchronizationParameter parameter = BlockEntitySynchronizationManager.getParameter(id); @@ -34,27 +37,30 @@ public static BlockEntitySynchronizationParamaterUpdateMessage decode(FriendlyBy } } - return new BlockEntitySynchronizationParamaterUpdateMessage(parameter, value); - } - - public static void encode(BlockEntitySynchronizationParamaterUpdateMessage message, FriendlyByteBuf buf) { - buf.writeResourceLocation(message.parameter.getId()); - - message.parameter.getSerializer().write(buf, message.value); + return new BlockEntitySynchronizationParameterUpdateMessage(parameter, value); } - public static void handle(BlockEntitySynchronizationParamaterUpdateMessage message, Supplier ctx) { - ctx.get().enqueueWork(() -> { - AbstractContainerMenu c = ctx.get().getSender().containerMenu; - - if (c instanceof BaseContainerMenu) { + public static void handle(BlockEntitySynchronizationParameterUpdateMessage message, PlayPayloadContext ctx) { + ctx.player().ifPresent(player -> ctx.workHandler().submitAsync(() -> { + if (player.containerMenu instanceof BaseContainerMenu baseContainerMenu) { BiConsumer consumer = message.parameter.getValueConsumer(); if (consumer != null) { - consumer.accept(((BaseContainerMenu) c).getBlockEntity(), message.value); + consumer.accept(baseContainerMenu.getBlockEntity(), message.value); } } - }); - ctx.get().setPacketHandled(true); + })); + } + + @Override + public void write(FriendlyByteBuf buf) { + buf.writeResourceLocation(parameter.getId()); + + parameter.getSerializer().write(buf, value); + } + + @Override + public ResourceLocation id() { + return ID; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/recipe/CoverRecipe.java b/src/main/java/com/refinedmods/refinedstorage/recipe/CoverRecipe.java index 7da3b22bb4..feb4300b2a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/recipe/CoverRecipe.java +++ b/src/main/java/com/refinedmods/refinedstorage/recipe/CoverRecipe.java @@ -14,15 +14,14 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.SimpleCraftingRecipeSerializer; import net.minecraft.world.level.Level; -import net.minecraftforge.common.Tags; - +import net.neoforged.neoforge.common.Tags; import java.util.List; public class CoverRecipe extends CustomRecipe { public static RecipeSerializer SERIALIZER = new SimpleCraftingRecipeSerializer<>(CoverRecipe::new); - public CoverRecipe(ResourceLocation id, CraftingBookCategory category) { - super(id, category); + public CoverRecipe(CraftingBookCategory category) { + super(category); } public static boolean stackMatches(ItemStack first) { diff --git a/src/main/java/com/refinedmods/refinedstorage/recipe/HollowCoverRecipe.java b/src/main/java/com/refinedmods/refinedstorage/recipe/HollowCoverRecipe.java index 7378cf8098..e5187eacdc 100644 --- a/src/main/java/com/refinedmods/refinedstorage/recipe/HollowCoverRecipe.java +++ b/src/main/java/com/refinedmods/refinedstorage/recipe/HollowCoverRecipe.java @@ -19,8 +19,8 @@ public class HollowCoverRecipe extends CustomRecipe { public static RecipeSerializer SERIALIZER = new SimpleCraftingRecipeSerializer<>(HollowCoverRecipe::new); - public HollowCoverRecipe(ResourceLocation id, CraftingBookCategory category) { - super(id, category); + public HollowCoverRecipe(CraftingBookCategory category) { + super(category); } public static boolean stackMatches(ItemStack first) { diff --git a/src/main/java/com/refinedmods/refinedstorage/recipe/UpgradeWithEnchantedBookRecipe.java b/src/main/java/com/refinedmods/refinedstorage/recipe/UpgradeWithEnchantedBookRecipe.java index fa92ba5d7f..790e821769 100644 --- a/src/main/java/com/refinedmods/refinedstorage/recipe/UpgradeWithEnchantedBookRecipe.java +++ b/src/main/java/com/refinedmods/refinedstorage/recipe/UpgradeWithEnchantedBookRecipe.java @@ -2,30 +2,58 @@ import com.refinedmods.refinedstorage.RSItems; import com.refinedmods.refinedstorage.item.UpgradeItem; + +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.core.Holder; import net.minecraft.core.NonNullList; +import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; +import net.minecraft.resources.RegistryFixedCodec; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.EnchantedBookItem; +import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.CraftingBookCategory; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.ShapedRecipe; +import net.minecraft.world.item.crafting.ShapedRecipePattern; import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraft.world.item.enchantment.EnchantmentInstance; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; -import net.minecraftforge.registries.ForgeRegistries; public class UpgradeWithEnchantedBookRecipe extends ShapedRecipe { - private final EnchantmentInstance enchant; - private final ItemStack result; + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + RegistryFixedCodec.create(Registries.ENCHANTMENT).fieldOf("enchantment") + .forGetter(UpgradeWithEnchantedBookRecipe::getEnchantment), + Codec.INT.fieldOf("level").orElse(1) + .forGetter(UpgradeWithEnchantedBookRecipe::getEnchantmentLevel), + RegistryFixedCodec.create(Registries.ITEM).fieldOf("result") + .forGetter(UpgradeWithEnchantedBookRecipe::getResultItem) + ).apply(instance, UpgradeWithEnchantedBookRecipe::new) + ); + + private final Holder enchantment; + private final int level; + private final Holder resultItem; - public UpgradeWithEnchantedBookRecipe(ResourceLocation recipeId, Enchantment enchantment, int enchantmentLevel, ItemStack result) { - super(recipeId, "", CraftingBookCategory.MISC, 3, 3, NonNullList.of(Ingredient.EMPTY, + UpgradeWithEnchantedBookRecipe(final Holder enchantment, + final int level, + final Holder resultItem) { + super("", CraftingBookCategory.MISC, new ShapedRecipePattern(3, 3, NonNullList.of( + Ingredient.EMPTY, Ingredient.of(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())), - Ingredient.of(EnchantedBookItem.createForEnchantment(new EnchantmentInstance(enchantment, enchantmentLevel))), + Ingredient.of(EnchantedBookItem.createForEnchantment(new EnchantmentInstance(enchantment.value(), level))), Ingredient.of(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())), Ingredient.of(new ItemStack(Blocks.BOOKSHELF)), Ingredient.of(new ItemStack(RSItems.UPGRADE_ITEMS.get(UpgradeItem.Type.NORMAL).get())), @@ -33,36 +61,43 @@ public UpgradeWithEnchantedBookRecipe(ResourceLocation recipeId, Enchantment enc Ingredient.of(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())), Ingredient.of(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())), Ingredient.of(new ItemStack(RSItems.QUARTZ_ENRICHED_IRON.get())) - ), result); - - this.enchant = new EnchantmentInstance(enchantment, enchantmentLevel); - this.result = result; + ), Optional.empty()), new ItemStack(resultItem.value())); + this.enchantment = enchantment; + this.level = level; + this.resultItem = resultItem; } - public EnchantmentInstance getEnchant() { - return enchant; + public Holder getResultItem() { + return resultItem; } - public ItemStack getResult() { - return result; + public Holder getEnchantment() { + return enchantment; } - @Override - public boolean matches(CraftingContainer craftingContainer, Level level) { - if (super.matches(craftingContainer, level)) { - ListTag enchantments = EnchantedBookItem.getEnchantments(craftingContainer.getItem(1)); + @Nullable + public ResourceLocation getEnchantmentId() { + return enchantment.unwrapKey().map(ResourceKey::location).orElse(null); + } - for (int i = 0; i < enchantments.size(); ++i) { - CompoundTag enchantmentNbt = enchantments.getCompound(i); + public int getEnchantmentLevel() { + return level; + } - // @Volatile: NBT tags from EnchantedBookItem - if (ForgeRegistries.ENCHANTMENTS.getValue(new ResourceLocation(enchantmentNbt.getString("id"))) == enchant.enchantment && - enchantmentNbt.getShort("lvl") == enchant.level) { - return true; - } + @Override + public boolean matches(final CraftingContainer craftingContainer, final Level theLevel) { + if (!super.matches(craftingContainer, theLevel)) { + return false; + } + final ListTag enchantments = EnchantedBookItem.getEnchantments(craftingContainer.getItem(1)); + for (int i = 0; i < enchantments.size(); ++i) { + final CompoundTag tag = enchantments.getCompound(i); + final int containerLevel = EnchantmentHelper.getEnchantmentLevel(tag); + final ResourceLocation containerEnchantment = EnchantmentHelper.getEnchantmentId(tag); + if (Objects.equals(containerEnchantment, getEnchantmentId()) && containerLevel == level) { + return true; } } - return false; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/recipe/UpgradeWithEnchantedBookRecipeSerializer.java b/src/main/java/com/refinedmods/refinedstorage/recipe/UpgradeWithEnchantedBookRecipeSerializer.java index 3136665fbe..af665362a6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/recipe/UpgradeWithEnchantedBookRecipeSerializer.java +++ b/src/main/java/com/refinedmods/refinedstorage/recipe/UpgradeWithEnchantedBookRecipeSerializer.java @@ -1,45 +1,41 @@ package com.refinedmods.refinedstorage.recipe; -import com.google.gson.JsonObject; +import java.util.Objects; + +import com.mojang.serialization.Codec; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.item.Item; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.enchantment.Enchantment; -import net.minecraftforge.registries.ForgeRegistries; - -import javax.annotation.Nullable; public class UpgradeWithEnchantedBookRecipeSerializer implements RecipeSerializer { @Override - public UpgradeWithEnchantedBookRecipe fromJson(ResourceLocation recipeId, JsonObject json) { - JsonObject enchantmentInfo = json.getAsJsonObject("enchantment"); - - ItemStack result = new ItemStack(ForgeRegistries.ITEMS.getValue(new ResourceLocation(json.getAsJsonPrimitive("result").getAsString()))); - Enchantment enchantment = ForgeRegistries.ENCHANTMENTS.getValue(new ResourceLocation(enchantmentInfo.getAsJsonPrimitive("id").getAsString())); - - int level = 1; - if (enchantmentInfo.has("level")) { - level = enchantmentInfo.getAsJsonPrimitive("level").getAsInt(); - } - - return new UpgradeWithEnchantedBookRecipe(recipeId, enchantment, level, result); + public Codec codec() { + return UpgradeWithEnchantedBookRecipe.CODEC; } - @Nullable @Override - public UpgradeWithEnchantedBookRecipe fromNetwork(ResourceLocation recipeId, FriendlyByteBuf buffer) { - ItemStack result = buffer.readItem(); - Enchantment enchantment = ForgeRegistries.ENCHANTMENTS.getValue(buffer.readResourceLocation()); - int level = buffer.readInt(); - - return new UpgradeWithEnchantedBookRecipe(recipeId, enchantment, level, result); + public UpgradeWithEnchantedBookRecipe fromNetwork(final FriendlyByteBuf buf) { + final Holder result = BuiltInRegistries.ITEM.getHolder(ResourceKey.create( + Registries.ITEM, + buf.readResourceLocation() + )).orElseThrow(); + final Holder enchantment = BuiltInRegistries.ENCHANTMENT.getHolder(ResourceKey.create( + Registries.ENCHANTMENT, + buf.readResourceLocation() + )).orElseThrow(); + final int level = buf.readInt(); + return new UpgradeWithEnchantedBookRecipe(enchantment, level, result); } @Override - public void toNetwork(FriendlyByteBuf buffer, UpgradeWithEnchantedBookRecipe recipe) { - buffer.writeItem(recipe.getResult()); - buffer.writeResourceLocation(ForgeRegistries.ENCHANTMENTS.getKey(recipe.getEnchant().enchantment)); - buffer.writeInt(recipe.getEnchant().level); + public void toNetwork(final FriendlyByteBuf buf, final UpgradeWithEnchantedBookRecipe recipe) { + buf.writeResourceLocation(recipe.getResultItem().unwrapKey().orElseThrow().location()); + buf.writeResourceLocation(Objects.requireNonNull(recipe.getEnchantmentId())); + buf.writeInt(recipe.getEnchantmentLevel()); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/render/FluidRenderer.java b/src/main/java/com/refinedmods/refinedstorage/render/FluidRenderer.java index 023cc11cdf..33ebddb3c8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/FluidRenderer.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/FluidRenderer.java @@ -9,9 +9,9 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.InventoryMenu; import net.minecraft.world.level.material.Fluid; -import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; +import net.neoforged.neoforge.client.extensions.common.IClientFluidTypeExtensions; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; import org.joml.Matrix4f; import javax.annotation.Nullable; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/blockentity/PatternItemBlockEntityRenderer.java b/src/main/java/com/refinedmods/refinedstorage/render/blockentity/PatternItemBlockEntityRenderer.java index 0e89fc512c..8e271925e9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/blockentity/PatternItemBlockEntityRenderer.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/blockentity/PatternItemBlockEntityRenderer.java @@ -10,7 +10,7 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.client.extensions.common.IClientItemExtensions; +import net.neoforged.neoforge.client.extensions.common.IClientItemExtensions; public class PatternItemBlockEntityRenderer extends BlockEntityWithoutLevelRenderer { private static PatternItemBlockEntityRenderer instance; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/blockentity/StorageMonitorBlockEntityRenderer.java b/src/main/java/com/refinedmods/refinedstorage/render/blockentity/StorageMonitorBlockEntityRenderer.java index 46b4e429ee..e6b3f5fd66 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/blockentity/StorageMonitorBlockEntityRenderer.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/blockentity/StorageMonitorBlockEntityRenderer.java @@ -24,9 +24,9 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; -import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; -import net.minecraftforge.common.util.TransformationHelper; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.client.extensions.common.IClientFluidTypeExtensions; +import net.neoforged.neoforge.common.util.TransformationHelper; +import net.neoforged.neoforge.fluids.FluidStack; import org.joml.Vector3f; public class StorageMonitorBlockEntityRenderer implements BlockEntityRenderer { diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/CubeBuilder.java b/src/main/java/com/refinedmods/refinedstorage/render/model/CubeBuilder.java index 51f880446d..6d4e7b90f0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/CubeBuilder.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/CubeBuilder.java @@ -3,7 +3,7 @@ import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.core.Direction; -import net.minecraftforge.client.model.pipeline.QuadBakingVertexConsumer; +import net.neoforged.neoforge.client.model.pipeline.QuadBakingVertexConsumer; import org.joml.Vector3f; import java.util.ArrayList; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/DiskDriveGeometryLoader.java b/src/main/java/com/refinedmods/refinedstorage/render/model/DiskDriveGeometryLoader.java index 79c4d33506..f4e058cbfd 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/DiskDriveGeometryLoader.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/DiskDriveGeometryLoader.java @@ -2,7 +2,7 @@ import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; -import net.minecraftforge.client.model.geometry.IGeometryLoader; +import net.neoforged.neoforge.client.model.geometry.IGeometryLoader; public class DiskDriveGeometryLoader implements IGeometryLoader { @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/DiskDriveUnbakedGeometry.java b/src/main/java/com/refinedmods/refinedstorage/render/model/DiskDriveUnbakedGeometry.java index e173918889..29c88fb1fd 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/DiskDriveUnbakedGeometry.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/DiskDriveUnbakedGeometry.java @@ -9,9 +9,9 @@ import net.minecraft.client.resources.model.*; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.client.model.SimpleModelState; -import net.minecraftforge.client.model.geometry.IGeometryBakingContext; -import net.minecraftforge.client.model.geometry.IUnbakedGeometry; +import net.neoforged.neoforge.client.model.SimpleModelState; +import net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext; +import net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry; import org.joml.Vector3f; import java.util.Objects; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/DiskManipulatorGeometryLoader.java b/src/main/java/com/refinedmods/refinedstorage/render/model/DiskManipulatorGeometryLoader.java index a06d17dba6..f0aea4f3ef 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/DiskManipulatorGeometryLoader.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/DiskManipulatorGeometryLoader.java @@ -2,7 +2,7 @@ import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; -import net.minecraftforge.client.model.geometry.IGeometryLoader; +import net.neoforged.neoforge.client.model.geometry.IGeometryLoader; public class DiskManipulatorGeometryLoader implements IGeometryLoader { @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/DiskManipulatorUnbakedGeometry.java b/src/main/java/com/refinedmods/refinedstorage/render/model/DiskManipulatorUnbakedGeometry.java index fac5c0d282..9587888fca 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/DiskManipulatorUnbakedGeometry.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/DiskManipulatorUnbakedGeometry.java @@ -10,12 +10,11 @@ import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.DyeColor; -import net.minecraftforge.client.RenderTypeGroup; -import net.minecraftforge.client.model.SimpleModelState; -import net.minecraftforge.client.model.geometry.IGeometryBakingContext; -import net.minecraftforge.client.model.geometry.IUnbakedGeometry; +import net.neoforged.neoforge.client.RenderTypeGroup; +import net.neoforged.neoforge.client.model.SimpleModelState; +import net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext; +import net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry; import org.joml.Vector3f; - import java.util.HashMap; import java.util.Map; import java.util.Objects; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/PortableGridGeometryLoader.java b/src/main/java/com/refinedmods/refinedstorage/render/model/PortableGridGeometryLoader.java index 453081fc23..bbcef08420 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/PortableGridGeometryLoader.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/PortableGridGeometryLoader.java @@ -2,7 +2,7 @@ import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonObject; -import net.minecraftforge.client.model.geometry.IGeometryLoader; +import net.neoforged.neoforge.client.model.geometry.IGeometryLoader; public class PortableGridGeometryLoader implements IGeometryLoader { @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/PortableGridUnbakedGeometry.java b/src/main/java/com/refinedmods/refinedstorage/render/model/PortableGridUnbakedGeometry.java index 3eb17004de..128473c76c 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/PortableGridUnbakedGeometry.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/PortableGridUnbakedGeometry.java @@ -9,11 +9,10 @@ import net.minecraft.client.resources.model.*; import net.minecraft.core.Direction; import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.client.RenderTypeGroup; -import net.minecraftforge.client.model.SimpleModelState; -import net.minecraftforge.client.model.geometry.IGeometryBakingContext; -import net.minecraftforge.client.model.geometry.IUnbakedGeometry; - +import net.neoforged.neoforge.client.RenderTypeGroup; +import net.neoforged.neoforge.client.model.SimpleModelState; +import net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext; +import net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry; import java.util.Objects; import java.util.function.Function; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/CableCoverBakedModel.java b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/CableCoverBakedModel.java index 57c3e63e43..2a222ed65f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/CableCoverBakedModel.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/CableCoverBakedModel.java @@ -19,8 +19,8 @@ import net.minecraft.util.RandomSource; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; -import net.minecraftforge.client.model.BakedModelWrapper; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.BakedModelWrapper; +import net.neoforged.neoforge.client.model.data.ModelData; import org.joml.Vector3f; import javax.annotation.Nonnull; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/DiskDriveBakedModel.java b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/DiskDriveBakedModel.java index 78e0a1efa6..b3200f63a7 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/DiskDriveBakedModel.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/DiskDriveBakedModel.java @@ -12,8 +12,8 @@ import net.minecraft.core.Direction; import net.minecraft.util.RandomSource; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.BakedModelWrapper; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.model.BakedModelWrapper; +import net.neoforged.neoforge.client.model.data.ModelData; import org.joml.Vector3f; import javax.annotation.Nonnull; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/DiskManipulatorBakedModel.java b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/DiskManipulatorBakedModel.java index 41926c6e04..31f37c2ed8 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/DiskManipulatorBakedModel.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/DiskManipulatorBakedModel.java @@ -16,12 +16,11 @@ import net.minecraft.util.RandomSource; import net.minecraft.world.item.DyeColor; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.ChunkRenderTypeSet; -import net.minecraftforge.client.RenderTypeGroup; -import net.minecraftforge.client.model.BakedModelWrapper; -import net.minecraftforge.client.model.data.ModelData; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.RenderTypeGroup; +import net.neoforged.neoforge.client.model.BakedModelWrapper; +import net.neoforged.neoforge.client.model.data.ModelData; import org.joml.Vector3f; - import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PatternBakedModel.java b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PatternBakedModel.java index c7960d7282..5975f26c18 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PatternBakedModel.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PatternBakedModel.java @@ -11,8 +11,7 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.client.model.BakedModelWrapper; - +import net.neoforged.neoforge.client.model.BakedModelWrapper; import javax.annotation.Nullable; public class PatternBakedModel extends BakedModelWrapper { diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PortableGridBakedModel.java b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PortableGridBakedModel.java index 5a41248ca4..ee72d220e6 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PortableGridBakedModel.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PortableGridBakedModel.java @@ -18,11 +18,10 @@ import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.ChunkRenderTypeSet; -import net.minecraftforge.client.RenderTypeGroup; -import net.minecraftforge.client.model.BakedModelWrapper; -import net.minecraftforge.client.model.data.ModelData; - +import net.neoforged.neoforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.RenderTypeGroup; +import net.neoforged.neoforge.client.model.BakedModelWrapper; +import net.neoforged.neoforge.client.model.data.ModelData; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PortableGridItemBakedModel.java b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PortableGridItemBakedModel.java index 266fb8b10a..1e05ae11e3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PortableGridItemBakedModel.java +++ b/src/main/java/com/refinedmods/refinedstorage/render/model/baked/PortableGridItemBakedModel.java @@ -6,8 +6,7 @@ import net.minecraft.core.Direction; import net.minecraft.util.RandomSource; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.BakedModelWrapper; - +import net.neoforged.neoforge.client.model.BakedModelWrapper; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/AmountSpecifyingScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/AmountSpecifyingScreen.java index 5d1e2095e1..7de1aa5e4f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/AmountSpecifyingScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/AmountSpecifyingScreen.java @@ -184,14 +184,14 @@ protected void onOkButtonPressed(boolean shiftDown) { } @Override - public boolean mouseScrolled(double x, double y, double delta) { + public boolean mouseScrolled(double x, double y, double z, double delta) { if (delta > 0) { onIncrementButtonClicked(1); } else { onIncrementButtonClicked(-1); } - return super.mouseScrolled(x, y, delta); + return super.mouseScrolled(x, y, z, delta); } public void close() { diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/BaseScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/BaseScreen.java index 4e56679ba6..718cfc7ec9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/BaseScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/BaseScreen.java @@ -9,7 +9,6 @@ import com.refinedmods.refinedstorage.render.FluidRenderer; import com.refinedmods.refinedstorage.render.RenderSettings; import com.refinedmods.refinedstorage.screen.grid.AlternativesScreen; -import com.refinedmods.refinedstorage.screen.widget.CheckboxWidget; import com.refinedmods.refinedstorage.screen.widget.sidebutton.SideButton; import com.refinedmods.refinedstorage.util.RenderUtils; import net.minecraft.client.KeyMapping; @@ -17,8 +16,8 @@ import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.components.Checkbox; -import net.minecraft.client.gui.components.Renderable; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -26,8 +25,7 @@ import net.minecraft.world.inventory.ClickType; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.registries.ForgeRegistries; +import net.neoforged.neoforge.fluids.FluidStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.lwjgl.opengl.GL11; @@ -114,7 +112,7 @@ protected void containerTick() { @Override public void render(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) { - renderBackground(graphics); + renderBackground(graphics, mouseX, mouseY, partialTicks); super.render(graphics, mouseX, mouseY, partialTicks); @@ -235,8 +233,13 @@ protected void slotClicked(Slot slot, int slotId, int mouseButton, ClickType typ } } - public CheckboxWidget addCheckBox(int x, int y, Component text, boolean checked, Consumer onPress) { - CheckboxWidget checkBox = new CheckboxWidget(x, y, text, checked, onPress); + // TODO: checkbox size is wrong + public Checkbox addCheckBox(int x, int y, Component text, boolean checked, Consumer onPress) { + Checkbox checkBox = Checkbox.builder(text, font) + .pos(x,y) + .selected(checked) + .onValueChange((checkbox, checked1) -> onPress.accept(checkbox)) + .build(); this.addRenderableWidget(checkBox); @@ -277,7 +280,7 @@ public void renderItem(GuiGraphics graphics, int x, int y, ItemStack stack, bool renderQuantity(graphics, x, y, text, textColor); } } catch (Throwable t) { - logger.warn("Couldn't render stack: {}", ForgeRegistries.ITEMS.getKey(stack.getItem())); + logger.warn("Couldn't render stack: {}", BuiltInRegistries.ITEM.getKey(stack.getItem())); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/ControllerScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/ControllerScreen.java index db7807503d..bea3f39e4b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/ControllerScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/ControllerScreen.java @@ -76,8 +76,8 @@ public boolean mouseReleased(double mx, double my, int button) { } @Override - public boolean mouseScrolled(double x, double y, double delta) { - return this.scrollbar.mouseScrolled(x, y, delta) || super.mouseScrolled(x, y, delta); + public boolean mouseScrolled(double x, double y, double z, double delta) { + return this.scrollbar.mouseScrolled(x, y, z, delta) || super.mouseScrolled(x, y, z, delta); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/CrafterManagerScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/CrafterManagerScreen.java index 73cce069a3..9dc4431e83 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/CrafterManagerScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/CrafterManagerScreen.java @@ -184,8 +184,8 @@ public boolean mouseReleased(double mx, double my, int button) { } @Override - public boolean mouseScrolled(double x, double y, double delta) { - return this.scrollbar.mouseScrolled(x, y, delta) || super.mouseScrolled(x, y, delta); + public boolean mouseScrolled(double x, double y, double z, double delta) { + return this.scrollbar.mouseScrolled(x, y, z, delta) || super.mouseScrolled(x, y, z, delta); } public SearchWidget getSearchField() { diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/CraftingMonitorScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/CraftingMonitorScreen.java index 197f0baf8e..e068cbee7b 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/CraftingMonitorScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/CraftingMonitorScreen.java @@ -15,6 +15,7 @@ import com.refinedmods.refinedstorage.blockentity.craftingmonitor.ICraftingMonitor; import com.refinedmods.refinedstorage.container.CraftingMonitorContainerMenu; import com.refinedmods.refinedstorage.network.craftingmonitor.CraftingMonitorCancelMessage; +import com.refinedmods.refinedstorage.network.craftingmonitor.CraftingMonitorSyncTask; import com.refinedmods.refinedstorage.screen.widget.ScrollbarWidget; import com.refinedmods.refinedstorage.screen.widget.TabListWidget; import com.refinedmods.refinedstorage.screen.widget.sidebutton.RedstoneModeSideButton; @@ -27,8 +28,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - +import net.neoforged.neoforge.fluids.FluidStack; import javax.annotation.Nullable; import java.util.Collections; import java.util.List; @@ -80,8 +80,8 @@ public void onPageChanged(int page) { this.scrollbar = new ScrollbarWidget(this, 235, 20, 12, 149); } - public void setTasks(List tasks) { - this.tasks = tasks; + public void setTasks(List tasks) { + this.tasks = tasks.stream().map(Task::new).collect(Lists::newArrayList, List::add, List::addAll); } public List getElements() { @@ -258,8 +258,8 @@ public boolean mouseReleased(double mx, double my, int button) { } @Override - public boolean mouseScrolled(double x, double y, double delta) { - return this.scrollbar.mouseScrolled(x, y, delta) || super.mouseScrolled(x, y, delta); + public boolean mouseScrolled(double x, double y, double z, double delta) { + return this.scrollbar.mouseScrolled(x, y, z, delta) || super.mouseScrolled(x, y, z, delta); } public static class Task implements IGridTab { @@ -270,13 +270,13 @@ public static class Task implements IGridTab { private final int completionPercentage; private final List elements; - public Task(UUID id, ICraftingRequestInfo requested, int qty, long executionStarted, int completionPercentage, List elements) { - this.id = id; - this.requested = requested; - this.qty = qty; - this.executionStarted = executionStarted; - this.completionPercentage = completionPercentage; - this.elements = elements; + public Task(CraftingMonitorSyncTask syncTask) { + this.id = syncTask.id(); + this.requested = syncTask.requestInfo(); + this.qty = syncTask.quantity(); + this.executionStarted = syncTask.startTime(); + this.completionPercentage = syncTask.completionPercentage(); + this.elements = syncTask.elements(); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/FilterScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/FilterScreen.java index 72beda3b22..8b59231da9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/FilterScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/FilterScreen.java @@ -7,10 +7,10 @@ import com.refinedmods.refinedstorage.item.FilterItem; import com.refinedmods.refinedstorage.network.FilterUpdateMessage; import com.refinedmods.refinedstorage.render.RenderSettings; -import com.refinedmods.refinedstorage.screen.widget.CheckboxWidget; import com.refinedmods.refinedstorage.screen.widget.sidebutton.FilterTypeSideButton; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; +import net.minecraft.client.gui.components.Checkbox; import net.minecraft.client.gui.components.EditBox; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; @@ -29,7 +29,7 @@ public class FilterScreen extends BaseScreen { private boolean modFilter; private int type; - private CheckboxWidget modFilterCheckBox; + private Checkbox modFilterCheckBox; private Button modeButton; private EditBox nameField; diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/FluidAmountScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/FluidAmountScreen.java index 8ede68c499..0bef061f34 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/FluidAmountScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/FluidAmountScreen.java @@ -8,7 +8,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; import org.apache.commons.lang3.tuple.Pair; import javax.annotation.Nullable; diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/ItemAmountScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/ItemAmountScreen.java index 728bd92df3..228144249f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/ItemAmountScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/ItemAmountScreen.java @@ -8,7 +8,7 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.items.ItemHandlerHelper; +import net.neoforged.neoforge.items.ItemHandlerHelper; import org.apache.commons.lang3.tuple.Pair; import javax.annotation.Nullable; diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/KeyInputListener.java b/src/main/java/com/refinedmods/refinedstorage/screen/KeyInputListener.java index 3e66f656f5..47918424fb 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/KeyInputListener.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/KeyInputListener.java @@ -12,8 +12,8 @@ import net.minecraft.world.Container; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.client.event.InputEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.client.event.InputEvent; import org.apache.commons.lang3.tuple.ImmutableTriple; import top.theillusivec4.curios.api.CuriosApi; diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/SecurityManagerScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/SecurityManagerScreen.java index b6d7ae5637..67d44017d4 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/SecurityManagerScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/SecurityManagerScreen.java @@ -7,10 +7,10 @@ import com.refinedmods.refinedstorage.container.SecurityManagerContainerMenu; import com.refinedmods.refinedstorage.item.SecurityCardItem; import com.refinedmods.refinedstorage.network.SecurityManagerUpdateMessage; -import com.refinedmods.refinedstorage.screen.widget.CheckboxWidget; import com.refinedmods.refinedstorage.screen.widget.sidebutton.RedstoneModeSideButton; import com.refinedmods.refinedstorage.util.RenderUtils; import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.Checkbox; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -21,7 +21,7 @@ public class SecurityManagerScreen extends BaseScreen> tagsOfItem = ForgeRegistries.ITEMS - .tags() - .getReverseTag(item.getItem()) - .stream() - .flatMap(IReverseTag::getTagKeys) - .collect(Collectors.toSet()); + Collection> tagsOfItem = BuiltInRegistries.ITEM.getResourceKey(item.getItem()) + .flatMap(k -> BuiltInRegistries.ITEM.getHolder(k) + .map(holder -> holder.tags().collect(Collectors.toSet()))) + .orElse(Collections.emptySet()); for (TagKey owningTag : tagsOfItem) { lines.add(new TagLine(owningTag.location(), GridBlockEntity.ALLOWED_ITEM_TAGS.getValue().get(slot).contains(owningTag.location()))); @@ -91,7 +89,7 @@ public void onPostInit(int x, int y) { ItemListLine line = new ItemListLine(); - for (Item itemInTag : ForgeRegistries.ITEMS.tags().getTag(owningTag)) { + for (Holder itemInTag : BuiltInRegistries.ITEM.getTagOrEmpty(owningTag)) { if (itemCount > 0 && itemCount % 8 == 0) { lines.add(line); line = new ItemListLine(); @@ -107,12 +105,10 @@ public void onPostInit(int x, int y) { } else if (fluid != null) { lines.add(new FluidLine(fluid)); - Collection> tagsOfFluid = ForgeRegistries.FLUIDS - .tags() - .getReverseTag(fluid.getFluid()) - .stream() - .flatMap(IReverseTag::getTagKeys) - .collect(Collectors.toSet()); + Collection> tagsOfFluid = BuiltInRegistries.FLUID.getResourceKey(fluid.getFluid()) + .flatMap(k -> BuiltInRegistries.FLUID.getHolder(k) + .map(holder -> holder.tags().collect(Collectors.toSet()))) + .orElse(Collections.emptySet()); for (TagKey owningTag : tagsOfFluid) { lines.add(new TagLine(owningTag.location(), GridBlockEntity.ALLOWED_FLUID_TAGS.getValue().get(slot).contains(owningTag.location()))); @@ -121,7 +117,7 @@ public void onPostInit(int x, int y) { FluidListLine line = new FluidListLine(); - for (Fluid fluidInTag : ForgeRegistries.FLUIDS.tags().getTag(owningTag)) { + for (Holder fluidInTag : BuiltInRegistries.FLUID.getTagOrEmpty(owningTag)) { if (fluidCount > 0 && fluidCount % 8 == 0) { lines.add(line); line = new FluidListLine(); @@ -222,8 +218,8 @@ public boolean mouseReleased(double mx, double my, int button) { } @Override - public boolean mouseScrolled(double x, double y, double delta) { - return this.scrollbar.mouseScrolled(x, y, delta) || super.mouseScrolled(x, y, delta); + public boolean mouseScrolled(double x, double y, double z, double delta) { + return this.scrollbar.mouseScrolled(x, y, z, delta) || super.mouseScrolled(x, y, z, delta); } @Override @@ -313,16 +309,14 @@ public void render(GuiGraphics graphics, int x, int y) { private class TagLine implements Line { private final ResourceLocation tagName; - private final CheckboxWidget widget; + private final Checkbox widget; public TagLine(ResourceLocation tagName, boolean checked) { this.tagName = tagName; this.widget = addCheckBox(-100, -100, Component.literal(RenderUtils.shorten(tagName.toString(), 22)), checked, btn -> { // NO OP }); - widget.setFGColor(0xFF373737); - widget.setShadow(false); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/CraftingPreviewScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/CraftingPreviewScreen.java index ba99452d39..822894be3a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/CraftingPreviewScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/CraftingPreviewScreen.java @@ -28,7 +28,7 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; import org.lwjgl.glfw.GLFW; import javax.annotation.Nonnull; @@ -253,8 +253,8 @@ public boolean mouseReleased(double mx, double my, int button) { } @Override - public boolean mouseScrolled(double x, double y, double delta) { - return this.scrollbar.mouseScrolled(x, y, delta) || super.mouseScrolled(x, y, delta); + public boolean mouseScrolled(double x, double y, double z, double delta) { + return this.scrollbar.mouseScrolled(x, y, z, delta) || super.mouseScrolled(x, y, z, delta); } @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/CraftingSettingsScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/CraftingSettingsScreen.java index 9c2e16e1c6..123812c511 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/CraftingSettingsScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/CraftingSettingsScreen.java @@ -9,7 +9,7 @@ import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Player; -import net.minecraftforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.FluidType; public class CraftingSettingsScreen extends AmountSpecifyingScreen { private final IGridStack stack; diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/GridScreen.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/GridScreen.java index d3b8b43bc4..b2887a9af3 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/GridScreen.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/GridScreen.java @@ -24,7 +24,6 @@ import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; import com.refinedmods.refinedstorage.screen.grid.view.GridViewImpl; import com.refinedmods.refinedstorage.screen.grid.view.IGridView; -import com.refinedmods.refinedstorage.screen.widget.CheckboxWidget; import com.refinedmods.refinedstorage.screen.widget.ScrollbarWidget; import com.refinedmods.refinedstorage.screen.widget.SearchWidget; import com.refinedmods.refinedstorage.screen.widget.TabListWidget; @@ -33,6 +32,7 @@ import com.refinedmods.refinedstorage.util.TimeUtils; import net.minecraft.ChatFormatting; import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.client.gui.components.Checkbox; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; import net.minecraft.client.gui.screens.inventory.tooltip.DefaultTooltipPositioner; import net.minecraft.client.resources.language.I18n; @@ -44,7 +44,7 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.client.ForgeHooksClient; +import net.neoforged.neoforge.client.ClientHooks; import org.lwjgl.glfw.GLFW; import yalter.mousetweaks.api.MouseTweaksDisableWheelTweak; @@ -66,9 +66,9 @@ public class GridScreen extends BaseScreen implements IScreen private final int patternScrollOffsetAbsoluteMax = GridNetworkNode.PROCESSING_MATRIX_SIZE / 3 - 3; private IGridView view; private SearchWidget searchField; - private CheckboxWidget exactPattern; - private CheckboxWidget processingPattern; - private CheckboxWidget fluidCheckBox; + private Checkbox exactPattern; + private Checkbox processingPattern; + private Checkbox fluidCheckBox; private ScrollbarWidget scrollbar; private ScrollbarWidget patternScrollbar; private boolean wasConnected; @@ -112,7 +112,6 @@ public static List getSorters() { sorters.add(new QuantityGridSorter()); sorters.add(new IdGridSorter()); sorters.add(new LastModifiedGridSorter()); - sorters.add(new InventoryTweaksGridSorter()); return sorters; } @@ -500,7 +499,7 @@ private void drawGridTooltip(GuiGraphics graphics, IGridStack gridStack, int mou ItemStack stackContext = gridStack instanceof ItemGridStack ? ((ItemGridStack) gridStack).getStack() : ItemStack.EMPTY; List textElements = gridStack.getTooltip(true); - List components = new ArrayList<>(ForgeHooksClient.gatherTooltipComponents( + List components = new ArrayList<>(ClientHooks.gatherTooltipComponents( stackContext, textElements, mouseX, @@ -637,7 +636,7 @@ public boolean mouseReleased(double mx, double my, int button) { } @Override - public boolean mouseScrolled(double x, double y, double delta) { + public boolean mouseScrolled(double x, double y, double z, double delta) { if (hasShiftDown() || hasControlDown()) { if (RS.CLIENT_CONFIG.getGrid().getPreventSortingWhileShiftIsDown()) { doSort = !isOverSlotArea(x - leftPos, y - topPos) && !isOverCraftingOutputArea(x - leftPos, y - topPos); @@ -650,14 +649,14 @@ public boolean mouseScrolled(double x, double y, double delta) { } } - return super.mouseScrolled(x, y, delta); + return super.mouseScrolled(x, y, z, delta); } - if (grid.getGridType() == GridType.PATTERN && isOverPatternArea(x - leftPos, y - topPos) && patternScrollbar.mouseScrolled(x, y, delta)) { + if (grid.getGridType() == GridType.PATTERN && isOverPatternArea(x - leftPos, y - topPos) && patternScrollbar.mouseScrolled(x, y, z, delta)) { return true; } - return this.scrollbar.mouseScrolled(x, y, delta) || super.mouseScrolled(x, y, delta); + return this.scrollbar.mouseScrolled(x, y, z, delta) || super.mouseScrolled(x, y, z, delta); } private boolean isOverInventory(double x, double y) { @@ -713,7 +712,7 @@ public SearchWidget getSearchField() { public void updateExactPattern(boolean checked) { if (exactPattern != null) { - exactPattern.setChecked(checked); + exactPattern.selected = checked; } } diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/filtering/FilterGridFilter.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/filtering/FilterGridFilter.java index 361fc32ed8..aa3a9eb760 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/filtering/FilterGridFilter.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/filtering/FilterGridFilter.java @@ -5,11 +5,11 @@ import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.registries.ForgeRegistries; - +import net.neoforged.neoforge.fluids.FluidStack; import java.util.List; import java.util.function.Predicate; @@ -48,14 +48,11 @@ public boolean test(IGridStack stack) { FluidStack stackInFilter = (FluidStack) filter.getStack(); if (filter.isModFilter()) { - ResourceLocation stackInFilterRegistryName = ForgeRegistries.FLUIDS.getKey(stackInFilter.getFluid()); + ResourceLocation stackInFilterRegistryName = BuiltInRegistries.FLUID.getKey(stackInFilter.getFluid()); + String stackInFilterModId = stackInFilterRegistryName.getNamespace(); - if (stackInFilterRegistryName != null) { - String stackInFilterModId = stackInFilterRegistryName.getNamespace(); - - if (stackInFilterModId.equalsIgnoreCase(stack.getModId())) { - return filter.getMode() == IFilter.MODE_WHITELIST; - } + if (stackInFilterModId.equalsIgnoreCase(stack.getModId())) { + return filter.getMode() == IFilter.MODE_WHITELIST; } } else if (API.instance().getComparer().isEqual(((FluidGridStack) stack).getStack(), stackInFilter, filter.getCompare())) { return filter.getMode() == IFilter.MODE_WHITELIST; diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/IdGridSorter.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/IdGridSorter.java index d0e46afe03..cf2af0a635 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/IdGridSorter.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/IdGridSorter.java @@ -5,7 +5,7 @@ import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidStack; public class IdGridSorter implements IGridSorter { @Override diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/InventoryTweaksGridSorter.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/InventoryTweaksGridSorter.java deleted file mode 100644 index 8aa56ae113..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/sorting/InventoryTweaksGridSorter.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.refinedmods.refinedstorage.screen.grid.sorting; - -import com.refinedmods.refinedstorage.api.network.grid.IGrid; -import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack; - -// TODO: remove in 1.20.x -public class InventoryTweaksGridSorter implements IGridSorter { - @Override - public boolean isApplicable(IGrid grid) { - return false; - } - - @Override - public int compare(IGridStack left, IGridStack right, SortingDirection direction) { - return 0; - } - -/* private InvTweaksAPI api = null; - - public GridSorterInventoryTweaks() { - try { - api = (InvTweaksAPI) Class.forName("invtweaks.forge.InvTweaksMod", true, Loader.instance().getModClassLoader()).getField("instance").get(null); - } catch (Exception e) { - // NO OP - } - } - - @Override - public boolean isApplicable(IGrid grid) { - return grid.getSortingType() == IGrid.SORTING_TYPE_INVENTORYTWEAKS; - } - - @Override - public int compare(IGridStack left, IGridStack right, GridSorterDirection sortingDirection) { - if (api != null && left instanceof GridStackItem && right instanceof GridStackItem) { - if (sortingDirection == GridSorterDirection.DESCENDING) { - return api.compareItems(((GridStackItem) left).getStack(), ((GridStackItem) right).getStack()); - } else if (sortingDirection == GridSorterDirection.ASCENDING) { - return api.compareItems(((GridStackItem) right).getStack(), ((GridStackItem) left).getStack()); - } - } - - return 0; - }*/ -} \ No newline at end of file diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/FluidGridStack.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/FluidGridStack.java index 9e89f03014..0f2006ca6a 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/FluidGridStack.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/FluidGridStack.java @@ -1,28 +1,36 @@ package com.refinedmods.refinedstorage.screen.grid.stack; -import com.google.common.collect.Lists; +import com.refinedmods.refinedstorage.api.storage.cache.IStorageCache; +import com.refinedmods.refinedstorage.api.storage.tracker.IStorageTracker; import com.refinedmods.refinedstorage.api.storage.tracker.StorageTrackerEntry; +import com.refinedmods.refinedstorage.api.util.IComparer; +import com.refinedmods.refinedstorage.api.util.IStackList; +import com.refinedmods.refinedstorage.api.util.StackListEntry; +import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.render.FluidRenderer; import com.refinedmods.refinedstorage.render.RenderSettings; import com.refinedmods.refinedstorage.screen.BaseScreen; + +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + +import com.google.common.collect.Lists; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.tags.IReverseTag; +import net.minecraft.world.item.ItemStack; +import net.neoforged.neoforge.fluids.FluidStack; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import javax.annotation.Nullable; -import java.util.List; -import java.util.Set; -import java.util.UUID; -import java.util.stream.Collectors; - public class FluidGridStack implements IGridStack { private static final String ERROR_PLACEHOLDER = ""; private static final Logger LOGGER = LogManager.getLogger(FluidGridStack.class); @@ -42,12 +50,13 @@ public class FluidGridStack implements IGridStack { private String cachedModId; private String cachedModName; - public FluidGridStack(UUID id, @Nullable UUID otherId, FluidStack stack, @Nullable StorageTrackerEntry entry, boolean craftable) { + public FluidGridStack(UUID id, @Nullable UUID otherId, FluidStack stack, + boolean craftable, @Nullable StorageTrackerEntry entry) { this.id = id; this.otherId = otherId; this.stack = stack; - this.entry = entry; this.craftable = craftable; + this.entry = entry; } public void setZeroed(boolean zeroed) { @@ -85,7 +94,7 @@ public String getName() { try { cachedName = stack.getDisplayName().getString(); } catch (Throwable t) { - LOGGER.warn("Could not retrieve fluid name of {}", ForgeRegistries.FLUIDS.getKey(stack.getFluid())); + LOGGER.warn("Could not retrieve fluid name of {}", BuiltInRegistries.FLUID.getKey(stack.getFluid())); cachedName = ERROR_PLACEHOLDER; } @@ -97,7 +106,7 @@ public String getName() { @Override public String getModId() { if (cachedModId == null) { - ResourceLocation registryName = ForgeRegistries.FLUIDS.getKey(stack.getFluid()); + ResourceLocation registryName = BuiltInRegistries.FLUID.getKey(stack.getFluid()); if (registryName != null) { cachedModId = registryName.getNamespace(); @@ -125,14 +134,13 @@ public String getModName() { @Override public Set getTags() { if (cachedTags == null) { - cachedTags = ForgeRegistries.FLUIDS - .tags() - .getReverseTag(stack.getFluid()) - .stream() - .flatMap(IReverseTag::getTagKeys) - .map(TagKey::location) - .map(ResourceLocation::getPath) - .collect(Collectors.toSet()); + cachedTags = BuiltInRegistries.FLUID.getResourceKey(stack.getFluid()) + .flatMap(k -> BuiltInRegistries.FLUID.getHolder(k) + .map(holder -> holder.tags() + .map(TagKey::location) + .map(ResourceLocation::getPath) + .collect(Collectors.toSet()))) + .orElse(Collections.emptySet()); } return cachedTags; @@ -145,7 +153,7 @@ public List getTooltip(boolean bypassCache) { try { tooltip = Lists.newArrayList(stack.getDisplayName()); } catch (Throwable t) { - LOGGER.warn("Could not retrieve fluid tooltip of {}", ForgeRegistries.FLUIDS.getKey(stack.getFluid())); + LOGGER.warn("Could not retrieve fluid tooltip of {}", BuiltInRegistries.FLUID.getKey(stack.getFluid())); tooltip = Lists.newArrayList(Component.literal(ERROR_PLACEHOLDER)); } @@ -217,4 +225,37 @@ public StorageTrackerEntry getTrackerEntry() { public void setTrackerEntry(@Nullable StorageTrackerEntry entry) { this.entry = entry; } + + public static FluidGridStack of( + final IStorageCache cache, + @Nullable final IStackList craftablesList, + final IStorageTracker storageTracker, + final StackListResult delta + ) { + StackListEntry craftingEntry = craftablesList == null ? null : cache.getCraftablesList().getEntry(delta.getStack(), IComparer.COMPARE_NBT); + return new FluidGridStack( + delta.getId(), + craftingEntry != null ? craftingEntry.getId() : null, + delta.getStack().copy(), // copy is very important as the same stack will be shared between server<->client on single player + false, + storageTracker.get(delta.getStack()) + ); + } + + public static FluidGridStack of( + final StackListEntry entry, + final IStorageTracker storageTracker, + @Nullable final IStackList oppositeList, + final boolean craftable + ) { + StackListEntry otherEntry = + oppositeList == null ? null : oppositeList.getEntry(entry.getStack(), IComparer.COMPARE_NBT); + return new FluidGridStack( + entry.getId(), + otherEntry != null ? otherEntry.getId() : null, + entry.getStack().copy(), // copy is very important as the same stack will be shared between server<->client on single player + craftable, + storageTracker.get(entry.getStack()) + ); + } } diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/ItemGridStack.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/ItemGridStack.java index 234a14d2d1..f8558cc969 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/ItemGridStack.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/stack/ItemGridStack.java @@ -1,27 +1,38 @@ package com.refinedmods.refinedstorage.screen.grid.stack; +import com.refinedmods.refinedstorage.api.storage.cache.IStorageCache; +import com.refinedmods.refinedstorage.api.storage.tracker.IStorageTracker; import com.refinedmods.refinedstorage.api.storage.tracker.StorageTrackerEntry; +import com.refinedmods.refinedstorage.api.util.IComparer; +import com.refinedmods.refinedstorage.api.util.IStackList; +import com.refinedmods.refinedstorage.api.util.StackListEntry; +import com.refinedmods.refinedstorage.api.util.StackListResult; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.render.RenderSettings; import com.refinedmods.refinedstorage.screen.BaseScreen; import com.refinedmods.refinedstorage.util.RenderUtils; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Collectors; +import javax.annotation.Nullable; + import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.TagKey; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.fml.ModContainer; -import net.minecraftforge.fml.ModList; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.tags.IReverseTag; +import net.neoforged.fml.ModContainer; +import net.neoforged.fml.ModList; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import javax.annotation.Nullable; -import java.util.*; -import java.util.stream.Collectors; - public class ItemGridStack implements IGridStack { private static final String ERROR_PLACEHOLDER = ""; @@ -45,7 +56,8 @@ public ItemGridStack(ItemStack stack) { this.stack = stack; } - public ItemGridStack(UUID id, @Nullable UUID otherId, ItemStack stack, boolean craftable, StorageTrackerEntry entry) { + public ItemGridStack(UUID id, @Nullable UUID otherId, ItemStack stack, boolean craftable, + StorageTrackerEntry entry) { this.id = id; this.otherId = otherId; this.stack = stack; @@ -95,7 +107,7 @@ public String getName() { try { cachedName = stack.getHoverName().getString(); } catch (Throwable t) { - LOGGER.warn("Could not retrieve item name of {}", ForgeRegistries.ITEMS.getKey(stack.getItem())); + LOGGER.warn("Could not retrieve item name of {}", BuiltInRegistries.ITEM.getKey(stack.getItem())); cachedName = ERROR_PLACEHOLDER; } @@ -135,14 +147,13 @@ public String getModName() { @Override public Set getTags() { if (cachedTags == null) { - cachedTags = ForgeRegistries.ITEMS - .tags() - .getReverseTag(stack.getItem()) - .stream() - .flatMap(IReverseTag::getTagKeys) - .map(TagKey::location) - .map(ResourceLocation::getPath) - .collect(Collectors.toSet()); + cachedTags = BuiltInRegistries.ITEM.getResourceKey(stack.getItem()) + .flatMap(k -> BuiltInRegistries.ITEM.getHolder(k) + .map(holder -> holder.tags() + .map(TagKey::location) + .map(ResourceLocation::getPath) + .collect(Collectors.toSet()))) + .orElse(Collections.emptySet()); } return cachedTags; @@ -155,7 +166,7 @@ public List getTooltip(boolean bypassCache) { try { tooltip = RenderUtils.getTooltipFromItem(stack); } catch (Throwable t) { - LOGGER.warn("Could not retrieve item tooltip of {}", ForgeRegistries.ITEMS.getKey(stack.getItem())); + LOGGER.warn("Could not retrieve item tooltip of {}", BuiltInRegistries.ITEM.getKey(stack.getItem())); tooltip = new ArrayList<>(); tooltip.add(Component.literal(ERROR_PLACEHOLDER)); @@ -227,4 +238,36 @@ public StorageTrackerEntry getTrackerEntry() { public void setTrackerEntry(@Nullable StorageTrackerEntry entry) { this.entry = entry; } + + public static ItemGridStack of( + final IStorageCache cache, + @Nullable final IStackList craftablesList, + final IStorageTracker storageTracker, + final StackListResult delta + ) { + StackListEntry craftingEntry = craftablesList == null ? null : cache.getCraftablesList().getEntry(delta.getStack(), IComparer.COMPARE_NBT); + return new ItemGridStack( + delta.getId(), + craftingEntry != null ? craftingEntry.getId() : null, + delta.getStack().copy(), // copy is very important as the same stack will be shared between server<->client on single player + false, + storageTracker.get(delta.getStack()) + ); + } + + public static ItemGridStack of( + final StackListEntry entry, + final IStorageTracker storageTracker, + @Nullable final IStackList oppositeList, + final boolean craftable + ) { + StackListEntry otherEntry = oppositeList == null ? null : oppositeList.getEntry(entry.getStack(), IComparer.COMPARE_NBT); + return new ItemGridStack( + entry.getId(), + otherEntry != null ? otherEntry.getId() : null, + entry.getStack().copy(), // copy is very important as the same stack will be shared between server<->client on single player + craftable, + storageTracker.get(entry.getStack()) + ); + } } diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/view/GridViewImpl.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/view/GridViewImpl.java index e3f44393c9..f13d6a1e0e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/view/GridViewImpl.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/view/GridViewImpl.java @@ -38,7 +38,7 @@ public List getStacks() { } @Override - public void setStacks(List stacks) { + public void setStacks(List stacks) { map.clear(); for (IGridStack stack : stacks) { diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/grid/view/IGridView.java b/src/main/java/com/refinedmods/refinedstorage/screen/grid/view/IGridView.java index 0a67888362..fca137933f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/grid/view/IGridView.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/grid/view/IGridView.java @@ -11,7 +11,7 @@ public interface IGridView { List getStacks(); - void setStacks(List stacks); + void setStacks(List stacks); @Nullable IGridStack get(UUID id); diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/widget/CheckboxWidget.java b/src/main/java/com/refinedmods/refinedstorage/screen/widget/CheckboxWidget.java deleted file mode 100644 index d99ae61e0e..0000000000 --- a/src/main/java/com/refinedmods/refinedstorage/screen/widget/CheckboxWidget.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.refinedmods.refinedstorage.screen.widget; - -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.systems.RenderSystem; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Font; -import net.minecraft.client.gui.GuiGraphics; -import net.minecraft.client.gui.components.Checkbox; -import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceLocation; - -import java.util.function.Consumer; - -public class CheckboxWidget extends Checkbox { - private static final ResourceLocation TEXTURE = new ResourceLocation("textures/gui/checkbox.png"); - private static final int BOX_WIDTH = 13; - - private final Consumer onPress; - private boolean shadow = true; - - public CheckboxWidget(int x, int y, Component text, boolean isChecked, Consumer onPress) { - super( - x, - y, - Minecraft.getInstance().font.width(text.getString()) + BOX_WIDTH, - 10, - text, - isChecked - ); - - this.onPress = onPress; - } - - public void setShadow(boolean shadow) { - this.shadow = shadow; - } - - @Override - public void onPress() { - super.onPress(); - - this.onPress.accept(this); - } - - public void setChecked(boolean value) { - this.selected = value; - } - - @Override - public void renderWidget(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) { - Minecraft minecraft = Minecraft.getInstance(); - RenderSystem.setShaderTexture(0, TEXTURE); - RenderSystem.enableDepthTest(); - Font font = minecraft.font; - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, this.alpha); - RenderSystem.enableBlend(); - RenderSystem.defaultBlendFunc(); - RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); - - float textureX = (this.isFocused() ? 10.0F : 0.0F); - float textureY = (this.selected ? 10.0F : 0.0F); - - int width = 10; - int height = 10; - - graphics.blit(TEXTURE, this.getX(), this.getY(), textureX, textureY, width, height, 32, 32); - - int color = 14737632; - - if (!active) { - color = 10526880; - } else if (packedFGColor != 0) { - color = packedFGColor; - } - - graphics.drawString(font, this.getMessage(), this.getX() + 13, this.getY() + (this.height - 8) / 2, color, shadow); - } -} diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/widget/ScrollbarWidget.java b/src/main/java/com/refinedmods/refinedstorage/screen/widget/ScrollbarWidget.java index d52c3b3d2e..2508d71cf5 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/widget/ScrollbarWidget.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/widget/ScrollbarWidget.java @@ -116,9 +116,9 @@ public boolean mouseReleased(double mx, double my, int button) { } @Override - public boolean mouseScrolled(double mouseX, double mouseY, double scrollDelta) { + public boolean mouseScrolled(double x, double y, double z, double delta) { if (isEnabled()) { - setOffset(offset + Math.max(Math.min(-(int) scrollDelta, 1), -1)); + setOffset(offset + Math.max(Math.min(-(int) delta, 1), -1)); return true; } diff --git a/src/main/java/com/refinedmods/refinedstorage/screen/widget/sidebutton/GridSortingTypeSideButton.java b/src/main/java/com/refinedmods/refinedstorage/screen/widget/sidebutton/GridSortingTypeSideButton.java index 0c2753a1a3..2c951928a0 100644 --- a/src/main/java/com/refinedmods/refinedstorage/screen/widget/sidebutton/GridSortingTypeSideButton.java +++ b/src/main/java/com/refinedmods/refinedstorage/screen/widget/sidebutton/GridSortingTypeSideButton.java @@ -3,8 +3,8 @@ import com.refinedmods.refinedstorage.api.network.grid.GridType; import com.refinedmods.refinedstorage.api.network.grid.IGrid; import com.refinedmods.refinedstorage.container.GridContainerMenu; -import com.refinedmods.refinedstorage.integration.inventorytweaks.InventoryTweaksIntegration; import com.refinedmods.refinedstorage.screen.BaseScreen; + import net.minecraft.ChatFormatting; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; @@ -20,7 +20,8 @@ public GridSortingTypeSideButton(BaseScreen screen, IGrid gri @Override protected String getSideButtonTooltip() { - return I18n.get("sidebutton.refinedstorage.grid.sorting.type") + "\n" + ChatFormatting.GRAY + I18n.get("sidebutton.refinedstorage.grid.sorting.type." + grid.getSortingType()); + return I18n.get("sidebutton.refinedstorage.grid.sorting.type") + "\n" + ChatFormatting.GRAY + + I18n.get("sidebutton.refinedstorage.grid.sorting.type." + grid.getSortingType()); } @Override @@ -47,12 +48,8 @@ public void onPress() { } else if (type == IGrid.SORTING_TYPE_ID) { type = IGrid.SORTING_TYPE_LAST_MODIFIED; } else if (type == IGrid.SORTING_TYPE_LAST_MODIFIED) { - if (grid.getGridType() == GridType.FLUID || !InventoryTweaksIntegration.isLoaded()) { - type = IGrid.SORTING_TYPE_QUANTITY; - } else { - type = IGrid.SORTING_TYPE_INVENTORYTWEAKS; - } - } else if (type == IGrid.SORTING_TYPE_INVENTORYTWEAKS) { + type = IGrid.SORTING_TYPE_QUANTITY; + } else { type = IGrid.SORTING_TYPE_QUANTITY; } diff --git a/src/main/java/com/refinedmods/refinedstorage/setup/ClientSetup.java b/src/main/java/com/refinedmods/refinedstorage/setup/ClientSetup.java index cdfcc22df4..63ff67b888 100644 --- a/src/main/java/com/refinedmods/refinedstorage/setup/ClientSetup.java +++ b/src/main/java/com/refinedmods/refinedstorage/setup/ClientSetup.java @@ -33,14 +33,14 @@ import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.client.event.ModelEvent; -import net.minecraftforge.client.event.RegisterColorHandlersEvent; -import net.minecraftforge.client.event.RegisterKeyMappingsEvent; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.AddReloadListenerEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; - +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; +import net.neoforged.neoforge.client.event.ModelEvent; +import net.neoforged.neoforge.client.event.RegisterColorHandlersEvent; +import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent; +import net.neoforged.neoforge.client.event.RegisterMenuScreensEvent; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.event.AddReloadListenerEvent; import java.util.Arrays; import java.util.function.BiConsumer; @@ -59,39 +59,11 @@ private ClientSetup() { @SubscribeEvent public static void onClientSetup(FMLClientSetupEvent e) { - MinecraftForge.EVENT_BUS.register(new KeyInputListener()); + NeoForge.EVENT_BUS.register(new KeyInputListener()); registerBakedModelOverrides(); registerPatternRenderHandlers(); - // MenuScreens isn't thread safe - e.enqueueWork(() -> { - MenuScreens.register(RSContainerMenus.FILTER.get(), FilterScreen::new); - MenuScreens.register(RSContainerMenus.CONTROLLER.get(), ControllerScreen::new); - MenuScreens.register(RSContainerMenus.DISK_DRIVE.get(), DiskDriveScreen::new); - MenuScreens.register(RSContainerMenus.GRID.get(), new GridScreenFactory()); - MenuScreens.register(RSContainerMenus.STORAGE_BLOCK.get(), StorageBlockScreen::new); - MenuScreens.register(RSContainerMenus.FLUID_STORAGE_BLOCK.get(), FluidStorageBlockScreen::new); - MenuScreens.register(RSContainerMenus.EXTERNAL_STORAGE.get(), ExternalStorageScreen::new); - MenuScreens.register(RSContainerMenus.IMPORTER.get(), ImporterScreen::new); - MenuScreens.register(RSContainerMenus.EXPORTER.get(), ExporterScreen::new); - MenuScreens.register(RSContainerMenus.NETWORK_TRANSMITTER.get(), NetworkTransmitterScreen::new); - MenuScreens.register(RSContainerMenus.RELAY.get(), RelayScreen::new); - MenuScreens.register(RSContainerMenus.DETECTOR.get(), DetectorScreen::new); - MenuScreens.register(RSContainerMenus.SECURITY_MANAGER.get(), SecurityManagerScreen::new); - MenuScreens.register(RSContainerMenus.INTERFACE.get(), InterfaceScreen::new); - MenuScreens.register(RSContainerMenus.FLUID_INTERFACE.get(), FluidInterfaceScreen::new); - MenuScreens.register(RSContainerMenus.WIRELESS_TRANSMITTER.get(), WirelessTransmitterScreen::new); - MenuScreens.register(RSContainerMenus.STORAGE_MONITOR.get(), StorageMonitorScreen::new); - MenuScreens.register(RSContainerMenus.CONSTRUCTOR.get(), ConstructorScreen::new); - MenuScreens.register(RSContainerMenus.DESTRUCTOR.get(), DestructorScreen::new); - MenuScreens.register(RSContainerMenus.DISK_MANIPULATOR.get(), DiskManipulatorScreen::new); - MenuScreens.register(RSContainerMenus.CRAFTER.get(), CrafterScreen::new); - MenuScreens.register(RSContainerMenus.CRAFTER_MANAGER.get(), new CrafterManagerScreenFactory()); - MenuScreens.register(RSContainerMenus.CRAFTING_MONITOR.get(), CraftingMonitorScreen::new); - MenuScreens.register(RSContainerMenus.WIRELESS_CRAFTING_MONITOR.get(), CraftingMonitorScreen::new); - }); - BlockEntityRenderers.register(RSBlockEntities.STORAGE_MONITOR.get(), ctx -> new StorageMonitorBlockEntityRenderer()); // ItemProperties isn't thread safe @@ -112,6 +84,34 @@ public static void onClientSetup(FMLClientSetupEvent e) { }); } + @SubscribeEvent + public static void registerMenuScreens(RegisterMenuScreensEvent e) { + e.register(RSContainerMenus.FILTER.get(), FilterScreen::new); + e.register(RSContainerMenus.CONTROLLER.get(), ControllerScreen::new); + e.register(RSContainerMenus.DISK_DRIVE.get(), DiskDriveScreen::new); + e.register(RSContainerMenus.GRID.get(), new GridScreenFactory()); + e.register(RSContainerMenus.STORAGE_BLOCK.get(), StorageBlockScreen::new); + e.register(RSContainerMenus.FLUID_STORAGE_BLOCK.get(), FluidStorageBlockScreen::new); + e.register(RSContainerMenus.EXTERNAL_STORAGE.get(), ExternalStorageScreen::new); + e.register(RSContainerMenus.IMPORTER.get(), ImporterScreen::new); + e.register(RSContainerMenus.EXPORTER.get(), ExporterScreen::new); + e.register(RSContainerMenus.NETWORK_TRANSMITTER.get(), NetworkTransmitterScreen::new); + e.register(RSContainerMenus.RELAY.get(), RelayScreen::new); + e.register(RSContainerMenus.DETECTOR.get(), DetectorScreen::new); + e.register(RSContainerMenus.SECURITY_MANAGER.get(), SecurityManagerScreen::new); + e.register(RSContainerMenus.INTERFACE.get(), InterfaceScreen::new); + e.register(RSContainerMenus.FLUID_INTERFACE.get(), FluidInterfaceScreen::new); + e.register(RSContainerMenus.WIRELESS_TRANSMITTER.get(), WirelessTransmitterScreen::new); + e.register(RSContainerMenus.STORAGE_MONITOR.get(), StorageMonitorScreen::new); + e.register(RSContainerMenus.CONSTRUCTOR.get(), ConstructorScreen::new); + e.register(RSContainerMenus.DESTRUCTOR.get(), DestructorScreen::new); + e.register(RSContainerMenus.DISK_MANIPULATOR.get(), DiskManipulatorScreen::new); + e.register(RSContainerMenus.CRAFTER.get(), CrafterScreen::new); + e.register(RSContainerMenus.CRAFTER_MANAGER.get(), new CrafterManagerScreenFactory()); + e.register(RSContainerMenus.CRAFTING_MONITOR.get(), CraftingMonitorScreen::new); + e.register(RSContainerMenus.WIRELESS_CRAFTING_MONITOR.get(), CraftingMonitorScreen::new); + } + private static void registerPatternRenderHandlers() { API.instance().addPatternRenderHandler(pattern -> Screen.hasShiftDown()); API.instance().addPatternRenderHandler(pattern -> { @@ -200,8 +200,8 @@ public static void onModelBake(ModelEvent.ModifyBakingResult e) { @SubscribeEvent public static void onRegisterModelGeometry(final ModelEvent.RegisterGeometryLoaders e) { - e.register("disk_drive", new DiskDriveGeometryLoader()); - e.register("disk_manipulator", new DiskManipulatorGeometryLoader()); - e.register("portable_grid", new PortableGridGeometryLoader()); + e.register(new ResourceLocation(RS.ID, "disk_drive"), new DiskDriveGeometryLoader()); + e.register(new ResourceLocation(RS.ID, "disk_manipulator"), new DiskManipulatorGeometryLoader()); + e.register(new ResourceLocation(RS.ID, "portable_grid"), new PortableGridGeometryLoader()); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/setup/CommonSetup.java b/src/main/java/com/refinedmods/refinedstorage/setup/CommonSetup.java index 7a1ace2093..00464703ec 100644 --- a/src/main/java/com/refinedmods/refinedstorage/setup/CommonSetup.java +++ b/src/main/java/com/refinedmods/refinedstorage/setup/CommonSetup.java @@ -1,11 +1,12 @@ package com.refinedmods.refinedstorage.setup; import com.refinedmods.refinedstorage.RS; +import com.refinedmods.refinedstorage.RSBlockEntities; import com.refinedmods.refinedstorage.RSCreativeModeTabItems; +import com.refinedmods.refinedstorage.RSItems; import com.refinedmods.refinedstorage.RSLootFunctions; import com.refinedmods.refinedstorage.api.network.grid.GridType; import com.refinedmods.refinedstorage.api.network.node.INetworkNode; -import com.refinedmods.refinedstorage.api.network.node.INetworkNodeProxy; import com.refinedmods.refinedstorage.api.storage.StorageType; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.apiimpl.autocrafting.craftingmonitor.ErrorCraftingMonitorElement; @@ -17,8 +18,31 @@ import com.refinedmods.refinedstorage.apiimpl.autocrafting.task.v6.CraftingTaskFactory; import com.refinedmods.refinedstorage.apiimpl.network.NetworkListener; import com.refinedmods.refinedstorage.apiimpl.network.NetworkNodeListener; -import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.*; -import com.refinedmods.refinedstorage.apiimpl.network.node.*; +import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.GridBlockGridFactory; +import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.PortableGridBlockGridFactory; +import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.PortableGridGridFactory; +import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.WirelessFluidGridGridFactory; +import com.refinedmods.refinedstorage.apiimpl.network.grid.factory.WirelessGridGridFactory; +import com.refinedmods.refinedstorage.apiimpl.network.node.CableNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.ConstructorNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.CrafterManagerNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.CrafterNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.CraftingMonitorNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.DestructorNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.DetectorNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.ExporterNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.ExternalStorageNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.FluidInterfaceNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.GridNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.ImporterNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.InterfaceNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.NetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.NetworkReceiverNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.NetworkTransmitterNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.RelayNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.SecurityManagerNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.StorageMonitorNetworkNode; +import com.refinedmods.refinedstorage.apiimpl.network.node.WirelessTransmitterNetworkNode; import com.refinedmods.refinedstorage.apiimpl.network.node.diskdrive.DiskDriveNetworkNode; import com.refinedmods.refinedstorage.apiimpl.network.node.diskmanipulator.DiskManipulatorNetworkNode; import com.refinedmods.refinedstorage.apiimpl.network.node.storage.FluidStorageNetworkNode; @@ -30,15 +54,20 @@ import com.refinedmods.refinedstorage.apiimpl.storage.externalstorage.FluidExternalStorageProvider; import com.refinedmods.refinedstorage.apiimpl.storage.externalstorage.ItemExternalStorageProvider; import com.refinedmods.refinedstorage.block.BlockListener; +import com.refinedmods.refinedstorage.blockentity.CrafterBlockEntity; import com.refinedmods.refinedstorage.integration.craftingtweaks.CraftingTweaksIntegration; import com.refinedmods.refinedstorage.integration.inventorysorter.InventorySorterIntegration; + import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.capabilities.RegisterCapabilitiesEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; -import net.minecraftforge.registries.RegisterEvent; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.network.event.RegisterPayloadHandlerEvent; +import net.neoforged.neoforge.network.registration.IPayloadRegistrar; +import net.neoforged.neoforge.registries.RegisterEvent; public final class CommonSetup { private CommonSetup() { @@ -52,52 +81,92 @@ public static void onRegister(final RegisterEvent e) { @SubscribeEvent public static void onCommonSetup(FMLCommonSetupEvent e) { - RS.NETWORK_HANDLER.register(); - - MinecraftForge.EVENT_BUS.register(new NetworkNodeListener()); - MinecraftForge.EVENT_BUS.register(new NetworkListener()); - MinecraftForge.EVENT_BUS.register(new BlockListener()); + NeoForge.EVENT_BUS.register(new NetworkNodeListener()); + NeoForge.EVENT_BUS.register(new NetworkListener()); + NeoForge.EVENT_BUS.register(new BlockListener()); API.instance().getStorageDiskRegistry().add(ItemStorageDiskFactory.ID, new ItemStorageDiskFactory()); API.instance().getStorageDiskRegistry().add(FluidStorageDiskFactory.ID, new FluidStorageDiskFactory()); - API.instance().getNetworkNodeRegistry().add(DiskDriveNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DiskDriveNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(CableNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CableNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(GridNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new GridNetworkNode(world, pos, GridType.NORMAL))); - API.instance().getNetworkNodeRegistry().add(GridNetworkNode.CRAFTING_ID, (tag, world, pos) -> readAndReturn(tag, new GridNetworkNode(world, pos, GridType.CRAFTING))); - API.instance().getNetworkNodeRegistry().add(GridNetworkNode.PATTERN_ID, (tag, world, pos) -> readAndReturn(tag, new GridNetworkNode(world, pos, GridType.PATTERN))); - API.instance().getNetworkNodeRegistry().add(GridNetworkNode.FLUID_ID, (tag, world, pos) -> readAndReturn(tag, new GridNetworkNode(world, pos, GridType.FLUID))); - - API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.ONE_K_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.ONE_K))); - API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.FOUR_K_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.FOUR_K))); - API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.SIXTEEN_K_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.SIXTEEN_K))); - API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.SIXTY_FOUR_K_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.SIXTY_FOUR_K))); - API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.CREATIVE_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.CREATIVE))); - - API.instance().getNetworkNodeRegistry().add(FluidStorageNetworkNode.SIXTY_FOUR_K_FLUID_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new FluidStorageNetworkNode(world, pos, FluidStorageType.SIXTY_FOUR_K))); - API.instance().getNetworkNodeRegistry().add(FluidStorageNetworkNode.TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new FluidStorageNetworkNode(world, pos, FluidStorageType.TWO_HUNDRED_FIFTY_SIX_K))); - API.instance().getNetworkNodeRegistry().add(FluidStorageNetworkNode.THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new FluidStorageNetworkNode(world, pos, FluidStorageType.THOUSAND_TWENTY_FOUR_K))); - API.instance().getNetworkNodeRegistry().add(FluidStorageNetworkNode.FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new FluidStorageNetworkNode(world, pos, FluidStorageType.FOUR_THOUSAND_NINETY_SIX_K))); - API.instance().getNetworkNodeRegistry().add(FluidStorageNetworkNode.CREATIVE_FLUID_STORAGE_BLOCK_ID, (tag, world, pos) -> readAndReturn(tag, new FluidStorageNetworkNode(world, pos, FluidStorageType.CREATIVE))); - - API.instance().getNetworkNodeRegistry().add(ExternalStorageNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new ExternalStorageNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(ImporterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new ImporterNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(ExporterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new ExporterNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(NetworkReceiverNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new NetworkReceiverNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(NetworkTransmitterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new NetworkTransmitterNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(RelayNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new RelayNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(DetectorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DetectorNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(SecurityManagerNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new SecurityManagerNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(InterfaceNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new InterfaceNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(FluidInterfaceNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new FluidInterfaceNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(WirelessTransmitterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new WirelessTransmitterNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(StorageMonitorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new StorageMonitorNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(ConstructorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new ConstructorNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(DestructorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DestructorNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(DiskManipulatorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DiskManipulatorNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(CrafterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CrafterNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(CrafterManagerNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CrafterManagerNetworkNode(world, pos))); - API.instance().getNetworkNodeRegistry().add(CraftingMonitorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CraftingMonitorNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(DiskDriveNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new DiskDriveNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry() + .add(CableNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CableNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(GridNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new GridNetworkNode(world, pos, GridType.NORMAL))); + API.instance().getNetworkNodeRegistry().add(GridNetworkNode.CRAFTING_ID, + (tag, world, pos) -> readAndReturn(tag, new GridNetworkNode(world, pos, GridType.CRAFTING))); + API.instance().getNetworkNodeRegistry().add(GridNetworkNode.PATTERN_ID, + (tag, world, pos) -> readAndReturn(tag, new GridNetworkNode(world, pos, GridType.PATTERN))); + API.instance().getNetworkNodeRegistry().add(GridNetworkNode.FLUID_ID, + (tag, world, pos) -> readAndReturn(tag, new GridNetworkNode(world, pos, GridType.FLUID))); + + API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.ONE_K_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.ONE_K))); + API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.FOUR_K_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.FOUR_K))); + API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.SIXTEEN_K_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.SIXTEEN_K))); + API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.SIXTY_FOUR_K_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.SIXTY_FOUR_K))); + API.instance().getNetworkNodeRegistry().add(StorageNetworkNode.CREATIVE_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, new StorageNetworkNode(world, pos, ItemStorageType.CREATIVE))); + + API.instance().getNetworkNodeRegistry().add(FluidStorageNetworkNode.SIXTY_FOUR_K_FLUID_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, + new FluidStorageNetworkNode(world, pos, FluidStorageType.SIXTY_FOUR_K))); + API.instance().getNetworkNodeRegistry() + .add(FluidStorageNetworkNode.TWO_HUNDRED_FIFTY_SIX_K_FLUID_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, + new FluidStorageNetworkNode(world, pos, FluidStorageType.TWO_HUNDRED_FIFTY_SIX_K))); + API.instance().getNetworkNodeRegistry() + .add(FluidStorageNetworkNode.THOUSAND_TWENTY_FOUR_K_FLUID_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, + new FluidStorageNetworkNode(world, pos, FluidStorageType.THOUSAND_TWENTY_FOUR_K))); + API.instance().getNetworkNodeRegistry() + .add(FluidStorageNetworkNode.FOUR_THOUSAND_NINETY_SIX_K_FLUID_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, + new FluidStorageNetworkNode(world, pos, FluidStorageType.FOUR_THOUSAND_NINETY_SIX_K))); + API.instance().getNetworkNodeRegistry().add(FluidStorageNetworkNode.CREATIVE_FLUID_STORAGE_BLOCK_ID, + (tag, world, pos) -> readAndReturn(tag, + new FluidStorageNetworkNode(world, pos, FluidStorageType.CREATIVE))); + + API.instance().getNetworkNodeRegistry().add(ExternalStorageNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new ExternalStorageNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry() + .add(ImporterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new ImporterNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry() + .add(ExporterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new ExporterNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(NetworkReceiverNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new NetworkReceiverNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(NetworkTransmitterNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new NetworkTransmitterNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry() + .add(RelayNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new RelayNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry() + .add(DetectorNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new DetectorNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(SecurityManagerNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new SecurityManagerNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(InterfaceNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new InterfaceNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(FluidInterfaceNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new FluidInterfaceNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(WirelessTransmitterNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new WirelessTransmitterNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(StorageMonitorNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new StorageMonitorNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(ConstructorNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new ConstructorNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(DestructorNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new DestructorNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(DiskManipulatorNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new DiskManipulatorNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry() + .add(CrafterNetworkNode.ID, (tag, world, pos) -> readAndReturn(tag, new CrafterNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(CrafterManagerNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new CrafterManagerNetworkNode(world, pos))); + API.instance().getNetworkNodeRegistry().add(CraftingMonitorNetworkNode.ID, + (tag, world, pos) -> readAndReturn(tag, new CraftingMonitorNetworkNode(world, pos))); API.instance().getGridManager().add(GridBlockGridFactory.ID, new GridBlockGridFactory()); API.instance().getGridManager().add(WirelessGridGridFactory.ID, new WirelessGridGridFactory()); @@ -108,13 +177,19 @@ public static void onCommonSetup(FMLCommonSetupEvent e) { API.instance().addExternalStorageProvider(StorageType.ITEM, new ItemExternalStorageProvider()); API.instance().addExternalStorageProvider(StorageType.FLUID, new FluidExternalStorageProvider()); - API.instance().getCraftingPreviewElementRegistry().add(ItemCraftingPreviewElement.ID, ItemCraftingPreviewElement::read); - API.instance().getCraftingPreviewElementRegistry().add(FluidCraftingPreviewElement.ID, FluidCraftingPreviewElement::read); - API.instance().getCraftingPreviewElementRegistry().add(ErrorCraftingPreviewElement.ID, ErrorCraftingPreviewElement::read); + API.instance().getCraftingPreviewElementRegistry() + .add(ItemCraftingPreviewElement.ID, ItemCraftingPreviewElement::read); + API.instance().getCraftingPreviewElementRegistry() + .add(FluidCraftingPreviewElement.ID, FluidCraftingPreviewElement::read); + API.instance().getCraftingPreviewElementRegistry() + .add(ErrorCraftingPreviewElement.ID, ErrorCraftingPreviewElement::read); - API.instance().getCraftingMonitorElementRegistry().add(ItemCraftingMonitorElement.ID, ItemCraftingMonitorElement::read); - API.instance().getCraftingMonitorElementRegistry().add(FluidCraftingMonitorElement.ID, FluidCraftingMonitorElement::read); - API.instance().getCraftingMonitorElementRegistry().add(ErrorCraftingMonitorElement.ID, ErrorCraftingMonitorElement::read); + API.instance().getCraftingMonitorElementRegistry() + .add(ItemCraftingMonitorElement.ID, ItemCraftingMonitorElement::read); + API.instance().getCraftingMonitorElementRegistry() + .add(FluidCraftingMonitorElement.ID, FluidCraftingMonitorElement::read); + API.instance().getCraftingMonitorElementRegistry() + .add(ErrorCraftingMonitorElement.ID, ErrorCraftingMonitorElement::read); API.instance().getCraftingTaskRegistry().add(CraftingTaskFactory.ID, new CraftingTaskFactory()); @@ -134,7 +209,87 @@ private static INetworkNode readAndReturn(CompoundTag tag, NetworkNode node) { } @SubscribeEvent - public static void onRegisterCapabilities(RegisterCapabilitiesEvent e) { - e.register(INetworkNodeProxy.class); + public static void onRegisterNetworkPackets(final RegisterPayloadHandlerEvent event) { + final IPayloadRegistrar registrar = event.registrar(RS.ID); + RS.NETWORK_HANDLER.register(registrar); + } + + @SubscribeEvent + public static void onRegisterCapabilities(final RegisterCapabilitiesEvent e) { + e.registerBlockEntity( + Capabilities.ItemHandler.BLOCK, + RSBlockEntities.CRAFTER.get(), + CrafterBlockEntity::getPatterns + ); + e.registerBlockEntity( + Capabilities.ItemHandler.BLOCK, + RSBlockEntities.DISK_MANIPULATOR.get(), + (be, side) -> be.getNode().getDisks() + ); + e.registerBlockEntity( + Capabilities.ItemHandler.BLOCK, + RSBlockEntities.FLUID_INTERFACE.get(), + (be, side) -> be.getNode().getIn() + ); + e.registerBlockEntity( + Capabilities.FluidHandler.BLOCK, + RSBlockEntities.FLUID_INTERFACE.get(), + (be, side) -> be.getNode().getTank() + ); + e.registerBlockEntity( + Capabilities.ItemHandler.BLOCK, + RSBlockEntities.INTERFACE.get(), + (be, side) -> be.getNode().getItems() + ); + e.registerBlockEntity( + Capabilities.ItemHandler.BLOCK, + RSBlockEntities.DISK_DRIVE.get(), + (be, side) -> be.getNode().getDisks() + ); + e.registerBlockEntity( + Capabilities.ItemHandler.BLOCK, + RSBlockEntities.NETWORK_TRANSMITTER.get(), + (be, side) -> be.getNode().getNetworkCard() + ); + e.registerBlockEntity( + Capabilities.EnergyStorage.BLOCK, + RSBlockEntities.CONTROLLER.get(), + (be, side) -> be.getNetwork().getEnergyStorage() + ); + e.registerBlockEntity( + Capabilities.ItemHandler.BLOCK, + RSBlockEntities.GRID.get(), + (be, side) -> be.getInventory() + ); + e.registerBlockEntity( + Capabilities.EnergyStorage.BLOCK, + RSBlockEntities.PORTABLE_GRID.get(), + (be, side) -> be.getEnergyStorage() + ); + RSItems.CONTROLLER.values().forEach(value -> e.registerItem( + Capabilities.EnergyStorage.ITEM, + (stack, ctx) -> value.get().createEnergyStorage(stack), + value.get() + )); + e.registerItem( + Capabilities.EnergyStorage.ITEM, + (stack, ctx) -> RSItems.PORTABLE_GRID.get().createEnergyStorage(stack), + RSItems.PORTABLE_GRID.get() + ); + e.registerItem( + Capabilities.EnergyStorage.ITEM, + (stack, ctx) -> RSItems.WIRELESS_GRID.get().createEnergyStorage(stack), + RSItems.WIRELESS_GRID.get() + ); + e.registerItem( + Capabilities.EnergyStorage.ITEM, + (stack, ctx) -> RSItems.WIRELESS_FLUID_GRID.get().createEnergyStorage(stack), + RSItems.WIRELESS_FLUID_GRID.get() + ); + e.registerItem( + Capabilities.EnergyStorage.ITEM, + (stack, ctx) -> RSItems.WIRELESS_CRAFTING_MONITOR.get().createEnergyStorage(stack), + RSItems.WIRELESS_CRAFTING_MONITOR.get() + ); } } diff --git a/src/main/java/com/refinedmods/refinedstorage/setup/ServerSetup.java b/src/main/java/com/refinedmods/refinedstorage/setup/ServerSetup.java index 85b09d585f..949e4cd902 100644 --- a/src/main/java/com/refinedmods/refinedstorage/setup/ServerSetup.java +++ b/src/main/java/com/refinedmods/refinedstorage/setup/ServerSetup.java @@ -7,8 +7,8 @@ import com.refinedmods.refinedstorage.command.network.ListNetworkCommand; import com.refinedmods.refinedstorage.command.pattern.PatternDumpCommand; import net.minecraft.commands.Commands; -import net.minecraftforge.event.RegisterCommandsEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.RegisterCommandsEvent; public class ServerSetup { @SubscribeEvent diff --git a/src/main/java/com/refinedmods/refinedstorage/util/BlockColorMap.java b/src/main/java/com/refinedmods/refinedstorage/util/BlockColorMap.java new file mode 100644 index 0000000000..fbeded2608 --- /dev/null +++ b/src/main/java/com/refinedmods/refinedstorage/util/BlockColorMap.java @@ -0,0 +1,89 @@ +package com.refinedmods.refinedstorage.util; + +import com.refinedmods.refinedstorage.RS; +import com.refinedmods.refinedstorage.RSBlocks; +import com.refinedmods.refinedstorage.block.BaseBlock; +import com.refinedmods.refinedstorage.block.BlockDirection; +import com.refinedmods.refinedstorage.block.NetworkNodeBlock; + +import java.util.List; +import java.util.function.Supplier; + +import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.tags.BlockTags; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.GameType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; + +public class BlockColorMap extends ColorMap { + public BlockColorMap(DeferredRegister registry) { + super(registry); + } + + public BlockColorMap(DeferredRegister registry, List lateRegistration) { + super(registry, lateRegistration); + } + + public Block[] getBlocks() { + return map.values().stream().map(DeferredHolder::get).toArray(Block[]::new); + } + + public void registerBlocks(String name, Supplier blockFactory) { + for (DyeColor color : DyeColor.values()) { + String prefix = color != DEFAULT_COLOR ? color + "_" : ""; + DeferredHolder block = registry.register(prefix + name, blockFactory); + map.put(color, block); + RSBlocks.COLORED_BLOCKS.add(block); + } + RSBlocks.COLORED_BLOCK_TAGS.put( + BlockTags.create(new ResourceLocation(RS.ID, get(DEFAULT_COLOR).getId().getPath())), + this + ); + } + + public InteractionResult changeBlockColor(BlockState state, ItemStack heldItem, Level level, + BlockPos pos, Player player) { + DyeColor color = DyeColor.getColor(heldItem); + if (color == null || state.getBlock().equals(map.get(color).get())) { + return InteractionResult.PASS; + } + + return setBlockState(getNewState((DeferredHolder) map.get(color), state), heldItem, level, pos, + player); + } + + private BlockState getNewState(DeferredHolder block, BlockState state) { + BlockState newState = block.get().defaultBlockState(); + + if (((NetworkNodeBlock) block.get()).hasConnectedState()) { + newState = newState.setValue(NetworkNodeBlock.CONNECTED, state.getValue(NetworkNodeBlock.CONNECTED)); + } + if (block.get().getDirection() != BlockDirection.NONE) { + newState = newState.setValue(block.get().getDirection().getProperty(), + state.getValue(block.get().getDirection().getProperty())); + } + + return newState; + } + + public InteractionResult setBlockState(BlockState newState, ItemStack heldItem, Level level, BlockPos pos, + Player player) { + if (!level.isClientSide) { + level.setBlockAndUpdate(pos, newState); + if (((ServerPlayer) player).gameMode.getGameModeForPlayer() != GameType.CREATIVE) { + heldItem.shrink(1); + } + } + + return InteractionResult.SUCCESS; + } +} diff --git a/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java b/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java index aff9ec919f..83e63907f9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java +++ b/src/main/java/com/refinedmods/refinedstorage/util/ColorMap.java @@ -1,55 +1,34 @@ package com.refinedmods.refinedstorage.util; -import com.refinedmods.refinedstorage.RS; -import com.refinedmods.refinedstorage.RSBlocks; -import com.refinedmods.refinedstorage.RSItems; -import com.refinedmods.refinedstorage.block.BaseBlock; -import com.refinedmods.refinedstorage.block.BlockDirection; -import com.refinedmods.refinedstorage.block.NetworkNodeBlock; -import com.refinedmods.refinedstorage.item.blockitem.ColoredBlockItem; -import net.minecraft.core.BlockPos; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.ItemTags; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.DyeColor; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.GameType; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.RegistryObject; - -import java.util.*; +import java.util.Collection; +import java.util.EnumMap; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.function.BiConsumer; -import java.util.function.Supplier; -public class ColorMap { - public static final DyeColor DEFAULT_COLOR = DyeColor.LIGHT_BLUE; +import net.minecraft.world.item.DyeColor; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; - private final Map> map = new EnumMap<>(DyeColor.class); +public class ColorMap { + public static final DyeColor DEFAULT_COLOR = DyeColor.LIGHT_BLUE; + protected final Map> map = new EnumMap<>(DyeColor.class); private final Map colorByBlock = new HashMap<>(); + protected final DeferredRegister registry; + protected List lateRegistration; - private DeferredRegister itemRegister; - private DeferredRegister blockRegister; - private List lateRegistration; - - public ColorMap(DeferredRegister blockRegister) { - this.blockRegister = blockRegister; + public ColorMap(DeferredRegister registry) { + this.registry = registry; } - public ColorMap(DeferredRegister itemRegister, List lateRegistration) { - this.itemRegister = itemRegister; + public ColorMap(DeferredRegister registry, List lateRegistration) { + this.registry = registry; this.lateRegistration = lateRegistration; } - public RegistryObject get(DyeColor color) { + public DeferredHolder get(DyeColor color) { return map.get(color); } @@ -60,85 +39,15 @@ public DyeColor getColorFromObject(T object) { return colorByBlock.get(object); } - public Collection> values() { + public Collection> values() { return map.values(); } - public void put(DyeColor color, RegistryObject object) { + public void put(DyeColor color, DeferredHolder object) { map.put(color, object); } - public void forEach(BiConsumer> consumer) { + public void forEach(BiConsumer> consumer) { map.forEach(consumer); } - - public Block[] getBlocks() { - return map.values().stream().map(RegistryObject::get).toArray(Block[]::new); - } - - public void registerBlocks(String name, Supplier blockFactory) { - for (DyeColor color : DyeColor.values()) { - String prefix = color != DEFAULT_COLOR ? color + "_" : ""; - RegistryObject block = blockRegister.register(prefix + name, blockFactory); - map.put(color, (RegistryObject) block); - RSBlocks.COLORED_BLOCKS.add(block); - } - RSBlocks.COLORED_BLOCK_TAGS.put(BlockTags.create(new ResourceLocation(RS.ID, get(DEFAULT_COLOR).getId().getPath())), (ColorMap) this); - } - - public void registerItemsFromBlocks(ColorMap blockMap) { - RegistryObject originalBlock = blockMap.get(DEFAULT_COLOR); - map.put(DEFAULT_COLOR, registerBlockItemFor(originalBlock, DEFAULT_COLOR, originalBlock)); - lateRegistration.add(() -> blockMap.forEach((color, block) -> { - if (color != DEFAULT_COLOR) { - map.put(color, registerBlockItemFor(block, color, originalBlock)); - } - })); - RSItems.COLORED_ITEM_TAGS.put(ItemTags.create(new ResourceLocation(RS.ID, blockMap.get(DEFAULT_COLOR).getId().getPath())), (ColorMap) this); - } - - private RegistryObject registerBlockItemFor(RegistryObject block, DyeColor color, RegistryObject translationBlock) { - return (RegistryObject) itemRegister.register( - block.getId().getPath(), - () -> new ColoredBlockItem( - block.get(), - new Item.Properties(), - color, - BlockUtils.getBlockTranslation(translationBlock.get()) - ) - ); - } - - public InteractionResult changeBlockColor(BlockState state, ItemStack heldItem, Level level, BlockPos pos, Player player) { - DyeColor color = DyeColor.getColor(heldItem); - if (color == null || state.getBlock().equals(map.get(color).get())) { - return InteractionResult.PASS; - } - - return setBlockState(getNewState((RegistryObject) map.get(color), state), heldItem, level, pos, player); - } - - private BlockState getNewState(RegistryObject block, BlockState state) { - BlockState newState = block.get().defaultBlockState(); - - if (((NetworkNodeBlock) block.get()).hasConnectedState()) { - newState = newState.setValue(NetworkNodeBlock.CONNECTED, state.getValue(NetworkNodeBlock.CONNECTED)); - } - if (block.get().getDirection() != BlockDirection.NONE) { - newState = newState.setValue(block.get().getDirection().getProperty(), state.getValue(block.get().getDirection().getProperty())); - } - - return newState; - } - - public InteractionResult setBlockState(BlockState newState, ItemStack heldItem, Level level, BlockPos pos, Player player) { - if (!level.isClientSide) { - level.setBlockAndUpdate(pos, newState); - if (((ServerPlayer) player).gameMode.getGameModeForPlayer() != GameType.CREATIVE) { - heldItem.shrink(1); - } - } - - return InteractionResult.SUCCESS; - } } diff --git a/src/main/java/com/refinedmods/refinedstorage/util/ItemColorMap.java b/src/main/java/com/refinedmods/refinedstorage/util/ItemColorMap.java new file mode 100644 index 0000000000..714d215f79 --- /dev/null +++ b/src/main/java/com/refinedmods/refinedstorage/util/ItemColorMap.java @@ -0,0 +1,57 @@ +package com.refinedmods.refinedstorage.util; + +import com.refinedmods.refinedstorage.RS; +import com.refinedmods.refinedstorage.RSItems; +import com.refinedmods.refinedstorage.block.BaseBlock; +import com.refinedmods.refinedstorage.item.blockitem.ColoredBlockItem; + +import java.util.List; + +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.ItemTags; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.neoforged.neoforge.registries.DeferredHolder; +import net.neoforged.neoforge.registries.DeferredRegister; + +public class ItemColorMap extends ColorMap { + public ItemColorMap(DeferredRegister registry) { + super(registry); + } + + public ItemColorMap(DeferredRegister registry, List lateRegistration) { + super(registry, lateRegistration); + } + + public void registerItemsFromBlocks(ColorMap blockMap) { + DeferredHolder originalBlock = blockMap.get(DEFAULT_COLOR); + map.put(DEFAULT_COLOR, registerBlockItemFor(originalBlock, DEFAULT_COLOR, originalBlock)); + lateRegistration.add(() -> blockMap.forEach((color, block) -> { + if (color != DEFAULT_COLOR) { + map.put(color, registerBlockItemFor(block, color, originalBlock)); + } + })); + RSItems.COLORED_ITEM_TAGS.put( + ItemTags.create(new ResourceLocation(RS.ID, blockMap.get(DEFAULT_COLOR).getId().getPath())), + this + ); + } + + private DeferredHolder registerBlockItemFor( + DeferredHolder block, + DyeColor color, + DeferredHolder translationBlock + ) { + return registry.register( + block.getId().getPath(), + () -> new ColoredBlockItem( + block.get(), + new Item.Properties(), + color, + BlockUtils.getBlockTranslation(translationBlock.get()) + ) + ); + } +} diff --git a/src/main/java/com/refinedmods/refinedstorage/util/LevelUtils.java b/src/main/java/com/refinedmods/refinedstorage/util/LevelUtils.java index f797a55d42..3443734cee 100644 --- a/src/main/java/com/refinedmods/refinedstorage/util/LevelUtils.java +++ b/src/main/java/com/refinedmods/refinedstorage/util/LevelUtils.java @@ -1,7 +1,12 @@ package com.refinedmods.refinedstorage.util; -import com.mojang.authlib.GameProfile; import com.refinedmods.refinedstorage.render.Styles; + +import java.util.Optional; +import java.util.UUID; +import javax.annotation.Nullable; + +import com.mojang.authlib.GameProfile; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.network.chat.Component; @@ -12,21 +17,16 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.ClipContext; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.common.util.FakePlayerFactory; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.wrapper.InvWrapper; -import net.minecraftforge.items.wrapper.SidedInvWrapper; - -import javax.annotation.Nullable; -import java.util.Optional; -import java.util.UUID; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.common.util.FakePlayer; +import net.neoforged.neoforge.common.util.FakePlayerFactory; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.wrapper.InvWrapper; +import net.neoforged.neoforge.items.wrapper.SidedInvWrapper; public final class LevelUtils { private LevelUtils() { @@ -40,29 +40,26 @@ public static void updateBlock(@Nullable Level level, BlockPos pos) { } } - public static IItemHandler getItemHandler(@Nullable BlockEntity blockEntity, Direction side) { - if (blockEntity == null) { + public static IItemHandler getItemHandler(@Nullable Level level, BlockPos pos, Direction side) { + if (level == null) { return null; } - - IItemHandler handler = blockEntity.getCapability(ForgeCapabilities.ITEM_HANDLER, side).orElse(null); + IItemHandler handler = level.getCapability(Capabilities.ItemHandler.BLOCK, pos, side); if (handler == null) { - if (side != null && blockEntity instanceof WorldlyContainer) { - handler = new SidedInvWrapper((WorldlyContainer) blockEntity, side); - } else if (blockEntity instanceof Container) { - handler = new InvWrapper((Container) blockEntity); + if (level instanceof WorldlyContainer) { + handler = new SidedInvWrapper((WorldlyContainer) level, side); + } else if (level instanceof Container) { + handler = new InvWrapper((Container) level); } } - return handler; } - public static IFluidHandler getFluidHandler(@Nullable BlockEntity blockEntity, Direction side) { - if (blockEntity != null) { - return blockEntity.getCapability(ForgeCapabilities.FLUID_HANDLER, side).orElse(null); + public static IFluidHandler getFluidHandler(@Nullable Level level, BlockPos pos, Direction side) { + if (level == null) { + return null; } - - return null; + return level.getCapability(Capabilities.FluidHandler.BLOCK, pos, side); } public static FakePlayer getFakePlayer(ServerLevel level, @Nullable UUID owner) { @@ -80,7 +77,8 @@ public static FakePlayer getFakePlayer(ServerLevel level, @Nullable UUID owner) } public static void sendNoPermissionMessage(Player player) { - player.sendSystemMessage(Component.translatable("misc.refinedstorage.security.no_permission").setStyle(Styles.RED)); + player.sendSystemMessage( + Component.translatable("misc.refinedstorage.security.no_permission").setStyle(Styles.RED)); } public static HitResult rayTracePlayer(Level level, Player player) { diff --git a/src/main/java/com/refinedmods/refinedstorage/util/NetworkUtils.java b/src/main/java/com/refinedmods/refinedstorage/util/NetworkUtils.java index 452f19f63c..9cb6ad0200 100644 --- a/src/main/java/com/refinedmods/refinedstorage/util/NetworkUtils.java +++ b/src/main/java/com/refinedmods/refinedstorage/util/NetworkUtils.java @@ -6,7 +6,6 @@ import com.refinedmods.refinedstorage.api.network.security.Permission; import com.refinedmods.refinedstorage.api.util.Action; import com.refinedmods.refinedstorage.apiimpl.API; -import com.refinedmods.refinedstorage.capability.NetworkNodeProxyCapability; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -23,13 +22,9 @@ private NetworkUtils() { @Nullable public static INetworkNode getNodeFromBlockEntity(@Nullable BlockEntity blockEntity) { - if (blockEntity != null) { - INetworkNodeProxy proxy = blockEntity.getCapability(NetworkNodeProxyCapability.NETWORK_NODE_PROXY_CAPABILITY).orElse(null); - if (proxy != null) { - return proxy.getNode(); - } + if (blockEntity instanceof INetworkNodeProxy proxy) { + return proxy.getNode(); } - return null; } @@ -38,7 +33,6 @@ public static INetwork getNetworkFromNode(@Nullable INetworkNode node) { if (node != null) { return node.getNetwork(); } - return null; } diff --git a/src/main/java/com/refinedmods/refinedstorage/util/RenderUtils.java b/src/main/java/com/refinedmods/refinedstorage/util/RenderUtils.java index ba87109153..edf2e5390f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/util/RenderUtils.java +++ b/src/main/java/com/refinedmods/refinedstorage/util/RenderUtils.java @@ -19,11 +19,10 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.block.state.BlockState; -import net.minecraftforge.client.model.data.ModelData; -import net.minecraftforge.fluids.FluidStack; +import net.neoforged.neoforge.client.model.data.ModelData; +import net.neoforged.neoforge.fluids.FluidStack; import org.joml.Quaternionf; import org.joml.Vector3f; - import java.util.HashSet; import java.util.List; import java.util.Set; @@ -131,6 +130,7 @@ public static boolean inBounds(int x, int y, int w, int h, double ox, double oy) return ox >= x && ox <= x + w && oy >= y && oy <= y + h; } + // TODO: Covers have an invalid sprite. public static TextureAtlasSprite getSprite(BakedModel coverModel, BlockState coverState, Direction facing, RandomSource rand) { TextureAtlasSprite sprite = null; diff --git a/src/main/java/com/refinedmods/refinedstorage/util/StackUtils.java b/src/main/java/com/refinedmods/refinedstorage/util/StackUtils.java index a9be05da7b..864924419e 100644 --- a/src/main/java/com/refinedmods/refinedstorage/util/StackUtils.java +++ b/src/main/java/com/refinedmods/refinedstorage/util/StackUtils.java @@ -6,8 +6,16 @@ import com.refinedmods.refinedstorage.api.storage.tracker.StorageTrackerEntry; import com.refinedmods.refinedstorage.apiimpl.API; import com.refinedmods.refinedstorage.inventory.item.BaseItemHandler; +import com.refinedmods.refinedstorage.network.grid.GridStackDelta; import com.refinedmods.refinedstorage.screen.grid.stack.FluidGridStack; import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack; + +import java.util.UUID; +import java.util.function.Function; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.nbt.Tag; @@ -18,100 +26,91 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -import net.minecraftforge.common.capabilities.ForgeCapabilities; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fluids.capability.IFluidHandlerItem; -import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; -import net.minecraftforge.items.ItemHandlerHelper; -import net.minecraftforge.registries.ForgeRegistries; +import net.neoforged.neoforge.attachment.AttachmentInternals; +import net.neoforged.neoforge.capabilities.Capabilities; +import net.neoforged.neoforge.fluids.FluidStack; +import net.neoforged.neoforge.fluids.FluidType; +import net.neoforged.neoforge.fluids.capability.IFluidHandler; +import net.neoforged.neoforge.fluids.capability.IFluidHandlerItem; +import net.neoforged.neoforge.items.IItemHandler; +import net.neoforged.neoforge.items.IItemHandlerModifiable; +import net.neoforged.neoforge.items.ItemHandlerHelper; import org.apache.commons.lang3.tuple.Pair; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import java.util.Objects; -import java.util.UUID; -import java.util.function.Function; public final class StackUtils { public static final ItemStack EMPTY_BUCKET = new ItemStack(Items.BUCKET); private static final String NBT_INVENTORY = "Inventory_%d"; private static final String NBT_SLOT = "Slot"; - private static final String NBT_FORGE_CAPS = "ForgeCaps"; // @Volatile - private static final Logger LOGGER = LogManager.getLogger(StackUtils.class); private static final String NBT_ITEM_ID = "Id"; private static final String NBT_ITEM_QUANTITY = "Quantity"; private static final String NBT_ITEM_NBT = "NBT"; - private static final String NBT_ITEM_CAPS = "Caps"; private StackUtils() { } - // @Volatile: from PacketBuffer#writeItemStack, with some tweaks to allow int stack counts + // @Volatile: from FriendlyByteBuf#writeItem, but allows int item stack counts. public static void writeItemStack(FriendlyByteBuf buf, @Nonnull ItemStack stack) { if (stack.isEmpty()) { buf.writeBoolean(false); } else { buf.writeBoolean(true); - Item item = stack.getItem(); - - buf.writeVarInt(Item.getId(item)); + buf.writeId(BuiltInRegistries.ITEM, item); buf.writeInt(stack.getCount()); - - CompoundTag tag = null; - - if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) { - tag = stack.getTag(); + CompoundTag compoundtag = null; + if (item.isDamageable(stack) || item.shouldOverrideMultiplayerNbt()) { + compoundtag = stack.getTag(); } + compoundtag = AttachmentInternals.addAttachmentsToTag(compoundtag, stack, false); - buf.writeNbt(tag); + buf.writeNbt(compoundtag); } } - // @Volatile: from PacketBuffer#readItemStack, with some tweaks to allow int stack counts + // @Volatile: from FriendlyByteBuf#readItem, but allows int item stack counts. public static ItemStack readItemStack(FriendlyByteBuf buf) { if (!buf.readBoolean()) { return ItemStack.EMPTY; } else { - int id = buf.readVarInt(); - int count = buf.readInt(); - - ItemStack stack = new ItemStack(Item.byId(id), count); - - stack.readShareTag(buf.readNbt()); - - return stack; + Item item = buf.readById(BuiltInRegistries.ITEM); + int i = buf.readInt(); + return AttachmentInternals.reconstructItemStack(item, i, buf.readNbt()); } } - public static void writeItemGridStack(FriendlyByteBuf buf, ItemStack stack, UUID id, @Nullable UUID otherId, boolean craftable, @Nullable StorageTrackerEntry entry) { - writeItemStack(buf, stack); + public static void writeItemGridStackDelta(FriendlyByteBuf buf, GridStackDelta delta) { + buf.writeInt(delta.change()); + writeItemGridStack(buf, delta.stack()); + } - buf.writeBoolean(craftable); - buf.writeUUID(id); + public static void writeItemGridStack(FriendlyByteBuf buf, ItemGridStack stack) { + writeItemStack(buf, stack.getStack()); - buf.writeBoolean(otherId != null); - if (otherId != null) { - buf.writeUUID(otherId); + buf.writeBoolean(stack.isCraftable()); + buf.writeUUID(stack.getId()); + + buf.writeBoolean(stack.getOtherId() != null); + if (stack.getOtherId() != null) { + buf.writeUUID(stack.getOtherId()); } - if (entry == null) { + if (stack.getTrackerEntry() == null) { buf.writeBoolean(false); } else { buf.writeBoolean(true); - buf.writeLong(entry.getTime()); - buf.writeUtf(entry.getName()); + buf.writeLong(stack.getTrackerEntry().getTime()); + buf.writeUtf(stack.getTrackerEntry().getName()); } } + public static GridStackDelta readItemGridStackDelta(FriendlyByteBuf buf) { + int delta = buf.readInt(); + return new GridStackDelta<>(delta, readItemGridStack(buf)); + } + public static ItemGridStack readItemGridStack(FriendlyByteBuf buf) { ItemStack stack = readItemStack(buf); @@ -131,27 +130,37 @@ public static ItemGridStack readItemGridStack(FriendlyByteBuf buf) { return new ItemGridStack(id, otherId, stack, craftable, entry); } - public static void writeFluidGridStack(FriendlyByteBuf buf, FluidStack stack, UUID id, @Nullable UUID otherId, boolean craftable, @Nullable StorageTrackerEntry entry) { - stack.writeToPacket(buf); + public static void writeFluidGridStackDelta(FriendlyByteBuf buf, GridStackDelta delta) { + buf.writeInt(delta.change()); + writeFluidGridStack(buf, delta.stack()); + } + + public static void writeFluidGridStack(FriendlyByteBuf buf, FluidGridStack stack) { + stack.getStack().writeToPacket(buf); - buf.writeBoolean(craftable); - buf.writeUUID(id); + buf.writeBoolean(stack.isCraftable()); + buf.writeUUID(stack.getId()); - buf.writeBoolean(otherId != null); - if (otherId != null) { - buf.writeUUID(otherId); + buf.writeBoolean(stack.getOtherId() != null); + if (stack.getOtherId() != null) { + buf.writeUUID(stack.getOtherId()); } - if (entry == null) { + if (stack.getTrackerEntry() == null) { buf.writeBoolean(false); } else { buf.writeBoolean(true); - buf.writeLong(entry.getTime()); - buf.writeUtf(entry.getName()); + buf.writeLong(stack.getTrackerEntry().getTime()); + buf.writeUtf(stack.getTrackerEntry().getName()); } } + public static GridStackDelta readFluidGridStackDelta(FriendlyByteBuf buf) { + int delta = buf.readInt(); + return new GridStackDelta<>(delta, readFluidGridStack(buf)); + } + public static FluidGridStack readFluidGridStack(FriendlyByteBuf buf) { FluidStack stack = FluidStack.readFromPacket(buf); boolean craftable = buf.readBoolean(); @@ -167,11 +176,14 @@ public static FluidGridStack readFluidGridStack(FriendlyByteBuf buf) { entry = new StorageTrackerEntry(buf.readLong(), PacketBufferUtils.readString(buf)); } - return new FluidGridStack(id, otherId, stack, entry, craftable); + return new FluidGridStack(id, otherId, stack, craftable, entry); } @SuppressWarnings("unchecked") - public static void createStorages(ServerLevel level, ItemStack diskStack, int slot, IStorageDisk[] itemDisks, IStorageDisk[] fluidDisks, Function, IStorageDisk> itemDiskWrapper, Function, IStorageDisk> fluidDiskWrapper) { + public static void createStorages(ServerLevel level, ItemStack diskStack, int slot, + IStorageDisk[] itemDisks, IStorageDisk[] fluidDisks, + Function, IStorageDisk> itemDiskWrapper, + Function, IStorageDisk> fluidDiskWrapper) { if (diskStack.isEmpty()) { itemDisks[slot] = null; fluidDisks[slot] = null; @@ -193,7 +205,8 @@ public static void createStorages(ServerLevel level, ItemStack diskStack, int sl } } - public static void writeItems(IItemHandler handler, int id, CompoundTag tag, Function serializer) { + public static void writeItems(IItemHandler handler, int id, CompoundTag tag, + Function serializer) { ListTag tagList = new ListTag(); for (int i = 0; i < handler.getSlots(); i++) { @@ -213,7 +226,8 @@ public static void writeItems(IItemHandler handler, int id, CompoundTag tag) { writeItems(handler, id, tag, stack -> stack.save(new CompoundTag())); } - public static void readItems(IItemHandlerModifiable handler, int id, CompoundTag tag, Function deserializer) { + public static void readItems(IItemHandlerModifiable handler, int id, CompoundTag tag, + Function deserializer) { String name = String.format(NBT_INVENTORY, id); if (tag.contains(name)) { @@ -296,9 +310,10 @@ public static Pair getFluid(ItemStack stack, boolean simu stack = ItemHandlerHelper.copyStackWithSize(stack, 1); } - IFluidHandlerItem handler = stack.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM, null).orElse(null); + IFluidHandlerItem handler = stack.getCapability(Capabilities.FluidHandler.ITEM); if (handler != null) { - FluidStack result = handler.drain(FluidType.BUCKET_VOLUME, simulate ? IFluidHandler.FluidAction.SIMULATE : IFluidHandler.FluidAction.EXECUTE); + FluidStack result = handler.drain(FluidType.BUCKET_VOLUME, + simulate ? IFluidHandler.FluidAction.SIMULATE : IFluidHandler.FluidAction.EXECUTE); return Pair.of(handler.getContainer(), result); } @@ -307,53 +322,23 @@ public static Pair getFluid(ItemStack stack, boolean simu } public static CompoundTag serializeStackToNbt(@Nonnull ItemStack stack) { - CompoundTag dummy = new CompoundTag(); - CompoundTag itemTag = new CompoundTag(); - - ResourceLocation key = Objects.requireNonNull(ForgeRegistries.ITEMS.getKey(stack.getItem()), "Item is not registered"); + ResourceLocation key = BuiltInRegistries.ITEM.getKey(stack.getItem()); itemTag.putString(NBT_ITEM_ID, key.toString()); itemTag.putInt(NBT_ITEM_QUANTITY, stack.getCount()); - - if (stack.hasTag()) { - itemTag.put(NBT_ITEM_NBT, stack.getTag()); + var tag = AttachmentInternals.addAttachmentsToTag(stack.getTag(), stack, true); + if (tag != null) { + itemTag.put(NBT_ITEM_NBT, tag); } - - // @Volatile - stack.save(dummy); - if (dummy.contains(NBT_FORGE_CAPS)) { - itemTag.put(NBT_ITEM_CAPS, dummy.get(NBT_FORGE_CAPS)); - } - dummy.remove(NBT_FORGE_CAPS); - return itemTag; } @Nonnull public static ItemStack deserializeStackFromNbt(CompoundTag tag) { - Item item; - if (tag.contains(NBT_ITEM_ID)) { - item = ForgeRegistries.ITEMS.getValue(new ResourceLocation(tag.getString(NBT_ITEM_ID))); - - if (item == null) { - LOGGER.warn("Could not deserialize item from string ID {}, it no longer exists", tag.getString(NBT_ITEM_ID)); - } - } else { - throw new IllegalStateException("Cannot deserialize ItemStack: no " + NBT_ITEM_ID + " tag was found!"); - } - - if (item == null) { - return ItemStack.EMPTY; - } - - ItemStack stack = new ItemStack( - item, + return AttachmentInternals.reconstructItemStack( + BuiltInRegistries.ITEM.get(new ResourceLocation(tag.getString(NBT_ITEM_ID))), tag.getInt(NBT_ITEM_QUANTITY), - tag.contains(NBT_ITEM_CAPS) ? tag.getCompound(NBT_ITEM_CAPS) : null + tag.getCompound(NBT_ITEM_NBT) ); - - stack.setTag(tag.contains(NBT_ITEM_NBT) ? tag.getCompound(NBT_ITEM_NBT) : null); - - return stack; } } diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 69d3c299d0..6f6fca2477 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -1,6 +1,6 @@ -protected net.minecraft.world.inventory.AbstractContainerMenu f_38841_ # inventoryItemStacks -protected net.minecraft.world.inventory.AbstractContainerMenu f_38848_ # listeners -protected net.minecraft.client.gui.components.EditBox f_94097_ # canLoseFocus -public net.minecraft.client.gui.components.Checkbox f_93822_ # checked -public-f net.minecraft.world.inventory.Slot f_40221_ # yPos -public net.minecraft.client.gui.GuiGraphics m_280497_(Lnet/minecraft/client/gui/Font;Ljava/util/List;IILnet/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipPositioner;)V # renderTooltipInternal +protected net.minecraft.world.inventory.AbstractContainerMenu lastSlots +protected net.minecraft.world.inventory.AbstractContainerMenu containerListeners +protected net.minecraft.client.gui.components.EditBox canLoseFocus +public net.minecraft.client.gui.components.Checkbox selected +public-f net.minecraft.world.inventory.Slot y +public net.minecraft.client.gui.GuiGraphics renderTooltipInternal(Lnet/minecraft/client/gui/Font;Ljava/util/List;IILnet/minecraft/client/gui/screens/inventory/tooltip/ClientTooltipPositioner;)V diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 58e70eb8c5..426a906e8f 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader = "javafml" -loaderVersion = "[47,)" +loaderVersion = "[2,)" issueTrackerURL = "https://github.com/refinedmods/refinedstorage" license="MIT" [[mods]] diff --git a/src/main/resources/assets/refinedstorage/models/block/constructor_destructor.json b/src/main/resources/assets/refinedstorage/models/block/constructor_destructor.json index 6c626cf51f..12f219af26 100755 --- a/src/main/resources/assets/refinedstorage/models/block/constructor_destructor.json +++ b/src/main/resources/assets/refinedstorage/models/block/constructor_destructor.json @@ -154,7 +154,7 @@ 16.0, 16.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/cube_all_cutout.json b/src/main/resources/assets/refinedstorage/models/block/cube_all_cutout.json index 2e05c5d6a6..2cb0d1c1f3 100644 --- a/src/main/resources/assets/refinedstorage/models/block/cube_all_cutout.json +++ b/src/main/resources/assets/refinedstorage/models/block/cube_all_cutout.json @@ -55,7 +55,7 @@ "up": { "texture": "#cutout", "cullface": "up", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -63,7 +63,7 @@ "down": { "texture": "#cutout", "cullface": "down", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -71,7 +71,7 @@ "north": { "texture": "#cutout", "cullface": "north", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -79,7 +79,7 @@ "south": { "texture": "#cutout", "cullface": "south", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -87,7 +87,7 @@ "west": { "texture": "#cutout", "cullface": "west", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -95,7 +95,7 @@ "east": { "texture": "#cutout", "cullface": "east", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/cube_cutout.json b/src/main/resources/assets/refinedstorage/models/block/cube_cutout.json index b9de77b3c1..418944f694 100644 --- a/src/main/resources/assets/refinedstorage/models/block/cube_cutout.json +++ b/src/main/resources/assets/refinedstorage/models/block/cube_cutout.json @@ -55,7 +55,7 @@ "up": { "texture": "#cutout_up", "cullface": "up", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -63,7 +63,7 @@ "down": { "texture": "#cutout_down", "cullface": "down", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -71,7 +71,7 @@ "north": { "texture": "#cutout_north", "cullface": "north", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -79,7 +79,7 @@ "south": { "texture": "#cutout_south", "cullface": "south", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -87,7 +87,7 @@ "west": { "texture": "#cutout_west", "cullface": "west", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -95,7 +95,7 @@ "east": { "texture": "#cutout_east", "cullface": "east", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/cube_north_cutout.json b/src/main/resources/assets/refinedstorage/models/block/cube_north_cutout.json index b9c40af2b7..efefa7e08b 100644 --- a/src/main/resources/assets/refinedstorage/models/block/cube_north_cutout.json +++ b/src/main/resources/assets/refinedstorage/models/block/cube_north_cutout.json @@ -55,7 +55,7 @@ "north": { "texture": "#cutout", "cullface": "north", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/detector.json b/src/main/resources/assets/refinedstorage/models/block/detector.json index b5eab43f15..dad721bfee 100755 --- a/src/main/resources/assets/refinedstorage/models/block/detector.json +++ b/src/main/resources/assets/refinedstorage/models/block/detector.json @@ -91,7 +91,7 @@ 12 ], "texture": "#torch", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -104,7 +104,7 @@ 12 ], "texture": "#torch", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -133,7 +133,7 @@ 12 ], "texture": "#torch", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -146,7 +146,7 @@ 12 ], "texture": "#torch", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/disks/disk.json b/src/main/resources/assets/refinedstorage/models/block/disks/disk.json index a01e5be3a0..9d568cdb99 100644 --- a/src/main/resources/assets/refinedstorage/models/block/disks/disk.json +++ b/src/main/resources/assets/refinedstorage/models/block/disks/disk.json @@ -94,7 +94,7 @@ 3.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -107,7 +107,7 @@ 3.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -120,7 +120,7 @@ 3.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -133,7 +133,7 @@ 3.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -146,7 +146,7 @@ 3.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -159,7 +159,7 @@ 3.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/disks/disk_full.json b/src/main/resources/assets/refinedstorage/models/block/disks/disk_full.json index 9b103873a9..6ef35a71f5 100644 --- a/src/main/resources/assets/refinedstorage/models/block/disks/disk_full.json +++ b/src/main/resources/assets/refinedstorage/models/block/disks/disk_full.json @@ -95,7 +95,7 @@ 2.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -108,7 +108,7 @@ 2.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -121,7 +121,7 @@ 2.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -134,7 +134,7 @@ 2.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -147,7 +147,7 @@ 2.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -160,7 +160,7 @@ 2.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/disks/disk_near_capacity.json b/src/main/resources/assets/refinedstorage/models/block/disks/disk_near_capacity.json index 2ca29c683f..b1db3a87ef 100644 --- a/src/main/resources/assets/refinedstorage/models/block/disks/disk_near_capacity.json +++ b/src/main/resources/assets/refinedstorage/models/block/disks/disk_near_capacity.json @@ -95,7 +95,7 @@ 1.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -108,7 +108,7 @@ 1.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -121,7 +121,7 @@ 1.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -134,7 +134,7 @@ 1.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -147,7 +147,7 @@ 1.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -160,7 +160,7 @@ 1.0, 1.0 ], - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk.json b/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk.json index f760398670..9a4f835bb2 100644 --- a/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk.json +++ b/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk.json @@ -98,7 +98,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -111,7 +111,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -124,7 +124,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -137,7 +137,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -150,7 +150,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -163,7 +163,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk_full.json b/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk_full.json index 61e5715aa4..5a3296fcd2 100644 --- a/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk_full.json +++ b/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk_full.json @@ -98,7 +98,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -111,7 +111,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -124,7 +124,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -137,7 +137,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -150,7 +150,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -163,7 +163,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk_near_capacity.json b/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk_near_capacity.json index a78f671dfd..36c839754f 100644 --- a/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk_near_capacity.json +++ b/src/main/resources/assets/refinedstorage/models/block/disks/portable_grid_disk_near_capacity.json @@ -98,7 +98,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -111,7 +111,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -124,7 +124,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -137,7 +137,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -150,7 +150,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -163,7 +163,7 @@ 1 ], "texture": "#led", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/assets/refinedstorage/models/block/wireless_transmitter.json b/src/main/resources/assets/refinedstorage/models/block/wireless_transmitter.json index 42faebcd0f..32e7561bb0 100644 --- a/src/main/resources/assets/refinedstorage/models/block/wireless_transmitter.json +++ b/src/main/resources/assets/refinedstorage/models/block/wireless_transmitter.json @@ -127,7 +127,7 @@ 15 ], "texture": "#cutout", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -140,7 +140,7 @@ 8 ], "texture": "#cutout", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -168,7 +168,7 @@ 16 ], "texture": "#cutout", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -181,7 +181,7 @@ 16 ], "texture": "#cutout", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -209,7 +209,7 @@ 16 ], "texture": "#cutout", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } @@ -222,7 +222,7 @@ 16 ], "texture": "#cutout", - "forge_data": { + "neoforge_data": { "block_light": 15, "sky_light": 15 } diff --git a/src/main/resources/data/refinedstorage/recipes/fortune_1_upgrade.json b/src/main/resources/data/refinedstorage/recipes/fortune_1_upgrade.json index b68fb72ec8..d969b1e77e 100644 --- a/src/main/resources/data/refinedstorage/recipes/fortune_1_upgrade.json +++ b/src/main/resources/data/refinedstorage/recipes/fortune_1_upgrade.json @@ -1,8 +1,6 @@ { "type": "refinedstorage:upgrade_with_enchanted_book", - "enchantment": { - "level": 1, - "id": "minecraft:fortune" - }, + "enchantment": "minecraft:fortune", + "level": 1, "result": "refinedstorage:fortune_1_upgrade" } \ No newline at end of file diff --git a/src/main/resources/data/refinedstorage/recipes/fortune_2_upgrade.json b/src/main/resources/data/refinedstorage/recipes/fortune_2_upgrade.json index 4688b5cbcf..19a57e9693 100644 --- a/src/main/resources/data/refinedstorage/recipes/fortune_2_upgrade.json +++ b/src/main/resources/data/refinedstorage/recipes/fortune_2_upgrade.json @@ -1,8 +1,6 @@ { "type": "refinedstorage:upgrade_with_enchanted_book", - "enchantment": { - "level": 2, - "id": "minecraft:fortune" - }, + "enchantment": "minecraft:fortune", + "level": 2, "result": "refinedstorage:fortune_2_upgrade" } \ No newline at end of file diff --git a/src/main/resources/data/refinedstorage/recipes/fortune_3_upgrade.json b/src/main/resources/data/refinedstorage/recipes/fortune_3_upgrade.json index a14e3874e3..65741b104e 100644 --- a/src/main/resources/data/refinedstorage/recipes/fortune_3_upgrade.json +++ b/src/main/resources/data/refinedstorage/recipes/fortune_3_upgrade.json @@ -1,8 +1,6 @@ { "type": "refinedstorage:upgrade_with_enchanted_book", - "enchantment": { - "level": 3, - "id": "minecraft:fortune" - }, + "enchantment": "minecraft:fortune", + "level": 3, "result": "refinedstorage:fortune_3_upgrade" } \ No newline at end of file diff --git a/src/main/resources/data/refinedstorage/recipes/silk_touch_upgrade.json b/src/main/resources/data/refinedstorage/recipes/silk_touch_upgrade.json index ebc94e1bb8..f161c9012a 100644 --- a/src/main/resources/data/refinedstorage/recipes/silk_touch_upgrade.json +++ b/src/main/resources/data/refinedstorage/recipes/silk_touch_upgrade.json @@ -1,7 +1,5 @@ { "type": "refinedstorage:upgrade_with_enchanted_book", - "enchantment": { - "id": "minecraft:silk_touch" - }, + "enchantment": "minecraft:silk_touch", "result": "refinedstorage:silk_touch_upgrade" } \ No newline at end of file diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index ebb77d3ad2..795cdb4e1b 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -3,6 +3,6 @@ "description": { "text": "Refined Storage resources" }, - "pack_format": 15 + "pack_format": 18 } }