Added Wireless Charger and range extension Antennas. #1017

Merged
CrazyPants merged 13 commits from AddWirelessCharger into dev/1.21.1 2025-05-06 20:07:04 +00:00
CrazyPants commented 2025-02-27 09:09:36 +00:00 (Migrated from github.com)

Description

  • Added Wireless Charger and range extension Antennas.
  • Removed duplicate range GUI code into common widget
  • fixed rotation on obelisks so Enderman head facing the correct way

Checklist

  • My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you).
  • I have made corresponding changes to the documentation.
  • My changes are ready for review from a contributor.

Summary by CodeRabbit

  • New Features

    • Introduced the Wireless Charger block, including new antenna variants, with full in-game GUI and configuration options.
    • Wireless Charger can charge items in player inventories within a configurable range, extendable with antenna blocks.
    • New recipes, models, and textures for Wireless Charger and antennas.
    • Added range control widgets and improved range display in related machine GUIs.
  • Configuration

    • Added new server and client configuration options for Wireless Charger energy, range, and visual range colour.
  • Bug Fixes

    • Improved handling of re-equip animations and block break resets for specific tools.
  • Refactor

    • Standardised range button creation across machine GUIs.
    • Centralised maximum range logic for relevant machines.
  • Documentation

    • Added new translation keys and improved language support for Wireless Charger features.
  • Chores

    • Updated build and property files to use the latest dependency naming conventions.
# Description - Added Wireless Charger and range extension Antennas. - Removed duplicate range GUI code into common widget - fixed rotation on obelisks so Enderman head facing the correct way <!-- For drafts, fill this in as you go; if you are leaving draft, make sure these are all complete. --> # Checklist - [x] My code follows the style guidelines of this project (.editorconfig, most IDEs will use this for you). - [x] I have made corresponding changes to the documentation. - [x] My changes are ready for review from a contributor. <!-- Thanks to: https://embeddedartistry.com/blog/2017/08/04/a-github-pull-request-template-for-your-projects/ for the building blocks of this template --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced the Wireless Charger block, including new antenna variants, with full in-game GUI and configuration options. - Wireless Charger can charge items in player inventories within a configurable range, extendable with antenna blocks. - New recipes, models, and textures for Wireless Charger and antennas. - Added range control widgets and improved range display in related machine GUIs. - **Configuration** - Added new server and client configuration options for Wireless Charger energy, range, and visual range colour. - **Bug Fixes** - Improved handling of re-equip animations and block break resets for specific tools. - **Refactor** - Standardised range button creation across machine GUIs. - Centralised maximum range logic for relevant machines. - **Documentation** - Added new translation keys and improved language support for Wireless Charger features. - **Chores** - Updated build and property files to use the latest dependency naming conventions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
ferriarnus (Migrated from github.com) requested changes 2025-03-01 10:09:46 +00:00
ferriarnus (Migrated from github.com) left a comment

This seems good, but I think your IDE is formatting a bit too much stuff. I'm not sure where our editor config went, or maybe you need to try spotless to fix it @Rover656

This seems good, but I think your IDE is formatting a bit too much stuff. I'm not sure where our editor config went, or maybe you need to try spotless to fix it @Rover656
ferriarnus (Migrated from github.com) commented 2025-03-01 10:08:17 +00:00

these seem good to have, just mention it in the commit as well?

these seem good to have, just mention it in the commit as well?
@ -0,0 +22,4 @@
public WirelessChargerScreen(WirelessChargerMenu pMenu, Inventory pPlayerInventory, Component pTitle) {
super(pMenu, pPlayerInventory, pTitle);
imageWidth = WIDTH;
ferriarnus (Migrated from github.com) commented 2025-03-01 10:05:14 +00:00

I think we have a different method to do this

I think we have a different method to do this
CrazyPants (Migrated from github.com) reviewed 2025-03-02 07:13:36 +00:00
CrazyPants (Migrated from github.com) commented 2025-03-02 07:13:36 +00:00

How can I do this now? I don't think I can modify the commit message can I?

How can I do this now? I don't think I can modify the commit message can I?
CrazyPants (Migrated from github.com) reviewed 2025-03-02 07:15:11 +00:00
@ -0,0 +22,4 @@
public WirelessChargerScreen(WirelessChargerMenu pMenu, Inventory pPlayerInventory, Component pTitle) {
super(pMenu, pPlayerInventory, pTitle);
imageWidth = WIDTH;
CrazyPants (Migrated from github.com) commented 2025-03-02 07:15:11 +00:00

Sorry, no sure what you are referring to here.

Sorry, no sure what you are referring to here.
ferriarnus (Migrated from github.com) reviewed 2025-03-02 11:34:36 +00:00
@ -0,0 +22,4 @@
public WirelessChargerScreen(WirelessChargerMenu pMenu, Inventory pPlayerInventory, Component pTitle) {
super(pMenu, pPlayerInventory, pTitle);
imageWidth = WIDTH;
ferriarnus (Migrated from github.com) commented 2025-03-02 11:34:36 +00:00

Seems I was confused by the old design

Seems I was confused by the old design
ferriarnus (Migrated from github.com) reviewed 2025-03-02 11:35:32 +00:00
ferriarnus (Migrated from github.com) commented 2025-03-02 11:35:31 +00:00

just in the description of the pr would be fine, it's a small thing

just in the description of the pr would be fine, it's a small thing
ferriarnus (Migrated from github.com) approved these changes 2025-03-02 11:40:38 +00:00
ferriarnus (Migrated from github.com) requested changes 2025-03-15 13:03:22 +00:00
ferriarnus (Migrated from github.com) left a comment

Looks good and works perfectly, just some small things.

Looks good and works perfectly, just some small things.
@ -0,0 +1,22 @@
package com.enderio.machines.common.blocks.wireless_charger;
ferriarnus (Migrated from github.com) commented 2025-03-15 13:01:53 +00:00

Using a blockstate property for this is interesting. I just wonder if components + attachments might be better?

Using a blockstate property for this is interesting. I just wonder if components + attachments might be better?
@ -0,0 +7,4 @@
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
public class WirelessAntennaBlock extends Block {
ferriarnus (Migrated from github.com) commented 2025-03-15 13:00:48 +00:00

Just a small thing, but maybe give it a propper hitbox, not a full block

Just a small thing, but maybe give it a propper hitbox, not a full block
@ -0,0 +1,238 @@
package com.enderio.machines.common.blocks.wireless_charger;
ferriarnus (Migrated from github.com) commented 2025-03-15 12:50:46 +00:00

Hmm is this a different Nullable from what we normally use?

Hmm is this a different Nullable from what we normally use?
Rover656 (Migrated from github.com) reviewed 2025-03-16 20:22:57 +00:00
@ -0,0 +1,238 @@
package com.enderio.machines.common.blocks.wireless_charger;
Rover656 (Migrated from github.com) commented 2025-03-16 20:22:57 +00:00

Yes, we use the jetbrains annotations

Yes, we use the jetbrains annotations
Rover656 (Migrated from github.com) reviewed 2025-03-16 20:24:22 +00:00
@ -0,0 +1,22 @@
package com.enderio.machines.common.blocks.wireless_charger;
Rover656 (Migrated from github.com) commented 2025-03-16 20:24:22 +00:00

On blocks we should store data in the block entity. I mistakenly adopted attachments when we ported to Neo and have been working to undo this work.

Attachments - for adding data to stuff that isn't "yours".
Once MC changes to components however this story changes :)

On blocks we should store data in the block entity. I mistakenly adopted attachments when we ported to Neo and have been working to undo this work. Attachments - for adding data to stuff that isn't "yours". Once MC changes to components however this story changes :)
coderabbitai[bot] commented 2025-05-01 09:33:20 +00:00 (Migrated from github.com)

Walkthrough

This update introduces a new wireless charger machine and its antenna blocks, including their block entities, menus, GUIs, recipes, and data handling. It adds configuration options, translations, models, and range-extending mechanics. Additionally, it unifies range button creation in GUIs, enhances item animation logic, adjusts range handling in block entities, and updates build properties for dependency management.

Changes

File(s) / Path(s) Change Summary
enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java Added factory methods for range increase/decrease buttons and corresponding sprites.
enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java
enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java
enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java
Added overrides for re-equip animation and block break reset logic; minor formatting.
enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java Added new translation constant for "Maximum Range".
enderio-machines/src/main/java/com/enderio/machines/EnderIOMachines.java Registered new data provider for range extenders in data generation.
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/AversionObeliskScreen.java
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/DrainScreen.java
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/InhibitorObeliskScreen.java
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/RelocatorObeliskScreen.java
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/VacuumChestScreen.java
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/XPVacuumScreen.java
Refactored plus/minus range button creation to use common widget factory methods.
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java Added new GUI screen for the wireless charger machine.
enderio-machines/src/main/java/com/enderio/machines/client/rendering/blockentity/ObeliskBER.java Adjusted Y-axis rotation for rendered item orientation.
enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java Added maxRange field, updated codecs, and methods to handle new field.
enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java
enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java
enderio-machines/src/main/java/com/enderio/machines/common/blocks/farming_station/FarmingStationBlockEntity.java
Moved location of getMaxRange() method within class; no logic change.
enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java Added override for getMaxRange() returning 32.
enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/aversion/AversionObeliskBlockEntity.java
enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/inhibitor/InhibitorObeliskBlockEntity.java
enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/relocator/RelocatorObeliskBlockEntity.java
Removed redundant getMaxRange() overrides.
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessAntennaBlock.java Added new block class for wireless charger antenna with custom shape.
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java Added new block entity for the wireless charger, including range, charging, and persistence logic.
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java Added new menu for wireless charger, handling range controls and slots.
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/package-info.java Added package-level non-null annotations.
enderio-machines/src/main/java/com/enderio/machines/common/config/MachinesConfigLang.java Added translations for wireless charger-related configuration options.
enderio-machines/src/main/java/com/enderio/machines/common/config/client/MachinesClientBlocksConfig.java Added config value for wireless charger range colour.
enderio-machines/src/main/java/com/enderio/machines/common/config/common/EnergyConfig.java Added wireless charger energy config values; increased wired charger usage default.
enderio-machines/src/main/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java Added config value for wireless charger base range.
enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java Added new class for range extender data map and codec.
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java Minor import reordering.
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlockEntities.java Registered wireless charger block entity.
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlocks.java Registered wireless charger and antenna blocks; added helper for antenna registration.
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineDataMaps.java Registered range extender data map.
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineMenus.java Registered wireless charger menu and screen.
enderio-machines/src/main/java/com/enderio/machines/common/tag/MachineTags.java Added block tag for range extenders.
enderio-machines/src/main/java/com/enderio/machines/data/datamap/RangeExtenderDataProvider.java Added data provider for range extender block data.
enderio-machines/src/main/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java Added recipes for wireless charger and antennas; reformatted recipe builder chains.
enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger.json
enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_active.json
enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna.json
enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna_advanced.json
Added block model JSONs for wireless charger and antenna variants.
enderio/build.gradle.kts
gradle.properties
Renamed project property and updated dependency for "stitch" (formerly "athena").

Sequence Diagram(s)

sequenceDiagram
    participant Player
    participant WirelessChargerBlockEntity
    participant WirelessChargerMenu
    participant WirelessChargerScreen

    Player->>WirelessChargerScreen: Open GUI
    WirelessChargerScreen->>WirelessChargerMenu: Interact with range controls (increase/decrease/toggle)
    WirelessChargerMenu->>WirelessChargerBlockEntity: Apply range change or toggle visibility
    WirelessChargerBlockEntity->>WirelessChargerMenu: Sync updated range/maxRange
    WirelessChargerMenu->>WirelessChargerScreen: Update displayed range and controls
    loop Each server tick
        WirelessChargerBlockEntity->>Player: Attempt to charge items in range
    end
  • Team-EnderIO/EnderIO#1048: Renames the project property and updates the Maven dependency from "athena-ctm" to "stitch", matching the build configuration changes in this PR.

Suggested labels

Type-Enhancement, Status-Needs Updating, Area-Parity

Suggested reviewers

  • Rover656

Poem

Oh wireless charger, box so bright,
You beam out power, day and night!
With antennas tall and range so wide,
Your energy flows on every side.
Now rabbits hop with gadgets charged,
Thanks to code so well enlarged!
🐇🔋

Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.
<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- walkthrough_start --> ## Walkthrough This update introduces a new wireless charger machine and its antenna blocks, including their block entities, menus, GUIs, recipes, and data handling. It adds configuration options, translations, models, and range-extending mechanics. Additionally, it unifies range button creation in GUIs, enhances item animation logic, adjusts range handling in block entities, and updates build properties for dependency management. ## Changes | File(s) / Path(s) | Change Summary | |----------------------------------------------------------------------------------------------------|---------------| | enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java | Added factory methods for range increase/decrease buttons and corresponding sprites. | | enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java<br>enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java<br>enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java | Added overrides for re-equip animation and block break reset logic; minor formatting. | | enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java | Added new translation constant for "Maximum Range". | | enderio-machines/src/main/java/com/enderio/machines/EnderIOMachines.java | Registered new data provider for range extenders in data generation. | | enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/AversionObeliskScreen.java<br>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/DrainScreen.java<br>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/InhibitorObeliskScreen.java<br>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/RelocatorObeliskScreen.java<br>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/VacuumChestScreen.java<br>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/XPVacuumScreen.java | Refactored plus/minus range button creation to use common widget factory methods. | | enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java | Added new GUI screen for the wireless charger machine. | | enderio-machines/src/main/java/com/enderio/machines/client/rendering/blockentity/ObeliskBER.java | Adjusted Y-axis rotation for rendered item orientation. | | enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java | Added `maxRange` field, updated codecs, and methods to handle new field. | | enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java<br>enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java<br>enderio-machines/src/main/java/com/enderio/machines/common/blocks/farming_station/FarmingStationBlockEntity.java | Moved location of `getMaxRange()` method within class; no logic change. | | enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java | Added override for `getMaxRange()` returning 32. | | enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/aversion/AversionObeliskBlockEntity.java<br>enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/inhibitor/InhibitorObeliskBlockEntity.java<br>enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/relocator/RelocatorObeliskBlockEntity.java | Removed redundant `getMaxRange()` overrides. | | enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessAntennaBlock.java | Added new block class for wireless charger antenna with custom shape. | | enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java | Added new block entity for the wireless charger, including range, charging, and persistence logic. | | enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java | Added new menu for wireless charger, handling range controls and slots. | | enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/package-info.java | Added package-level non-null annotations. | | enderio-machines/src/main/java/com/enderio/machines/common/config/MachinesConfigLang.java | Added translations for wireless charger-related configuration options. | | enderio-machines/src/main/java/com/enderio/machines/common/config/client/MachinesClientBlocksConfig.java | Added config value for wireless charger range colour. | | enderio-machines/src/main/java/com/enderio/machines/common/config/common/EnergyConfig.java | Added wireless charger energy config values; increased wired charger usage default. | | enderio-machines/src/main/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java | Added config value for wireless charger base range. | | enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java | Added new class for range extender data map and codec. | | enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java | Minor import reordering. | | enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlockEntities.java | Registered wireless charger block entity. | | enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlocks.java | Registered wireless charger and antenna blocks; added helper for antenna registration. | | enderio-machines/src/main/java/com/enderio/machines/common/init/MachineDataMaps.java | Registered range extender data map. | | enderio-machines/src/main/java/com/enderio/machines/common/init/MachineMenus.java | Registered wireless charger menu and screen. | | enderio-machines/src/main/java/com/enderio/machines/common/tag/MachineTags.java | Added block tag for range extenders. | | enderio-machines/src/main/java/com/enderio/machines/data/datamap/RangeExtenderDataProvider.java | Added data provider for range extender block data. | | enderio-machines/src/main/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java | Added recipes for wireless charger and antennas; reformatted recipe builder chains. | | enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger.json<br>enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_active.json<br>enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna.json<br>enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna_advanced.json | Added block model JSONs for wireless charger and antenna variants. | | enderio/build.gradle.kts<br>gradle.properties | Renamed project property and updated dependency for "stitch" (formerly "athena"). | ## Sequence Diagram(s) ```mermaid sequenceDiagram participant Player participant WirelessChargerBlockEntity participant WirelessChargerMenu participant WirelessChargerScreen Player->>WirelessChargerScreen: Open GUI WirelessChargerScreen->>WirelessChargerMenu: Interact with range controls (increase/decrease/toggle) WirelessChargerMenu->>WirelessChargerBlockEntity: Apply range change or toggle visibility WirelessChargerBlockEntity->>WirelessChargerMenu: Sync updated range/maxRange WirelessChargerMenu->>WirelessChargerScreen: Update displayed range and controls loop Each server tick WirelessChargerBlockEntity->>Player: Attempt to charge items in range end ``` ## Possibly related PRs - [Team-EnderIO/EnderIO#1048](https://github.com/Team-EnderIO/EnderIO/pull/1048): Renames the project property and updates the Maven dependency from "athena-ctm" to "stitch", matching the build configuration changes in this PR. ## Suggested labels `Type-Enhancement`, `Status-Needs Updating`, `Area-Parity` ## Suggested reviewers - Rover656 ## Poem > Oh wireless charger, box so bright, > You beam out power, day and night! > With antennas tall and range so wide, > Your energy flows on every side. > Now rabbits hop with gadgets charged, > Thanks to code so well enlarged! > 🐇🔋✨ <!-- walkthrough_end --> <!-- internal state start --> <!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAQVolegB1eH9IxGQAYVhnUj5MeioMUkgSAA8aDER4fCxYjEqMNERoyAB3ZvtsAWZ1Gno5MNgPbERKSEyqAC9ZK0xcZE7ub19/IJDIDEcBcYBGAAZdgHZ+LFxhmBI0ZjAAUQwlCgBJAHk/Em58aoIXDRgLhg5YrSFANCiKbAMKLwDAMLzYJRDDxoBLqGpYfAAM3QkBSaWkWRyFDy6AefkwJXKlWqtUg9UazT+7msdjQXkQ+AUVXwXngtGoINo2G4vIYAvJwMgAHEAKpPBSImEEHFMVi0tp80ihZXwZi8fBSBUeZjaBqmlTwXm4W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9gcSG/G0AcSD0nJITEAYAkJsSZ4m/IWgAOBCJ8SCUAGJvCZIATzPyE/M/IEgG/HdgdSbPH1x7CYImUp3YFsnbJvyAEBMQSSGMnJINACOABJo4GkgpJ4ifB04p78bqn9gCHVcm0J5GCgBLx3AGvHfRV6nixHwTqAfGtoNCaAA=== --> <!-- internal state end --> <!-- finishing_touch_checkbox_start --> <details open="true"> <summary>✨ Finishing Touches</summary> - [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings </details> <!-- finishing_touch_checkbox_end --> <!-- tips_start --> --- Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <details> <summary>🪧 Tips</summary> ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=Team-EnderIO/EnderIO&utm_content=1017): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit <commit_id>, please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` ### Support Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR. - `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements. </details> <!-- tips_end -->
coderabbitai[bot] (Migrated from github.com) reviewed 2025-05-01 09:36:22 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 4

🧹 Nitpick comments (4)
enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna_advanced.json (1)

1-81: Advanced antenna model maintains consistency with base antenna.

The advanced antenna model appropriately uses the same structure as the basic antenna, with the main difference being the use of vibrant_alloy_block texture instead of pulsating_alloy_block, indicating a higher tier upgrade.

I do notice one minor point: both antenna models use identical element naming, with three elements all named "ring". Consider using more specific names like "upper_ring", "middle_ring", and "lower_ring" for better clarity if the model needs future modifications.

enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java (2)

45-45: Consider using dedicated button IDs instead of shared constants

The screen is currently using button IDs from AversionObeliskMenu (VISIBILITY_BUTTON_ID). It would be better for maintainability to define these constants in the WirelessChargerMenu class instead to avoid potentially confusing dependencies between unrelated components.


66-69: Consider extracting range value rendering to a helper method

The calculation of the position for the range value text is quite verbose. Consider extracting this to a helper method for improved readability.

-        guiGraphics.drawString(font, getMenu().getBlockEntity().getRange() + "",
-                leftPos + imageWidth - 8 - 16 - font.width(getMenu().getBlockEntity().getRange() + "") - 10,
-                topPos + rangeOffset + 5, 0, false);
+        drawRangeValue(guiGraphics, getMenu().getBlockEntity().getRange(), rangeOffset);

+ // Add this helper method to the class
+ private void drawRangeValue(GuiGraphics guiGraphics, int range, int rangeOffset) {
+     String rangeText = String.valueOf(range);
+     int textWidth = font.width(rangeText);
+     int x = leftPos + imageWidth - 8 - 16 - textWidth - 10;
+     guiGraphics.drawString(font, rangeText, x, topPos + rangeOffset + 5, 0, false);
+ }
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1)

211-218: Consider adding state change event notification

When changing the action range and updating the bounds, consider notifying relevant systems of this state change to ensure proper updates throughout the game.

Ensure the state update is propagated consistently by adding an event or notification system for range changes, which could be useful for other components that might depend on this information.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 397c648f55 and a53359613e.

Files ignored due to path filters (26)
  • enderio-base/src/generated/resources/assets/enderio/lang/en_us.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger_antenna.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger_antenna_advanced.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/lang/en_us.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/block/wireless_charger_active_combined.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/block/wireless_charger_combined.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger_antenna.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger_antenna_advanced.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger_antenna.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger_antenna_advanced.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/data_maps/block/range_extender.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/loot_table/blocks/wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/loot_table/blocks/wireless_charger_antenna.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/loot_table/blocks/wireless_charger_antenna_advanced.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/recipe/wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/recipe/wireless_charger_antenna.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/recipe/wireless_charger_antenna_advanced.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/tags/block/range_extender.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json is excluded by !**/generated/**
  • enderio-machines/src/main/resources/assets/enderio/textures/block/wireless_charger_front.png is excluded by !**/*.png
  • enderio-machines/src/main/resources/assets/enderio/textures/block/wireless_charger_front_active.png is excluded by !**/*.png
  • enderio-machines/src/main/resources/assets/enderio/textures/gui/screen/wireless_charger.png is excluded by !**/*.png
📒 Files selected for processing (45)
  • enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (1 hunks)
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java (4 hunks)
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java (4 hunks)
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java (6 hunks)
  • enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java (6 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/EnderIOMachines.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/AversionObeliskScreen.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/DrainScreen.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/InhibitorObeliskScreen.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/RelocatorObeliskScreen.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/VacuumChestScreen.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/XPVacuumScreen.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/client/rendering/blockentity/ObeliskBER.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/attachment/RangedActor.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/aversion/AversionObeliskBlockEntity.java (0 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/inhibitor/InhibitorObeliskBlockEntity.java (0 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/relocator/RelocatorObeliskBlockEntity.java (0 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessAntennaBlock.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/package-info.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/config/MachinesConfigLang.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/config/client/MachinesClientBlocksConfig.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/config/common/EnergyConfig.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlockEntities.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlocks.java (7 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/init/MachineDataMaps.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/init/MachineMenus.java (3 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/tag/MachineTags.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/data/datamap/RangeExtenderDataProvider.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java (2 hunks)
  • enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger.json (1 hunks)
  • enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_active.json (1 hunks)
  • enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna.json (1 hunks)
  • enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna_advanced.json (1 hunks)
  • enderio/build.gradle.kts (2 hunks)
  • gradle.properties (1 hunks)
💤 Files with no reviewable changes (3)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/aversion/AversionObeliskBlockEntity.java
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/relocator/RelocatorObeliskBlockEntity.java
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/inhibitor/InhibitorObeliskBlockEntity.java
🧰 Additional context used
🧬 Code Graph Analysis (11)
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlockEntities.java (2)
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1)
  • WirelessChargerBlockEntity (44-230)
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlocks.java (1)
  • MachineBlocks (69-398)
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/AversionObeliskScreen.java (1)
enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (1)
  • EIOCommonWidgets (13-40)
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineMenus.java (2)
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java (1)
  • WirelessChargerScreen (17-84)
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java (1)
  • WirelessChargerMenu (10-58)
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/InhibitorObeliskScreen.java (1)
enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (1)
  • EIOCommonWidgets (13-40)
enderio-machines/src/main/java/com/enderio/machines/common/init/MachineDataMaps.java (1)
enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java (1)
  • RangeExtender (14-22)
enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java (1)
enderio-base/src/main/java/com/enderio/base/api/EnderIO.java (1)
  • EnderIO (5-11)
enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java (1)
enderio-base/src/main/java/com/enderio/base/common/init/EIODataComponents.java (1)
  • EIODataComponents (21-75)
enderio-machines/src/main/java/com/enderio/machines/EnderIOMachines.java (1)
enderio-machines/src/main/java/com/enderio/machines/data/datamap/RangeExtenderDataProvider.java (1)
  • RangeExtenderDataProvider (16-37)
enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (1)
enderio-base/src/main/java/com/enderio/base/api/EnderIO.java (1)
  • EnderIO (5-11)
enderio-machines/src/main/java/com/enderio/machines/common/tag/MachineTags.java (1)
enderio-base/src/main/java/com/enderio/base/api/EnderIO.java (1)
  • EnderIO (5-11)
enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java (1)
enderio-base/src/main/java/com/enderio/base/api/EnderIO.java (1)
  • EnderIO (5-11)
🔇 Additional comments (66)
gradle.properties (1)

31-31:

Verification successful

Library dependency updated to Stitch

The dependency has been changed from Athena CTM to Stitch 4.0.1. This change aligns with the corresponding update in enderio/build.gradle.kts.


🏁 Script executed:

#!/bin/bash
# Verify if Stitch is a valid Modrinth dependency and check its compatibility with Minecraft 1.21.1

echo "Checking Stitch dependency validity on Modrinth..."
curl -s "https://api.modrinth.com/v2/project/stitch" | jq '.id, .title, .description, .versions[0]'

# Check the game versions supported by the latest Stitch version
curl -s "https://api.modrinth.com/v2/version/XgZZ2JbG" | jq '.game_versions'

Length of output: 416


🏁 Script executed:

#!/bin/bash
# Fetch Stitch version ID for version 4.0.1 and print its supported game versions
VERSION_ID=$(curl -s "https://api.modrinth.com/v2/project/stitch/versions" | jq -r '.[] | select(.version_number=="4.0.1") | .id')
echo "Stitch 4.0.1 version ID: $VERSION_ID"
curl -s "https://api.modrinth.com/v2/version/$VERSION_ID" | jq '.game_versions'

Length of output: 340


🏁 Script executed:

#!/bin/bash
# Correctly fetch the list of versions for the Stitch project and check supported game versions for 4.0.1

# Retrieve all version metadata for the Stitch project
VERSIONS_JSON=$(curl -s "https://api.modrinth.com/v2/project/stitch/version")

# Extract the version ID for version 4.0.1
VERSION_ID=$(echo "$VERSIONS_JSON" | jq -r '.[] | select(.version_number=="4.0.1") | .id')

echo "Stitch 4.0.1 version ID: $VERSION_ID"

# Fetch and print the supported game versions for that release
curl -s "https://api.modrinth.com/v2/version/$VERSION_ID" | jq '.game_versions'

Length of output: 61927


Confirm Stitch 4.0.1 supports Minecraft 1.21.1
The update from Athena (Athena 4.0.1) to Stitch 4.0.1 in gradle.properties is valid:

  • Modrinth project “Stitch (formerly Athena)” version 4.0.1 is published under both Fabric (ID 7G1e11iK) and NeoForge (ID zzovqkDA) builds
  • Both builds declare support for game versions 1.21 and 1.21.1

This aligns with the corresponding update in enderio/build.gradle.kts. The change can be approved as-is.

enderio-machines/src/main/java/com/enderio/machines/client/rendering/blockentity/ObeliskBER.java (1)

42-42: Fixed Enderman head orientation in obelisks

The rotation adjustment of 180 degrees ensures the Enderman head now faces the correct direction in obelisk renderings, as mentioned in the PR objectives.

enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java (2)

31-33: Import organization improved

The imports have been reordered for better readability, placing annotations and core Java imports first.


40-40: Added maxRange parameter to ActionRange constructor

The DEFAULT_RANGE constant now includes a maxRange parameter (32), which aligns with the broader refactoring of range handling across machines and obelisks mentioned in the PR objectives.

enderio/build.gradle.kts (2)

23-23: Renamed property to match new dependency

The property has been renamed from athenaVersion to stitchVersion to reflect the library change.


54-54:

Verification successful

Updated runtime dependency to Stitch

The runtime dependency has been changed from "athena-ctm" to "stitch", matching the property rename in gradle.properties.


🌐 Web query:

Is "stitch" the successor to "athena-ctm" for Minecraft 1.21?

💡 Result:

Yes, "Stitch" is the successor to "athena-ctm" (commonly known as Athena) for Minecraft 1.21 and newer versions. The mod has undergone a rebranding: it is now named "Stitch," whereas it was previously called "Athena" or referred to as "athena-ctm"[1][2][7][8].

Several sources confirm this transition. For example, both CurseForge and Modrinth list the project as "Stitch (formerly Athena)," highlighting the direct lineage between the two names[1][2][7]. The mod continues to fulfill the same purpose—providing a cross-platform, high-performance solution for connected textures across major mod loaders like Forge, Fabric, and NeoForge[1][2][3][6][9].

For Minecraft 1.21, you will find Stitch downloads and documentation where you previously would have found Athena. This means that Stitch is the active, maintained, and official replacement for "athena-ctm" starting with the 1.21 update and beyond[1][2][7][8].

Citations:


Runtime dependency correctly updated to Stitch

Verified that Stitch (formerly Athena/athena-ctm) is the official successor for Minecraft 1.21 and newer. The change in enderio/build.gradle.kts at line 54 aligns with the renamed Gradle property.

• File: enderio/build.gradle.kts (line 54)

runtimeOnly("maven.modrinth:stitch:${stitchVersion}")
enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/DrainScreen.java (1)

45-48: Refactored range buttons using common widgets

The direct instantiation of range increase/decrease buttons has been replaced with calls to common widget factory methods from EIOCommonWidgets. This improves code maintainability by consolidating duplicate range GUI code across the application, as mentioned in the PR objectives.

enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/XPVacuumScreen.java (1)

42-45: Good refactoring to use common widget factory methods.

Using the centralised factory methods from EIOCommonWidgets for range control buttons improves code maintainability and consistency across GUI screens.

enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/VacuumChestScreen.java (1)

40-43: Good refactoring to use common widget factory methods.

Using the centralised factory methods from EIOCommonWidgets for range control buttons improves code maintainability and consistency across different machine GUIs.

enderio-machines/src/main/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java (2)

15-15: New configuration property for wireless charger range added.

The new config value aligns with the PR objectives of adding wireless charger functionality.


43-45: Well-structured configuration category for the wireless charger.

The new configuration category follows the established pattern in the file with proper builder push/pop and a descriptive comment.

enderio-machines/src/main/java/com/enderio/machines/EnderIOMachines.java (2)

24-24: New import for the RangeExtenderDataProvider.

This import supports the addition of wireless charger functionality with range extension capabilities.


119-119: Added RangeExtenderDataProvider to the data generation pipeline.

The data provider is properly registered with the same conditional inclusion pattern as other providers, ensuring range extender data is generated for server use.

enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/AversionObeliskScreen.java (1)

43-46: Good refactoring to use common widget factory methods.

Using the centralised factory methods from EIOCommonWidgets for range control buttons improves code maintainability and consistency across different GUI screens.

enderio-machines/src/main/java/com/enderio/machines/common/init/MachineMenus.java (3)

26-26: Imported WirelessChargerScreen class

The import for the new wireless charger screen class looks correct and follows the same import pattern as other machine screens.


52-52: Imported WirelessChargerMenu class

The import for the wireless charger menu class follows the established pattern in the codebase.


94-95: Added menu registration for wireless charger

The registration of the wireless charger menu follows the same pattern as other machine menu registrations, using consistent naming conventions and parameter ordering.

enderio-machines/src/main/java/com/enderio/machines/common/attachment/RangedActor.java (2)

8-10: Added default implementation for getMaxRange

This change properly adds a default implementation that delegates to the ActionRange record's maxRange value, which supports the per-instance dynamic maximum ranges for the wireless charger feature.


37-37: Improved range comparison logic

The condition has been updated to compare the current range directly with the maxRange from the same ActionRange object, making the comparison more direct and consistent with the new default implementation of getMaxRange().

enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/RelocatorObeliskScreen.java (1)

43-46: Consolidated range adjustment buttons using common widget methods

The implementation now uses the common factory methods from EIOCommonWidgets for creating range adjustment buttons, which helps standardize UI controls across all machine screens that implement range functionality. This reduces code duplication and ensures a consistent look and feel.

enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger.json (1)

1-12: New model file for wireless charger block

The model definition follows Minecraft's standard block model conventions and reuses existing EnderIO machine textures where appropriate, while defining a custom front texture for the wireless charger. The particle texture is correctly set to the front texture, which is standard practice for visible block faces.

enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlockEntities.java (2)

44-44: Good addition of the necessary import.

The import for WirelessChargerBlockEntity is correctly added to support the new wireless charger functionality.


137-139: LGTM: Correctly registers the wireless charger block entity.

The wireless charger block entity registration follows the same pattern as other powered machines, particularly similar to the wired charger registration above it. The poweredMachineBlockEntityCapabilities application ensures it has the necessary energy storage and item handling capabilities.

enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/package-info.java (1)

1-4: Standard null-safety annotations applied correctly.

These annotations properly establish non-null defaults for parameters and return values throughout the package, which is a good practice for ensuring null-safety.

enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_active.json (1)

1-12: Model JSON follows standard conventions and is well structured.

The wireless charger active model correctly inherits from the standard cube block model and properly defines textures for all faces. The use of the active texture for the front face will provide visual feedback when the machine is operating.

enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java (2)

27-33: Import statements reorganised correctly.

The import statements have been moved to a more logical location at the end of the import block, which improves code organisation without changing functionality.


43-43: Good refactoring of range management.

The DEFAULT_RANGE has been updated to include the max range parameter (6) which previously was defined in a separate getMaxRange() method. This consolidation is part of the broader refactoring of range management into a common widget as mentioned in the PR objectives.

enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java (2)

215-215: Added new translation key for Maximum Range.

This new translation key adds support for the wireless charger and range extender features, providing localized text for displaying maximum range values in GUIs.


37-38: Formatting improvements for better readability.

These formatting changes improve code readability and maintain consistent style throughout the file.

Also applies to: 42-43, 48-49, 64-64, 263-264, 289-292, 316-316, 319-319

enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/InhibitorObeliskScreen.java (1)

43-46: Improved code reuse with widget factory methods.

Good refactoring to use the common widget factory methods instead of direct button creation. This improves maintainability and consistency across different machine GUIs.

enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java (5)

18-18: Added maxRange field to ActionRange record.

The record now includes a maxRange field to support dynamic maximum range values for machines like the wireless charger.


20-23: Updated CODEC to include maxRange field.

The Codec correctly includes the new maxRange field for serialization and deserialization.


25-26: Updated STREAM_CODEC to include maxRange field.

The StreamCodec correctly includes the new maxRange field for network transmission.


31-33: Updated factory methods to preserve maxRange.

All methods creating new ActionRange instances now correctly preserve the maxRange value.

Also applies to: 35-37, 39-41, 43-45, 47-49


51-53: Added setMaxRange method.

The new setMaxRange method allows for updating the maxRange value while preserving other fields, which is essential for the wireless charger's range extension functionality.

enderio-machines/src/main/java/com/enderio/machines/common/init/MachineDataMaps.java (2)

4-4: Added import for RangeExtender.

Added the necessary import for the new RangeExtender class.


15-15: Registered RangeExtender data map.

This registration enables the range extender functionality, allowing blocks like antennas to extend the range of wireless chargers.

enderio-machines/src/main/java/com/enderio/machines/common/config/MachinesConfigLang.java (2)

63-70: Good addition of Wireless Charger configuration translations.

The new translation keys for the Wireless Charger feature are well-structured and follow the established pattern in the file. The translations are descriptive and clear for users.


90-91: Improved code formatting for readability.

Breaking the parameters across multiple lines improves readability of the code.

enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessAntennaBlock.java (1)

12-12: Custom shape implementation looks good.

The custom VoxelShape creates a proper hitbox for the antenna, making it match its visual appearance rather than being a full block.

enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (2)

17-20: Good centralisation of button resources.

The addition of these resource locations and widget sprites centralises the UI element definitions, which supports the DRY principle and improves consistency across the UI.


33-39: Excellent addition of factory methods for range buttons.

These factory methods help standardise the creation of range adjustment buttons across different GUIs, reducing code duplication and ensuring consistent appearance.

enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java (1)

28-28: Good update to ActionRange constructor with maxRange parameter.

The addition of the maxRange parameter to the ActionRange constructor aligns with the refactoring to support per-instance maximum ranges, which is needed for the wireless charger feature.

enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna.json (1)

1-81: The model looks well-structured.

The wireless charger antenna model is properly defined with appropriate elements for the base, stem, and rings. The texture references and UV mappings are correctly specified.

enderio-machines/src/main/java/com/enderio/machines/common/tag/MachineTags.java (3)

7-7: LGTM! Import added for Block class.

The import is correctly added to support the new blocks tag implementation.


13-13: LGTM! Register method updated.

The register method properly calls the new Blocks.init() method.


27-37: LGTM! Well-structured tag implementation.

The Blocks class implementation follows the same pattern as the existing EntityTypes class, maintaining consistent code style. The RANGE_EXTENDER tag is properly created using the EnderIO namespace.

enderio-machines/src/main/java/com/enderio/machines/common/config/common/EnergyConfig.java (2)

40-42: New configuration fields added for wireless charger.

The configuration fields for the wireless charger capacity, usage, and upkeep are properly defined.


166-173: LGTM! Wireless charger configuration section.

The wireless charger configuration section follows the same structure as other machine configurations with appropriate comments and reasonable default values:

  • 128,000 uI capacity matches the wired charger
  • 60 uI/t charge rate matches the wired charger
  • 2 uI/t upkeep cost is reasonable for a passive wireless device

This ensures consistency in the energy system balancing.

enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java (1)

14-22: Well-structured data map implementation for range extension functionality.

This is a good implementation of a data map for tracking range extension values. The code effectively uses NeoForged's data map API to create a mapping between block tags and integer values that represent range extension amounts.

The structure allows for flexible configuration of range extenders through data generation rather than hardcoded values, which is a maintainable approach.

enderio-machines/src/main/java/com/enderio/machines/data/datamap/RangeExtenderDataProvider.java (2)

16-25: Data provider implementation looks good.

The provider correctly implements the data generation pattern with a clean API for adding entries. The computeIfAbsent approach in the addData method efficiently handles the nested map structure.


27-36: Range values for antennas look appropriate.

The implementation correctly associates the wireless charger antennas with their respective range extension values (16 and 32), which seems appropriate for a basic and advanced version. The data is properly added to the RangeExtender data map.

enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java (2)

85-93: Good addition of animation and block break reset methods.

These overrides improve the user experience by preventing unnecessary re-equip animations and block break resets when switching between items of the same type. This makes the item behaviour more polished.


22-24: Improved formatting for better readability.

The reformatting of the FLUID_HANDLER_PROVIDER definition improves code readability without changing functionality.

enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java (1)

1-58: Well-structured menu implementation for the new wireless charger feature.

The menu class follows the established pattern for machine menus in this codebase with clear button handling for range control and visibility toggle. The implementation is clean and appropriately leverages the base class functionality.

enderio-machines/src/main/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java (3)

230-239: Good recipe implementation for the wireless charger.

The recipe follows the same pattern as other machine recipes while requiring appropriate ingredients including copper alloy ingots, void chassis, and ender resonator for the wireless functionality.


241-250: Clear recipe definition for the wireless charger antenna.

The recipe appropriately uses pulsating alloy for the antenna element along with copper alloy and ender resonator, which aligns with the expected functionality of the component.


252-261: Well-defined recipe for the advanced wireless charger antenna.

The upgrade path from basic to advanced antenna is logical, replacing pulsating alloy with vibrant alloy and using sentient ender instead of the basic ender resonator for improved range capabilities.

enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java (1)

171-179: Good addition of animation control methods to improve player experience.

These methods prevent unnecessary re-equip animations and block break resets when the item doesn't actually change. This provides a smoother experience when item data changes but the item itself remains the same.

enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlocks.java (2)

143-151: Appropriate block registrations for the new wireless charger system.

The registrations for the wireless charger and its two antenna variants follow the established pattern for machine blocks in this class. The wireless charger is correctly registered as a progress machine, which aligns with its expected functionality.


379-392: Good implementation of a helper method for wireless antenna blocks.

The wirelessAntenna method efficiently centralizes the common properties for antenna blocks, including strength, occlusion settings, loot table, block tags, and UI elements. The method appropriately adds the antennas to the RANGE_EXTENDER tag, which will allow them to be discovered by the wireless charger for range extension.

enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java (2)

58-58: Consistent update to the ActionRange constructor

The DEFAULT_RANGE now properly includes the maxRange parameter (10), which aligns with the broader refactoring of range handling across machine block entities. This change correctly supports the new range extension system.


86-86: Good use of the new ActionRange.maxRange() method

The updated setActionRange method now correctly uses actionRange.maxRange() for clamping instead of a hard-coded value, making the range limits more flexible and consistent with the new implementation.

enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java (1)

47-51: Good utilisation of common widget factories

The screen appropriately uses the standardised EIOCommonWidgets.createRangeIncrease and createRangeDecrease methods, which improves consistency across the GUI system. This is a good approach for maintaining visual coherence.

enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java (1)

85-93: Good addition of animation control methods

The addition of shouldCauseReequipAnimation and shouldCauseBlockBreakReset methods improves the user experience by preventing unnecessary animations when only the item's NBT data changes (like energy level), while still correctly handling actual item changes or slot changes.

enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1)

70-97: 🛠️ Refactor suggestion

Improve charging algorithm efficiency and error handling

The current implementation has several concerns:

  1. Early return from nested loops can lead to uneven distribution of energy
  2. No null check before accessing the energy capability

Consider refactoring to improve efficiency and robustness.

 public void chargeItem() {
-    if (level == null || bounds == null) {
+    if (level == null) {
         return;
     }
     PoweredMachineEnergyStorage energyStorage = getEnergyStorage();
     if (energyStorage.getEnergyStored() <= 0) {
         return;
     }
     int toDistribute = Math.min(energyStorage.getEnergyStored(), getMaxEnergyUse());

     List<Player> players = level.getEntitiesOfClass(Player.class, bounds);
     for (Player player : players) {
         Inventory inventory = player.getInventory();
         for (int i = 0; i < inventory.getContainerSize(); i++) {
             ItemStack stack = inventory.getItem(i);
-            @Nullable
-            IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM);
-            if (cap != null && cap.canReceive()) {
-                int received = cap.receiveEnergy(toDistribute, false);
-                energyStorage.consumeEnergy(received);
-                toDistribute -= received;
-                if (toDistribute <= 0) {
-                    return;
+            if (!stack.isEmpty()) {
+                @Nullable IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM);
+                if (cap != null && cap.canReceive()) {
+                    int received = cap.receiveEnergy(toDistribute, false);
+                    if (received > 0) {
+                        energyStorage.consumeEnergy(received);
+                        toDistribute -= received;
+                        if (toDistribute <= 0) {
+                            break; // Break just this inner loop, not the entire method
+                        }
+                    }
                 }
             }
         }
+        if (toDistribute <= 0) {
+            break; // Break the outer loop if we've distributed all available energy
+        }
     }
 }

Likely an incorrect or invalid review comment.

**Actionable comments posted: 4** <details> <summary>🧹 Nitpick comments (4)</summary><blockquote> <details> <summary>enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna_advanced.json (1)</summary><blockquote> `1-81`: **Advanced antenna model maintains consistency with base antenna.** The advanced antenna model appropriately uses the same structure as the basic antenna, with the main difference being the use of vibrant_alloy_block texture instead of pulsating_alloy_block, indicating a higher tier upgrade. I do notice one minor point: both antenna models use identical element naming, with three elements all named "ring". Consider using more specific names like "upper_ring", "middle_ring", and "lower_ring" for better clarity if the model needs future modifications. </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java (2)</summary><blockquote> `45-45`: **Consider using dedicated button IDs instead of shared constants** The screen is currently using button IDs from AversionObeliskMenu (VISIBILITY_BUTTON_ID). It would be better for maintainability to define these constants in the WirelessChargerMenu class instead to avoid potentially confusing dependencies between unrelated components. --- `66-69`: **Consider extracting range value rendering to a helper method** The calculation of the position for the range value text is quite verbose. Consider extracting this to a helper method for improved readability. ```diff - guiGraphics.drawString(font, getMenu().getBlockEntity().getRange() + "", - leftPos + imageWidth - 8 - 16 - font.width(getMenu().getBlockEntity().getRange() + "") - 10, - topPos + rangeOffset + 5, 0, false); + drawRangeValue(guiGraphics, getMenu().getBlockEntity().getRange(), rangeOffset); + // Add this helper method to the class + private void drawRangeValue(GuiGraphics guiGraphics, int range, int rangeOffset) { + String rangeText = String.valueOf(range); + int textWidth = font.width(rangeText); + int x = leftPos + imageWidth - 8 - 16 - textWidth - 10; + guiGraphics.drawString(font, rangeText, x, topPos + rangeOffset + 5, 0, false); + } ``` </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1)</summary><blockquote> `211-218`: **Consider adding state change event notification** When changing the action range and updating the bounds, consider notifying relevant systems of this state change to ensure proper updates throughout the game. Ensure the state update is propagated consistently by adding an event or notification system for range changes, which could be useful for other components that might depend on this information. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 397c648f55d0b2e936bf3caff92acace6743dc05 and a53359613efffca3f1d2abadc10196f9397b7934. </details> <details> <summary>⛔ Files ignored due to path filters (26)</summary> * `enderio-base/src/generated/resources/assets/enderio/lang/en_us.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger_antenna.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger_antenna_advanced.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/lang/en_us.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/block/wireless_charger_active_combined.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/block/wireless_charger_combined.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger_antenna.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger_antenna_advanced.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger_antenna.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger_antenna_advanced.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/data_maps/block/range_extender.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/loot_table/blocks/wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/loot_table/blocks/wireless_charger_antenna.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/loot_table/blocks/wireless_charger_antenna_advanced.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/recipe/wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/recipe/wireless_charger_antenna.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/recipe/wireless_charger_antenna_advanced.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/tags/block/range_extender.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/minecraft/tags/block/mineable/pickaxe.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/minecraft/tags/block/needs_iron_tool.json` is excluded by `!**/generated/**` * `enderio-machines/src/main/resources/assets/enderio/textures/block/wireless_charger_front.png` is excluded by `!**/*.png` * `enderio-machines/src/main/resources/assets/enderio/textures/block/wireless_charger_front_active.png` is excluded by `!**/*.png` * `enderio-machines/src/main/resources/assets/enderio/textures/gui/screen/wireless_charger.png` is excluded by `!**/*.png` </details> <details> <summary>📒 Files selected for processing (45)</summary> * `enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java` (1 hunks) * `enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java` (4 hunks) * `enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java` (4 hunks) * `enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java` (6 hunks) * `enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java` (6 hunks) * `enderio-machines/src/main/java/com/enderio/machines/EnderIOMachines.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/AversionObeliskScreen.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/DrainScreen.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/InhibitorObeliskScreen.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/RelocatorObeliskScreen.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/VacuumChestScreen.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/XPVacuumScreen.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/client/rendering/blockentity/ObeliskBER.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/attachment/RangedActor.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/aversion/AversionObeliskBlockEntity.java` (0 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/inhibitor/InhibitorObeliskBlockEntity.java` (0 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/relocator/RelocatorObeliskBlockEntity.java` (0 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessAntennaBlock.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/package-info.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/config/MachinesConfigLang.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/config/client/MachinesClientBlocksConfig.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/config/common/EnergyConfig.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlockEntities.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlocks.java` (7 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/init/MachineDataMaps.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/init/MachineMenus.java` (3 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/tag/MachineTags.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/data/datamap/RangeExtenderDataProvider.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java` (2 hunks) * `enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger.json` (1 hunks) * `enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_active.json` (1 hunks) * `enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna.json` (1 hunks) * `enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna_advanced.json` (1 hunks) * `enderio/build.gradle.kts` (2 hunks) * `gradle.properties` (1 hunks) </details> <details> <summary>💤 Files with no reviewable changes (3)</summary> * enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/aversion/AversionObeliskBlockEntity.java * enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/relocator/RelocatorObeliskBlockEntity.java * enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/inhibitor/InhibitorObeliskBlockEntity.java </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🧬 Code Graph Analysis (11)</summary> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlockEntities.java (2)</summary><blockquote> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1)</summary> * `WirelessChargerBlockEntity` (44-230) </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlocks.java (1)</summary> * `MachineBlocks` (69-398) </details> </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/AversionObeliskScreen.java (1)</summary><blockquote> <details> <summary>enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (1)</summary> * `EIOCommonWidgets` (13-40) </details> </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineMenus.java (2)</summary><blockquote> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java (1)</summary> * `WirelessChargerScreen` (17-84) </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java (1)</summary> * `WirelessChargerMenu` (10-58) </details> </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/InhibitorObeliskScreen.java (1)</summary><blockquote> <details> <summary>enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (1)</summary> * `EIOCommonWidgets` (13-40) </details> </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineDataMaps.java (1)</summary><blockquote> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java (1)</summary> * `RangeExtender` (14-22) </details> </blockquote></details> <details> <summary>enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java (1)</summary><blockquote> <details> <summary>enderio-base/src/main/java/com/enderio/base/api/EnderIO.java (1)</summary> * `EnderIO` (5-11) </details> </blockquote></details> <details> <summary>enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java (1)</summary><blockquote> <details> <summary>enderio-base/src/main/java/com/enderio/base/common/init/EIODataComponents.java (1)</summary> * `EIODataComponents` (21-75) </details> </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/EnderIOMachines.java (1)</summary><blockquote> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/data/datamap/RangeExtenderDataProvider.java (1)</summary> * `RangeExtenderDataProvider` (16-37) </details> </blockquote></details> <details> <summary>enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (1)</summary><blockquote> <details> <summary>enderio-base/src/main/java/com/enderio/base/api/EnderIO.java (1)</summary> * `EnderIO` (5-11) </details> </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/tag/MachineTags.java (1)</summary><blockquote> <details> <summary>enderio-base/src/main/java/com/enderio/base/api/EnderIO.java (1)</summary> * `EnderIO` (5-11) </details> </blockquote></details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java (1)</summary><blockquote> <details> <summary>enderio-base/src/main/java/com/enderio/base/api/EnderIO.java (1)</summary> * `EnderIO` (5-11) </details> </blockquote></details> </details> </details> <details> <summary>🔇 Additional comments (66)</summary><blockquote> <details> <summary>gradle.properties (1)</summary> `31-31`: <details> <summary>✅ Verification successful</summary> **Library dependency updated to Stitch** The dependency has been changed from Athena CTM to Stitch 4.0.1. This change aligns with the corresponding update in enderio/build.gradle.kts. --- 🏁 Script executed: ```shell #!/bin/bash # Verify if Stitch is a valid Modrinth dependency and check its compatibility with Minecraft 1.21.1 echo "Checking Stitch dependency validity on Modrinth..." curl -s "https://api.modrinth.com/v2/project/stitch" | jq '.id, .title, .description, .versions[0]' # Check the game versions supported by the latest Stitch version curl -s "https://api.modrinth.com/v2/version/XgZZ2JbG" | jq '.game_versions' ``` Length of output: 416 --- 🏁 Script executed: ```shell #!/bin/bash # Fetch Stitch version ID for version 4.0.1 and print its supported game versions VERSION_ID=$(curl -s "https://api.modrinth.com/v2/project/stitch/versions" | jq -r '.[] | select(.version_number=="4.0.1") | .id') echo "Stitch 4.0.1 version ID: $VERSION_ID" curl -s "https://api.modrinth.com/v2/version/$VERSION_ID" | jq '.game_versions' ``` Length of output: 340 --- 🏁 Script executed: ```shell #!/bin/bash # Correctly fetch the list of versions for the Stitch project and check supported game versions for 4.0.1 # Retrieve all version metadata for the Stitch project VERSIONS_JSON=$(curl -s "https://api.modrinth.com/v2/project/stitch/version") # Extract the version ID for version 4.0.1 VERSION_ID=$(echo "$VERSIONS_JSON" | jq -r '.[] | select(.version_number=="4.0.1") | .id') echo "Stitch 4.0.1 version ID: $VERSION_ID" # Fetch and print the supported game versions for that release curl -s "https://api.modrinth.com/v2/version/$VERSION_ID" | jq '.game_versions' ``` Length of output: 61927 --- </details> **Confirm Stitch 4.0.1 supports Minecraft 1.21.1** The update from Athena (Athena 4.0.1) to Stitch 4.0.1 in `gradle.properties` is valid: - Modrinth project “Stitch (formerly Athena)” version 4.0.1 is published under both Fabric (ID 7G1e11iK) and NeoForge (ID zzovqkDA) builds - Both builds declare support for game versions `1.21` and `1.21.1` This aligns with the corresponding update in `enderio/build.gradle.kts`. The change can be approved as-is. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/rendering/blockentity/ObeliskBER.java (1)</summary> `42-42`: **Fixed Enderman head orientation in obelisks** The rotation adjustment of 180 degrees ensures the Enderman head now faces the correct direction in obelisk renderings, as mentioned in the PR objectives. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java (2)</summary> `31-33`: **Import organization improved** The imports have been reordered for better readability, placing annotations and core Java imports first. --- `40-40`: **Added maxRange parameter to ActionRange constructor** The DEFAULT_RANGE constant now includes a maxRange parameter (32), which aligns with the broader refactoring of range handling across machines and obelisks mentioned in the PR objectives. </details> <details> <summary>enderio/build.gradle.kts (2)</summary> `23-23`: **Renamed property to match new dependency** The property has been renamed from athenaVersion to stitchVersion to reflect the library change. --- `54-54`: <details> <summary>✅ Verification successful</summary> **Updated runtime dependency to Stitch** The runtime dependency has been changed from "athena-ctm" to "stitch", matching the property rename in gradle.properties. --- 🌐 Web query: ```web Is "stitch" the successor to "athena-ctm" for Minecraft 1.21? ``` 💡 Result: Yes, "Stitch" is the successor to "athena-ctm" (commonly known as Athena) for Minecraft 1.21 and newer versions. The mod has undergone a rebranding: it is now named "Stitch," whereas it was previously called "Athena" or referred to as "athena-ctm"[1][2][7][8]. Several sources confirm this transition. For example, both CurseForge and Modrinth list the project as "Stitch (formerly Athena)," highlighting the direct lineage between the two names[1][2][7]. The mod continues to fulfill the same purpose—providing a cross-platform, high-performance solution for connected textures across major mod loaders like Forge, Fabric, and NeoForge[1][2][3][6][9]. For Minecraft 1.21, you will find Stitch downloads and documentation where you previously would have found Athena. This means that Stitch is the active, maintained, and official replacement for "athena-ctm" starting with the 1.21 update and beyond[1][2][7][8]. Citations: - 1: https://www.curseforge.com/minecraft/mc-mods/stitch - 2: https://modrinth.com/mod/stitch/versions - 3: https://www.9minecraft.net/athena-mod/ - 4: https://tlauncher.org/en/mods-1214_175/athena-1-21-4_26775.html - 5: https://modrinth.com/resourcepack/mt-ct-d/version/V2 - 6: https://modrinth.com/mod/athena-ctm/version/1.0.0 - 7: https://www.modpackindex.com/mod/43599/athena - 8: https://modrinth.com/mod/stitch/gallery - 9: https://www.curseforge.com/minecraft/mc-mods/athena/files --- </details> **Runtime dependency correctly updated to Stitch** Verified that Stitch (formerly Athena/athena-ctm) is the official successor for Minecraft 1.21 and newer. The change in `enderio/build.gradle.kts` at line 54 aligns with the renamed Gradle property. • File: enderio/build.gradle.kts (line 54) ```kotlin runtimeOnly("maven.modrinth:stitch:${stitchVersion}") ``` </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/DrainScreen.java (1)</summary> `45-48`: **Refactored range buttons using common widgets** The direct instantiation of range increase/decrease buttons has been replaced with calls to common widget factory methods from EIOCommonWidgets. This improves code maintainability by consolidating duplicate range GUI code across the application, as mentioned in the PR objectives. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/XPVacuumScreen.java (1)</summary> `42-45`: **Good refactoring to use common widget factory methods.** Using the centralised factory methods from `EIOCommonWidgets` for range control buttons improves code maintainability and consistency across GUI screens. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/VacuumChestScreen.java (1)</summary> `40-43`: **Good refactoring to use common widget factory methods.** Using the centralised factory methods from `EIOCommonWidgets` for range control buttons improves code maintainability and consistency across different machine GUIs. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/config/common/MachinesCommonConfig.java (2)</summary> `15-15`: **New configuration property for wireless charger range added.** The new config value aligns with the PR objectives of adding wireless charger functionality. --- `43-45`: **Well-structured configuration category for the wireless charger.** The new configuration category follows the established pattern in the file with proper builder push/pop and a descriptive comment. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/EnderIOMachines.java (2)</summary> `24-24`: **New import for the RangeExtenderDataProvider.** This import supports the addition of wireless charger functionality with range extension capabilities. --- `119-119`: **Added RangeExtenderDataProvider to the data generation pipeline.** The data provider is properly registered with the same conditional inclusion pattern as other providers, ensuring range extender data is generated for server use. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/AversionObeliskScreen.java (1)</summary> `43-46`: **Good refactoring to use common widget factory methods.** Using the centralised factory methods from `EIOCommonWidgets` for range control buttons improves code maintainability and consistency across different GUI screens. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineMenus.java (3)</summary> `26-26`: **Imported WirelessChargerScreen class** The import for the new wireless charger screen class looks correct and follows the same import pattern as other machine screens. --- `52-52`: **Imported WirelessChargerMenu class** The import for the wireless charger menu class follows the established pattern in the codebase. --- `94-95`: **Added menu registration for wireless charger** The registration of the wireless charger menu follows the same pattern as other machine menu registrations, using consistent naming conventions and parameter ordering. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/attachment/RangedActor.java (2)</summary> `8-10`: **Added default implementation for getMaxRange** This change properly adds a default implementation that delegates to the ActionRange record's maxRange value, which supports the per-instance dynamic maximum ranges for the wireless charger feature. --- `37-37`: **Improved range comparison logic** The condition has been updated to compare the current range directly with the maxRange from the same ActionRange object, making the comparison more direct and consistent with the new default implementation of getMaxRange(). </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/RelocatorObeliskScreen.java (1)</summary> `43-46`: **Consolidated range adjustment buttons using common widget methods** The implementation now uses the common factory methods from EIOCommonWidgets for creating range adjustment buttons, which helps standardize UI controls across all machine screens that implement range functionality. This reduces code duplication and ensures a consistent look and feel. </details> <details> <summary>enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger.json (1)</summary> `1-12`: **New model file for wireless charger block** The model definition follows Minecraft's standard block model conventions and reuses existing EnderIO machine textures where appropriate, while defining a custom front texture for the wireless charger. The particle texture is correctly set to the front texture, which is standard practice for visible block faces. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlockEntities.java (2)</summary> `44-44`: **Good addition of the necessary import.** The import for `WirelessChargerBlockEntity` is correctly added to support the new wireless charger functionality. --- `137-139`: **LGTM: Correctly registers the wireless charger block entity.** The wireless charger block entity registration follows the same pattern as other powered machines, particularly similar to the wired charger registration above it. The `poweredMachineBlockEntityCapabilities` application ensures it has the necessary energy storage and item handling capabilities. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/package-info.java (1)</summary> `1-4`: **Standard null-safety annotations applied correctly.** These annotations properly establish non-null defaults for parameters and return values throughout the package, which is a good practice for ensuring null-safety. </details> <details> <summary>enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_active.json (1)</summary> `1-12`: **Model JSON follows standard conventions and is well structured.** The wireless charger active model correctly inherits from the standard cube block model and properly defines textures for all faces. The use of the active texture for the front face will provide visual feedback when the machine is operating. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java (2)</summary> `27-33`: **Import statements reorganised correctly.** The import statements have been moved to a more logical location at the end of the import block, which improves code organisation without changing functionality. --- `43-43`: **Good refactoring of range management.** The DEFAULT_RANGE has been updated to include the max range parameter (6) which previously was defined in a separate getMaxRange() method. This consolidation is part of the broader refactoring of range management into a common widget as mentioned in the PR objectives. </details> <details> <summary>enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java (2)</summary> `215-215`: **Added new translation key for Maximum Range.** This new translation key adds support for the wireless charger and range extender features, providing localized text for displaying maximum range values in GUIs. --- `37-38`: **Formatting improvements for better readability.** These formatting changes improve code readability and maintain consistent style throughout the file. Also applies to: 42-43, 48-49, 64-64, 263-264, 289-292, 316-316, 319-319 </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/InhibitorObeliskScreen.java (1)</summary> `43-46`: **Improved code reuse with widget factory methods.** Good refactoring to use the common widget factory methods instead of direct button creation. This improves maintainability and consistency across different machine GUIs. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java (5)</summary> `18-18`: **Added maxRange field to ActionRange record.** The record now includes a maxRange field to support dynamic maximum range values for machines like the wireless charger. --- `20-23`: **Updated CODEC to include maxRange field.** The Codec correctly includes the new maxRange field for serialization and deserialization. --- `25-26`: **Updated STREAM_CODEC to include maxRange field.** The StreamCodec correctly includes the new maxRange field for network transmission. --- `31-33`: **Updated factory methods to preserve maxRange.** All methods creating new ActionRange instances now correctly preserve the maxRange value. Also applies to: 35-37, 39-41, 43-45, 47-49 --- `51-53`: **Added setMaxRange method.** The new setMaxRange method allows for updating the maxRange value while preserving other fields, which is essential for the wireless charger's range extension functionality. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineDataMaps.java (2)</summary> `4-4`: **Added import for RangeExtender.** Added the necessary import for the new RangeExtender class. --- `15-15`: **Registered RangeExtender data map.** This registration enables the range extender functionality, allowing blocks like antennas to extend the range of wireless chargers. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/config/MachinesConfigLang.java (2)</summary> `63-70`: **Good addition of Wireless Charger configuration translations.** The new translation keys for the Wireless Charger feature are well-structured and follow the established pattern in the file. The translations are descriptive and clear for users. --- `90-91`: **Improved code formatting for readability.** Breaking the parameters across multiple lines improves readability of the code. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessAntennaBlock.java (1)</summary> `12-12`: **Custom shape implementation looks good.** The custom VoxelShape creates a proper hitbox for the antenna, making it match its visual appearance rather than being a full block. </details> <details> <summary>enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (2)</summary> `17-20`: **Good centralisation of button resources.** The addition of these resource locations and widget sprites centralises the UI element definitions, which supports the DRY principle and improves consistency across the UI. --- `33-39`: **Excellent addition of factory methods for range buttons.** These factory methods help standardise the creation of range adjustment buttons across different GUIs, reducing code duplication and ensuring consistent appearance. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java (1)</summary> `28-28`: **Good update to ActionRange constructor with maxRange parameter.** The addition of the maxRange parameter to the ActionRange constructor aligns with the refactoring to support per-instance maximum ranges, which is needed for the wireless charger feature. </details> <details> <summary>enderio-machines/src/main/resources/assets/enderio/models/block/wireless_charger_antenna.json (1)</summary> `1-81`: **The model looks well-structured.** The wireless charger antenna model is properly defined with appropriate elements for the base, stem, and rings. The texture references and UV mappings are correctly specified. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/tag/MachineTags.java (3)</summary> `7-7`: **LGTM! Import added for Block class.** The import is correctly added to support the new blocks tag implementation. --- `13-13`: **LGTM! Register method updated.** The register method properly calls the new Blocks.init() method. --- `27-37`: **LGTM! Well-structured tag implementation.** The Blocks class implementation follows the same pattern as the existing EntityTypes class, maintaining consistent code style. The RANGE_EXTENDER tag is properly created using the EnderIO namespace. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/config/common/EnergyConfig.java (2)</summary> `40-42`: **New configuration fields added for wireless charger.** The configuration fields for the wireless charger capacity, usage, and upkeep are properly defined. --- `166-173`: **LGTM! Wireless charger configuration section.** The wireless charger configuration section follows the same structure as other machine configurations with appropriate comments and reasonable default values: - 128,000 uI capacity matches the wired charger - 60 uI/t charge rate matches the wired charger - 2 uI/t upkeep cost is reasonable for a passive wireless device This ensures consistency in the energy system balancing. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/datamap/RangeExtender.java (1)</summary> `14-22`: **Well-structured data map implementation for range extension functionality.** This is a good implementation of a data map for tracking range extension values. The code effectively uses NeoForged's data map API to create a mapping between block tags and integer values that represent range extension amounts. The structure allows for flexible configuration of range extenders through data generation rather than hardcoded values, which is a maintainable approach. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/data/datamap/RangeExtenderDataProvider.java (2)</summary> `16-25`: **Data provider implementation looks good.** The provider correctly implements the data generation pattern with a clean API for adding entries. The `computeIfAbsent` approach in the `addData` method efficiently handles the nested map structure. --- `27-36`: **Range values for antennas look appropriate.** The implementation correctly associates the wireless charger antennas with their respective range extension values (16 and 32), which seems appropriate for a basic and advanced version. The data is properly added to the RangeExtender data map. </details> <details> <summary>enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java (2)</summary> `85-93`: **Good addition of animation and block break reset methods.** These overrides improve the user experience by preventing unnecessary re-equip animations and block break resets when switching between items of the same type. This makes the item behaviour more polished. --- `22-24`: **Improved formatting for better readability.** The reformatting of the FLUID_HANDLER_PROVIDER definition improves code readability without changing functionality. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java (1)</summary> `1-58`: **Well-structured menu implementation for the new wireless charger feature.** The menu class follows the established pattern for machine menus in this codebase with clear button handling for range control and visibility toggle. The implementation is clean and appropriately leverages the base class functionality. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/data/recipes/MachineRecipeProvider.java (3)</summary> `230-239`: **Good recipe implementation for the wireless charger.** The recipe follows the same pattern as other machine recipes while requiring appropriate ingredients including copper alloy ingots, void chassis, and ender resonator for the wireless functionality. --- `241-250`: **Clear recipe definition for the wireless charger antenna.** The recipe appropriately uses pulsating alloy for the antenna element along with copper alloy and ender resonator, which aligns with the expected functionality of the component. --- `252-261`: **Well-defined recipe for the advanced wireless charger antenna.** The upgrade path from basic to advanced antenna is logical, replacing pulsating alloy with vibrant alloy and using sentient ender instead of the basic ender resonator for improved range capabilities. </details> <details> <summary>enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java (1)</summary> `171-179`: **Good addition of animation control methods to improve player experience.** These methods prevent unnecessary re-equip animations and block break resets when the item doesn't actually change. This provides a smoother experience when item data changes but the item itself remains the same. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/init/MachineBlocks.java (2)</summary> `143-151`: **Appropriate block registrations for the new wireless charger system.** The registrations for the wireless charger and its two antenna variants follow the established pattern for machine blocks in this class. The wireless charger is correctly registered as a progress machine, which aligns with its expected functionality. --- `379-392`: **Good implementation of a helper method for wireless antenna blocks.** The `wirelessAntenna` method efficiently centralizes the common properties for antenna blocks, including strength, occlusion settings, loot table, block tags, and UI elements. The method appropriately adds the antennas to the `RANGE_EXTENDER` tag, which will allow them to be discovered by the wireless charger for range extension. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java (2)</summary> `58-58`: **Consistent update to the ActionRange constructor** The DEFAULT_RANGE now properly includes the maxRange parameter (10), which aligns with the broader refactoring of range handling across machine block entities. This change correctly supports the new range extension system. --- `86-86`: **Good use of the new ActionRange.maxRange() method** The updated setActionRange method now correctly uses actionRange.maxRange() for clamping instead of a hard-coded value, making the range limits more flexible and consistent with the new implementation. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java (1)</summary> `47-51`: **Good utilisation of common widget factories** The screen appropriately uses the standardised EIOCommonWidgets.createRangeIncrease and createRangeDecrease methods, which improves consistency across the GUI system. This is a good approach for maintaining visual coherence. </details> <details> <summary>enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java (1)</summary> `85-93`: **Good addition of animation control methods** The addition of shouldCauseReequipAnimation and shouldCauseBlockBreakReset methods improves the user experience by preventing unnecessary animations when only the item's NBT data changes (like energy level), while still correctly handling actual item changes or slot changes. </details> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1)</summary> `70-97`: _🛠️ Refactor suggestion_ **Improve charging algorithm efficiency and error handling** The current implementation has several concerns: 1. Early return from nested loops can lead to uneven distribution of energy 2. No null check before accessing the energy capability Consider refactoring to improve efficiency and robustness. ```diff public void chargeItem() { - if (level == null || bounds == null) { + if (level == null) { return; } PoweredMachineEnergyStorage energyStorage = getEnergyStorage(); if (energyStorage.getEnergyStored() <= 0) { return; } int toDistribute = Math.min(energyStorage.getEnergyStored(), getMaxEnergyUse()); List<Player> players = level.getEntitiesOfClass(Player.class, bounds); for (Player player : players) { Inventory inventory = player.getInventory(); for (int i = 0; i < inventory.getContainerSize(); i++) { ItemStack stack = inventory.getItem(i); - @Nullable - IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM); - if (cap != null && cap.canReceive()) { - int received = cap.receiveEnergy(toDistribute, false); - energyStorage.consumeEnergy(received); - toDistribute -= received; - if (toDistribute <= 0) { - return; + if (!stack.isEmpty()) { + @Nullable IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM); + if (cap != null && cap.canReceive()) { + int received = cap.receiveEnergy(toDistribute, false); + if (received > 0) { + energyStorage.consumeEnergy(received); + toDistribute -= received; + if (toDistribute <= 0) { + break; // Break just this inner loop, not the entire method + } + } } } } + if (toDistribute <= 0) { + break; // Break the outer loop if we've distributed all available energy + } } } ``` > Likely an incorrect or invalid review comment. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
@ -0,0 +18,4 @@
@Override
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
return SHAPE;
}
coderabbitai[bot] (Migrated from github.com) commented 2025-05-01 09:36:20 +00:00

⚠️ Potential issue

Incorrect method override needs fixing.

The method being overridden should be getOutlineShape, not getShape. The getShape method doesn't exist in the Block class.

Apply this diff to fix the method override:

-    @Override
-    protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
+    @Override
+    public VoxelShape getOutlineShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
         return SHAPE;
     }

You should also consider overriding getCollisionShape to match the outline shape:

@Override
public VoxelShape getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) {
    return SHAPE;
}
_⚠️ Potential issue_ **Incorrect method override needs fixing.** The method being overridden should be `getOutlineShape`, not `getShape`. The `getShape` method doesn't exist in the Block class. Apply this diff to fix the method override: ```diff - @Override - protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { + @Override + public VoxelShape getOutlineShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { return SHAPE; } ``` You should also consider overriding `getCollisionShape` to match the outline shape: ```java @Override public VoxelShape getCollisionShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) { return SHAPE; } ``` <!-- This is an auto-generated comment by CodeRabbit -->
@ -0,0 +1,238 @@
package com.enderio.machines.common.blocks.wireless_charger;
coderabbitai[bot] (Migrated from github.com) commented 2025-05-01 09:36:21 +00:00

🛠️ Refactor suggestion

Initialise the bounds in the constructor

The bounds field is marked @Nullable but should be initialised in the constructor rather than being checked for null later, to ensure it's always available after object creation.

 private @Nullable AABB bounds;

 public WirelessChargerBlockEntity(BlockPos worldPosition, BlockState blockState) {
     super(MachineBlockEntities.WIRELESS_CHARGER.get(), worldPosition, blockState, true, CapacitorSupport.REQUIRED,
             EnergyIOMode.Input, CAPACITY, USAGE);
     actionRange = new ActionRange(MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get(), false, MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get());
     energyUpkeep = MachinesConfig.COMMON.ENERGY.WIRELESS_CHARGER_UPKEEP;
+    updateBounds();
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    private @Nullable AABB bounds;

    public WirelessChargerBlockEntity(BlockPos worldPosition, BlockState blockState) {
        super(MachineBlockEntities.WIRELESS_CHARGER.get(), worldPosition, blockState, true,
              CapacitorSupport.REQUIRED, EnergyIOMode.Input, CAPACITY, USAGE);
        actionRange = new ActionRange(
            MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get(),
            false,
            MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get()
        );
        energyUpkeep = MachinesConfig.COMMON.ENERGY.WIRELESS_CHARGER_UPKEEP;
+       updateBounds();
    }
_🛠️ Refactor suggestion_ **Initialise the bounds in the constructor** The bounds field is marked @Nullable but should be initialised in the constructor rather than being checked for null later, to ensure it's always available after object creation. ```diff private @Nullable AABB bounds; public WirelessChargerBlockEntity(BlockPos worldPosition, BlockState blockState) { super(MachineBlockEntities.WIRELESS_CHARGER.get(), worldPosition, blockState, true, CapacitorSupport.REQUIRED, EnergyIOMode.Input, CAPACITY, USAGE); actionRange = new ActionRange(MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get(), false, MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get()); energyUpkeep = MachinesConfig.COMMON.ENERGY.WIRELESS_CHARGER_UPKEEP; + updateBounds(); } ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion private @Nullable AABB bounds; public WirelessChargerBlockEntity(BlockPos worldPosition, BlockState blockState) { super(MachineBlockEntities.WIRELESS_CHARGER.get(), worldPosition, blockState, true, CapacitorSupport.REQUIRED, EnergyIOMode.Input, CAPACITY, USAGE); actionRange = new ActionRange( MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get(), false, MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get() ); energyUpkeep = MachinesConfig.COMMON.ENERGY.WIRELESS_CHARGER_UPKEEP; + updateBounds(); } ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
@ -0,0 +207,4 @@
}
}
return rangeExtension;
}
coderabbitai[bot] (Migrated from github.com) commented 2025-05-01 09:36:21 +00:00

🛠️ Refactor suggestion

Add error handling for RangeExtender data retrieval

The data map retrieval doesn't have proper error handling if the getBlockHolder or getData operations fail. Consider adding more robust error handling.

 private int getRangeExtension() {
     int rangeExtension = 0;
     if (level != null) {
         BlockState bs = level.getBlockState(getBlockPos().above());
         if (bs.is(MachineTags.Blocks.RANGE_EXTENDER)) {
-            Map<TagKey<Block>, Integer> map = bs.getBlockHolder().getData(RangeExtender.DATA_MAP);
-            if (map != null) {
-                rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0);
+            try {
+                var holder = bs.getBlockHolder();
+                if (holder != null) {
+                    Map<TagKey<Block>, Integer> map = holder.getData(RangeExtender.DATA_MAP);
+                    if (map != null) {
+                        rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0);
+                    }
+                }
+            } catch (Exception e) {
+                // Log error or handle exception
+                rangeExtension = 0;
             }
         }
     }
     return rangeExtension;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

private int getRangeExtension() {
    int rangeExtension = 0;
    if (level != null) {
        BlockState bs = level.getBlockState(getBlockPos().above());
        if (bs.is(MachineTags.Blocks.RANGE_EXTENDER)) {
            try {
                var holder = bs.getBlockHolder();
                if (holder != null) {
                    Map<TagKey<Block>, Integer> map = holder.getData(RangeExtender.DATA_MAP);
                    if (map != null) {
                        rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0);
                    }
                }
            } catch (Exception e) {
                // Log error or handle exception
                rangeExtension = 0;
            }
        }
    }
    return rangeExtension;
}
_🛠️ Refactor suggestion_ **Add error handling for RangeExtender data retrieval** The data map retrieval doesn't have proper error handling if the getBlockHolder or getData operations fail. Consider adding more robust error handling. ```diff private int getRangeExtension() { int rangeExtension = 0; if (level != null) { BlockState bs = level.getBlockState(getBlockPos().above()); if (bs.is(MachineTags.Blocks.RANGE_EXTENDER)) { - Map<TagKey<Block>, Integer> map = bs.getBlockHolder().getData(RangeExtender.DATA_MAP); - if (map != null) { - rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0); + try { + var holder = bs.getBlockHolder(); + if (holder != null) { + Map<TagKey<Block>, Integer> map = holder.getData(RangeExtender.DATA_MAP); + if (map != null) { + rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0); + } + } + } catch (Exception e) { + // Log error or handle exception + rangeExtension = 0; } } } return rangeExtension; } ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion private int getRangeExtension() { int rangeExtension = 0; if (level != null) { BlockState bs = level.getBlockState(getBlockPos().above()); if (bs.is(MachineTags.Blocks.RANGE_EXTENDER)) { try { var holder = bs.getBlockHolder(); if (holder != null) { Map<TagKey<Block>, Integer> map = holder.getData(RangeExtender.DATA_MAP); if (map != null) { rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0); } } } catch (Exception e) { // Log error or handle exception rangeExtension = 0; } } } return rangeExtension; } ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
@ -11,17 +11,26 @@ public class MachinesClientBlocksConfig {
public final ModConfigSpec.ConfigValue<String> INHIBITOR_RANGE_COLOR;
coderabbitai[bot] (Migrated from github.com) commented 2025-05-01 09:36:21 +00:00

⚠️ Potential issue

Config key for wireless charger range color is duplicated.

There's a bug in the configuration key for the wireless charger range color. It's using "aversionRangeColor" which is the same key already used for the Aversion Obelisk range color on line 31. This will cause both config options to use the same underlying value.

Modify the config key to be unique:

 WIRELESS_CHARGER_RANGE_COLOR = builder.comment("The color of the range box of the Wireless Charger")
-        .define("aversionRangeColor", "C7CC2A");
+        .define("wirelessChargerRangeColor", "C7CC2A");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        WIRELESS_CHARGER_RANGE_COLOR = builder.comment("The color of the range box of the Wireless Charger")
                .define("wirelessChargerRangeColor", "C7CC2A");

Addressed in commits 720109b to 1549f4d

_⚠️ Potential issue_ **Config key for wireless charger range color is duplicated.** There's a bug in the configuration key for the wireless charger range color. It's using "aversionRangeColor" which is the same key already used for the Aversion Obelisk range color on line 31. This will cause both config options to use the same underlying value. Modify the config key to be unique: ```diff WIRELESS_CHARGER_RANGE_COLOR = builder.comment("The color of the range box of the Wireless Charger") - .define("aversionRangeColor", "C7CC2A"); + .define("wirelessChargerRangeColor", "C7CC2A"); ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion WIRELESS_CHARGER_RANGE_COLOR = builder.comment("The color of the range box of the Wireless Charger") .define("wirelessChargerRangeColor", "C7CC2A"); ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commits 720109b to 1549f4d
ferriarnus (Migrated from github.com) reviewed 2025-05-01 09:55:39 +00:00
coderabbitai[bot] (Migrated from github.com) reviewed 2025-05-01 10:25:25 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 0

♻️ Duplicate comments (2)
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (2)

56-63: Initialise the bounds in the constructor

The bounds field is marked @Nullable but should be initialised in the constructor rather than only in onLoad(), to ensure it's always available after object creation.

Apply this change:

 public WirelessChargerBlockEntity(BlockPos worldPosition, BlockState blockState) {
     super(MachineBlockEntities.WIRELESS_CHARGER.get(), worldPosition, blockState, true, CapacitorSupport.REQUIRED,
             EnergyIOMode.Input, CAPACITY, USAGE);
     actionRange = new ActionRange(MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get(), false, MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get());
     energyUpkeep = MachinesConfig.COMMON.ENERGY.WIRELESS_CHARGER_UPKEEP;
+    updateBounds();
 }

190-202: Add error handling for RangeExtender data retrieval

The data map retrieval doesn't have proper error handling if the getBlockHolder or getData operations fail. Consider adding more robust error handling.

 private int getRangeExtension() {
     int rangeExtension = 0;
     if (level != null) {
         BlockState bs = level.getBlockState(getBlockPos().above());
         if (bs.is(MachineTags.Blocks.RANGE_EXTENDER)) {
-            Map<TagKey<Block>, Integer> map = bs.getBlockHolder().getData(RangeExtender.DATA_MAP);
-            if (map != null) {
-                rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0);
+            try {
+                var holder = bs.getBlockHolder();
+                if (holder != null) {
+                    Map<TagKey<Block>, Integer> map = holder.getData(RangeExtender.DATA_MAP);
+                    if (map != null) {
+                        rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0);
+                    }
+                }
+            } catch (Exception e) {
+                // Log error or handle exception
+                rangeExtension = 0;
             }
         }
     }
     return rangeExtension;
 }
🧹 Nitpick comments (5)
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (5)

70-97: Optimize chargeItem() to reduce unnecessary iterations

The current implementation continues iterating through a player's inventory even if there's no energy left to distribute. Adding a check at the start of each player's inventory processing could improve performance.

 public void chargeItem() {
     if (level == null || bounds == null) {
         return;
     }
     PoweredMachineEnergyStorage energyStorage = getEnergyStorage();
     if (energyStorage.getEnergyStored() <= 0) {
         return;
     }
     int toDistribute = Math.min(energyStorage.getEnergyStored(), getMaxEnergyUse());

     List<Player> players = level.getEntitiesOfClass(Player.class, bounds);
     for (Player player : players) {
+        if (toDistribute <= 0) {
+            return;
+        }
         Inventory inventory = player.getInventory();
         for (int i = 0; i < inventory.getContainerSize(); i++) {
             ItemStack stack = inventory.getItem(i);
             @Nullable
             IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM);
             if (cap != null && cap.canReceive()) {
                 int received = cap.receiveEnergy(toDistribute, false);
                 energyStorage.consumeEnergy(received);
                 toDistribute -= received;
                 if (toDistribute <= 0) {
                     return;
                 }
             }
         }
     }
 }

38-38: Use the standard Nullable annotation

The current implementation uses Jetbrains annotations for @Nullable instead of the standard one used elsewhere in the codebase.

As noted in previous discussions, we should use the Jetbrains annotations consistently, so this import is correct. Please ensure that all team members are aware of this standard.


186-188: Consider adding null check in updateBounds method

The updateBounds method creates a new bounding box but doesn't check if getRange() could return null or if the block position is valid.

 private void updateBounds() {
-    bounds = new AABB(getBlockPos()).inflate(getRange());
+    if (level != null) {
+        bounds = new AABB(getBlockPos()).inflate(getRange());
+    }
 }

129-137: Consider simplifying the onLoad logic

The onLoad method has a complex conditional that could be simplified.

 @Override
 public void onLoad() {
     super.onLoad();
-    if (level != null && !level.isClientSide() && actionRange.range() > calculateMaxRange()) {
-        int maxRange = calculateMaxRange();
-        setActionRange(new ActionRange(maxRange, actionRange.isVisible(), maxRange));
+    if (level != null && !level.isClientSide()) {
+        int maxRange = calculateMaxRange();
+        if (actionRange.range() > maxRange) {
+            setActionRange(new ActionRange(maxRange, actionRange.isVisible(), maxRange));
+        }
     }
     updateBounds();
 }

80-96: Consider adding a particle effect when items are charged

Adding a visual indicator when an item is charged would improve user feedback.

Adding a particle effect at the player's position when their items are charged would make it more obvious that the wireless charger is working. Consider adding something like:

 for (Player player : players) {
     Inventory inventory = player.getInventory();
+    boolean charged = false;
     for (int i = 0; i < inventory.getContainerSize(); i++) {
         ItemStack stack = inventory.getItem(i);
         @Nullable
         IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM);
         if (cap != null && cap.canReceive()) {
             int received = cap.receiveEnergy(toDistribute, false);
             energyStorage.consumeEnergy(received);
             toDistribute -= received;
+            if (received > 0) {
+                charged = true;
+            }
             if (toDistribute <= 0) {
+                if (charged && level.isClientSide()) {
+                    level.addParticle(ParticleTypes.ELECTRIC_SPARK, 
+                        player.getX(), player.getY() + 1.0, player.getZ(), 
+                        0, 0, 0);
+                }
                 return;
             }
         }
     }
+    if (charged && level.isClientSide()) {
+        level.addParticle(ParticleTypes.ELECTRIC_SPARK, 
+            player.getX(), player.getY() + 1.0, player.getZ(), 
+            0, 0, 0);
+    }
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1549f4d3a55797102c57d9fab92228854293d04c and 63bb7da210b330017ee4d0f8a54f3812e7f4b684.

📒 Files selected for processing (1)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1 hunks)
Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: verify
**Actionable comments posted: 0** <details> <summary>♻️ Duplicate comments (2)</summary><blockquote> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (2)</summary><blockquote> `56-63`: **Initialise the bounds in the constructor** The bounds field is marked @Nullable but should be initialised in the constructor rather than only in onLoad(), to ensure it's always available after object creation. Apply this change: ```diff public WirelessChargerBlockEntity(BlockPos worldPosition, BlockState blockState) { super(MachineBlockEntities.WIRELESS_CHARGER.get(), worldPosition, blockState, true, CapacitorSupport.REQUIRED, EnergyIOMode.Input, CAPACITY, USAGE); actionRange = new ActionRange(MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get(), false, MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get()); energyUpkeep = MachinesConfig.COMMON.ENERGY.WIRELESS_CHARGER_UPKEEP; + updateBounds(); } ``` --- `190-202`: **Add error handling for RangeExtender data retrieval** The data map retrieval doesn't have proper error handling if the getBlockHolder or getData operations fail. Consider adding more robust error handling. ```diff private int getRangeExtension() { int rangeExtension = 0; if (level != null) { BlockState bs = level.getBlockState(getBlockPos().above()); if (bs.is(MachineTags.Blocks.RANGE_EXTENDER)) { - Map<TagKey<Block>, Integer> map = bs.getBlockHolder().getData(RangeExtender.DATA_MAP); - if (map != null) { - rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0); + try { + var holder = bs.getBlockHolder(); + if (holder != null) { + Map<TagKey<Block>, Integer> map = holder.getData(RangeExtender.DATA_MAP); + if (map != null) { + rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0); + } + } + } catch (Exception e) { + // Log error or handle exception + rangeExtension = 0; } } } return rangeExtension; } ``` </blockquote></details> </blockquote></details> <details> <summary>🧹 Nitpick comments (5)</summary><blockquote> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (5)</summary><blockquote> `70-97`: **Optimize chargeItem() to reduce unnecessary iterations** The current implementation continues iterating through a player's inventory even if there's no energy left to distribute. Adding a check at the start of each player's inventory processing could improve performance. ```diff public void chargeItem() { if (level == null || bounds == null) { return; } PoweredMachineEnergyStorage energyStorage = getEnergyStorage(); if (energyStorage.getEnergyStored() <= 0) { return; } int toDistribute = Math.min(energyStorage.getEnergyStored(), getMaxEnergyUse()); List<Player> players = level.getEntitiesOfClass(Player.class, bounds); for (Player player : players) { + if (toDistribute <= 0) { + return; + } Inventory inventory = player.getInventory(); for (int i = 0; i < inventory.getContainerSize(); i++) { ItemStack stack = inventory.getItem(i); @Nullable IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (cap != null && cap.canReceive()) { int received = cap.receiveEnergy(toDistribute, false); energyStorage.consumeEnergy(received); toDistribute -= received; if (toDistribute <= 0) { return; } } } } } ``` --- `38-38`: **Use the standard Nullable annotation** The current implementation uses Jetbrains annotations for @Nullable instead of the standard one used elsewhere in the codebase. As noted in previous discussions, we should use the Jetbrains annotations consistently, so this import is correct. Please ensure that all team members are aware of this standard. --- `186-188`: **Consider adding null check in updateBounds method** The updateBounds method creates a new bounding box but doesn't check if getRange() could return null or if the block position is valid. ```diff private void updateBounds() { - bounds = new AABB(getBlockPos()).inflate(getRange()); + if (level != null) { + bounds = new AABB(getBlockPos()).inflate(getRange()); + } } ``` --- `129-137`: **Consider simplifying the onLoad logic** The onLoad method has a complex conditional that could be simplified. ```diff @Override public void onLoad() { super.onLoad(); - if (level != null && !level.isClientSide() && actionRange.range() > calculateMaxRange()) { - int maxRange = calculateMaxRange(); - setActionRange(new ActionRange(maxRange, actionRange.isVisible(), maxRange)); + if (level != null && !level.isClientSide()) { + int maxRange = calculateMaxRange(); + if (actionRange.range() > maxRange) { + setActionRange(new ActionRange(maxRange, actionRange.isVisible(), maxRange)); + } } updateBounds(); } ``` --- `80-96`: **Consider adding a particle effect when items are charged** Adding a visual indicator when an item is charged would improve user feedback. Adding a particle effect at the player's position when their items are charged would make it more obvious that the wireless charger is working. Consider adding something like: ```diff for (Player player : players) { Inventory inventory = player.getInventory(); + boolean charged = false; for (int i = 0; i < inventory.getContainerSize(); i++) { ItemStack stack = inventory.getItem(i); @Nullable IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (cap != null && cap.canReceive()) { int received = cap.receiveEnergy(toDistribute, false); energyStorage.consumeEnergy(received); toDistribute -= received; + if (received > 0) { + charged = true; + } if (toDistribute <= 0) { + if (charged && level.isClientSide()) { + level.addParticle(ParticleTypes.ELECTRIC_SPARK, + player.getX(), player.getY() + 1.0, player.getZ(), + 0, 0, 0); + } return; } } } + if (charged && level.isClientSide()) { + level.addParticle(ParticleTypes.ELECTRIC_SPARK, + player.getX(), player.getY() + 1.0, player.getZ(), + 0, 0, 0); + } } ``` </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 1549f4d3a55797102c57d9fab92228854293d04c and 63bb7da210b330017ee4d0f8a54f3812e7f4b684. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java` (1 hunks) </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary> * GitHub Check: verify </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Rover656 commented 2025-05-02 00:04:01 +00:00 (Migrated from github.com)

Apologies, if you can resolve the conflicts that'd be great - changed to target the 8.0 branch.
Cheers

Apologies, if you can resolve the conflicts that'd be great - changed to target the 8.0 branch. Cheers
coderabbitai[bot] (Migrated from github.com) reviewed 2025-05-06 18:24:05 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 63bb7da210b330017ee4d0f8a54f3812e7f4b684 and 0ded80fd68.

Files ignored due to path filters (15)
  • enderio-base/src/generated/resources/assets/enderio/lang/en_us.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger_antenna.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger_antenna_advanced.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/lang/en_us.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/block/wireless_charger_active_combined.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/block/wireless_charger_combined.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger_antenna.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger_antenna_advanced.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/erase_wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger_antenna.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger_antenna_advanced.json is excluded by !**/generated/**
  • enderio-machines/src/generated/resources/data/enderio/data_maps/block/range_extender.json is excluded by !**/generated/**
📒 Files selected for processing (13)
  • docs/README.md (1 hunks)
  • endercore/src/main/java/com/enderio/core/client/gui/widgets/BaseEnumPickerWidget.java (2 hunks)
  • endercore/src/main/resources/META-INF/neoforge.mods.toml (1 hunks)
  • enderio-armory/src/main/resources/META-INF/neoforge.mods.toml (1 hunks)
  • enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java (1 hunks)
  • enderio-base/src/main/java/com/enderio/base/client/paint/model/PaintedBlockModel.java (14 hunks)
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java (4 hunks)
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java (4 hunks)
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java (1 hunks)
  • enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java (1 hunks)
  • enderio-base/src/main/resources/META-INF/neoforge.mods.toml (1 hunks)
  • enderio-conduits-modded/src/main/resources/META-INF/neoforge.mods.toml (1 hunks)
  • enderio-conduits/src/main/resources/META-INF/neoforge.mods.toml (1 hunks)
Files skipped from review due to trivial changes (8)
  • endercore/src/main/resources/META-INF/neoforge.mods.toml
  • enderio-base/src/main/resources/META-INF/neoforge.mods.toml
  • docs/README.md
  • enderio-conduits/src/main/resources/META-INF/neoforge.mods.toml
  • enderio-armory/src/main/resources/META-INF/neoforge.mods.toml
  • enderio-conduits-modded/src/main/resources/META-INF/neoforge.mods.toml
  • enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java
  • enderio-base/src/main/java/com/enderio/base/client/paint/model/PaintedBlockModel.java
🚧 Files skipped from review as they are similar to previous changes (4)
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java
  • enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java
  • enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java
Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: verify
🔇 Additional comments (3)
endercore/src/main/java/com/enderio/core/client/gui/widgets/BaseEnumPickerWidget.java (3)

136-136: Behaviour change in the onPress method

The change now always selects the next value before displaying the selection screen, whereas previously it appears to have only changed the selection when the widget was already expanded.

Please verify this is the intended behaviour. If users expect to see the current selection when opening the dropdown, this could be confusing.


141-152: Excellent addition of mouse wheel support

The addition of mouse wheel support improves the usability of the widget, allowing users to quickly navigate through options without opening the dropdown.


156-157: Good improvement in the selection logic

Using the new getValueIndex method instead of directly relying on ordinal() makes the code more robust, especially if the widget needs to work with a filtered or reordered subset of enum values.

However, this depends on the getValueIndex method correctly handling all cases, as noted in the earlier comment.

**Actionable comments posted: 1** <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 63bb7da210b330017ee4d0f8a54f3812e7f4b684 and 0ded80fd6851b45789c6b789a5aa867d23f227c8. </details> <details> <summary>⛔ Files ignored due to path filters (15)</summary> * `enderio-base/src/generated/resources/assets/enderio/lang/en_us.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger_antenna.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/blockstates/wireless_charger_antenna_advanced.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/lang/en_us.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/block/wireless_charger_active_combined.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/block/wireless_charger_combined.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger_antenna.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/assets/enderio/models/item/wireless_charger_antenna_advanced.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/erase_wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger_antenna.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/advancement/recipes/misc/wireless_charger_antenna_advanced.json` is excluded by `!**/generated/**` * `enderio-machines/src/generated/resources/data/enderio/data_maps/block/range_extender.json` is excluded by `!**/generated/**` </details> <details> <summary>📒 Files selected for processing (13)</summary> * `docs/README.md` (1 hunks) * `endercore/src/main/java/com/enderio/core/client/gui/widgets/BaseEnumPickerWidget.java` (2 hunks) * `endercore/src/main/resources/META-INF/neoforge.mods.toml` (1 hunks) * `enderio-armory/src/main/resources/META-INF/neoforge.mods.toml` (1 hunks) * `enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java` (1 hunks) * `enderio-base/src/main/java/com/enderio/base/client/paint/model/PaintedBlockModel.java` (14 hunks) * `enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java` (4 hunks) * `enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java` (4 hunks) * `enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java` (1 hunks) * `enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java` (1 hunks) * `enderio-base/src/main/resources/META-INF/neoforge.mods.toml` (1 hunks) * `enderio-conduits-modded/src/main/resources/META-INF/neoforge.mods.toml` (1 hunks) * `enderio-conduits/src/main/resources/META-INF/neoforge.mods.toml` (1 hunks) </details> <details> <summary>✅ Files skipped from review due to trivial changes (8)</summary> * endercore/src/main/resources/META-INF/neoforge.mods.toml * enderio-base/src/main/resources/META-INF/neoforge.mods.toml * docs/README.md * enderio-conduits/src/main/resources/META-INF/neoforge.mods.toml * enderio-armory/src/main/resources/META-INF/neoforge.mods.toml * enderio-conduits-modded/src/main/resources/META-INF/neoforge.mods.toml * enderio-base/src/main/java/com/enderio/base/common/lang/EIOLang.java * enderio-base/src/main/java/com/enderio/base/client/paint/model/PaintedBlockModel.java </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (4)</summary> * enderio-base/src/main/java/com/enderio/base/common/item/tool/TravelStaffItem.java * enderio-base/src/main/java/com/enderio/base/client/gui/widget/EIOCommonWidgets.java * enderio-base/src/main/java/com/enderio/base/common/item/tool/LevitationStaffItem.java * enderio-base/src/main/java/com/enderio/base/common/item/tool/ElectromagnetItem.java </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary> * GitHub Check: verify </details> <details> <summary>🔇 Additional comments (3)</summary><blockquote> <details> <summary>endercore/src/main/java/com/enderio/core/client/gui/widgets/BaseEnumPickerWidget.java (3)</summary> `136-136`: **Behaviour change in the `onPress` method** The change now always selects the next value before displaying the selection screen, whereas previously it appears to have only changed the selection when the widget was already expanded. Please verify this is the intended behaviour. If users expect to see the current selection when opening the dropdown, this could be confusing. --- `141-152`: **Excellent addition of mouse wheel support** The addition of mouse wheel support improves the usability of the widget, allowing users to quickly navigate through options without opening the dropdown. --- `156-157`: **Good improvement in the selection logic** Using the new `getValueIndex` method instead of directly relying on `ordinal()` makes the code more robust, especially if the widget needs to work with a filtered or reordered subset of enum values. However, this depends on the `getValueIndex` method correctly handling all cases, as noted in the earlier comment. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
coderabbitai[bot] (Migrated from github.com) commented 2025-05-06 18:24:04 +00:00

🛠️ Refactor suggestion

Potential issue with the new getValueIndex method

While this method provides a nice abstraction for finding an enum's index, it has a potential issue: if the provided value is not found in the array returned by getValues(), the method will return an index equal to the array length, which could lead to an ArrayIndexOutOfBoundsException in the selectNext() method.

Consider adding a check to handle non-existent values:

public int getValueIndex(T value) {
    int i = 0;
    for (T t : getValues()) {
        if (t == value) {
            return i;
        }
        i++;
    }
-   return i;
+   return 0; // Return first index if value not found, or throw an exception
}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    public int getValueIndex(T value) {
        int i = 0;
        for (T t : getValues()) {
            if (t == value) {
                return i;
            }
            i++;
        }
        return 0; // Return first index if value not found, or throw an exception
    }
_🛠️ Refactor suggestion_ **Potential issue with the new `getValueIndex` method** While this method provides a nice abstraction for finding an enum's index, it has a potential issue: if the provided value is not found in the array returned by `getValues()`, the method will return an index equal to the array length, which could lead to an `ArrayIndexOutOfBoundsException` in the `selectNext()` method. Consider adding a check to handle non-existent values: ```diff public int getValueIndex(T value) { int i = 0; for (T t : getValues()) { if (t == value) { return i; } i++; } - return i; + return 0; // Return first index if value not found, or throw an exception } ``` <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. `````suggestion public int getValueIndex(T value) { int i = 0; for (T t : getValues()) { if (t == value) { return i; } i++; } return 0; // Return first index if value not found, or throw an exception } ````` </details> <!-- suggestion_end --> <!-- This is an auto-generated comment by CodeRabbit -->
Rover656 (Migrated from github.com) requested changes 2025-05-06 18:38:14 +00:00
Rover656 (Migrated from github.com) left a comment

Just a few changes please, mainly around ActionRange. Thanks!

Just a few changes please, mainly around ActionRange. Thanks!
Rover656 (Migrated from github.com) commented 2025-05-06 18:33:35 +00:00

I don't think maxRange should be stored in the component if I'm honest.

I don't think maxRange should be stored in the component if I'm honest.
@ -0,0 +1,238 @@
package com.enderio.machines.common.blocks.wireless_charger;
Rover656 (Migrated from github.com) commented 2025-05-06 18:35:37 +00:00

Instead of storing maxRange in the ActionRange, just cache the max range whenever the neighbours change.

Instead of storing maxRange in the ActionRange, just cache the max range whenever the neighbours change.
@ -0,0 +36,4 @@
addPlayerInventorySlots(8, 84);
}
public boolean isRangeVisible() {
Rover656 (Migrated from github.com) commented 2025-05-06 18:36:39 +00:00

Either mark this as EnsureSide SERVER, or use a SyncSlot to sync the state as the block entity isn't available on the client.

Either mark this as EnsureSide SERVER, or use a SyncSlot to sync the state as the block entity isn't available on the client.
@ -0,0 +25,4 @@
@Override
protected void gather() {
addData(MachineTags.Blocks.RANGE_EXTENDER, MachineBlocks.WIRELESS_CHARGER_ANTENNA.get(), 16);
Rover656 (Migrated from github.com) commented 2025-05-06 18:37:48 +00:00

Are these figures a bit large?

Are these figures a bit large?
Rover656 (Migrated from github.com) reviewed 2025-05-06 18:42:33 +00:00
@ -0,0 +36,4 @@
addPlayerInventorySlots(8, 84);
}
public boolean isRangeVisible() {
Rover656 (Migrated from github.com) commented 2025-05-06 18:42:33 +00:00

Okay I realise this isn't strictly true, not all machines fully use sync slots yet.
In this case though, I think sync slots are still what we should be doing.

Okay I realise this isn't strictly true, not all machines fully use sync slots yet. In this case though, I think sync slots are still what we should be doing.
ferriarnus (Migrated from github.com) reviewed 2025-05-06 19:38:32 +00:00
@ -0,0 +36,4 @@
addPlayerInventorySlots(8, 84);
}
public boolean isRangeVisible() {
ferriarnus (Migrated from github.com) commented 2025-05-06 19:38:32 +00:00

It is synced through ActionRange no?

It is synced through ActionRange no?
ferriarnus (Migrated from github.com) reviewed 2025-05-06 19:38:51 +00:00
@ -0,0 +25,4 @@
@Override
protected void gather() {
addData(MachineTags.Blocks.RANGE_EXTENDER, MachineBlocks.WIRELESS_CHARGER_ANTENNA.get(), 16);
ferriarnus (Migrated from github.com) commented 2025-05-06 19:38:50 +00:00

in what way?

in what way?
Rover656 (Migrated from github.com) reviewed 2025-05-06 19:39:28 +00:00
@ -0,0 +25,4 @@
@Override
protected void gather() {
addData(MachineTags.Blocks.RANGE_EXTENDER, MachineBlocks.WIRELESS_CHARGER_ANTENNA.get(), 16);
Rover656 (Migrated from github.com) commented 2025-05-06 19:39:28 +00:00

16 blocks per antenna would quickly outpace the size of many many chunks when surrounding the wireless charger, no? Unless it's just one antenna per machine in which case its okay.

16 blocks per antenna would quickly outpace the size of many many chunks when surrounding the wireless charger, no? Unless it's just one antenna per machine in which case its okay.
Rover656 (Migrated from github.com) reviewed 2025-05-06 19:39:47 +00:00
@ -0,0 +36,4 @@
addPlayerInventorySlots(8, 84);
}
public boolean isRangeVisible() {
Rover656 (Migrated from github.com) commented 2025-05-06 19:39:47 +00:00

Yeah ignore this one, I was being daft - apologies

Yeah ignore this one, I was being daft - apologies
ferriarnus (Migrated from github.com) reviewed 2025-05-06 19:41:14 +00:00
@ -0,0 +25,4 @@
@Override
protected void gather() {
addData(MachineTags.Blocks.RANGE_EXTENDER, MachineBlocks.WIRELESS_CHARGER_ANTENNA.get(), 16);
ferriarnus (Migrated from github.com) commented 2025-05-06 19:41:14 +00:00

Yeah it's only 1, and only on top of the machine.

Yeah it's only 1, and only on top of the machine.
Rover656 (Migrated from github.com) reviewed 2025-05-06 19:47:45 +00:00
@ -0,0 +25,4 @@
@Override
protected void gather() {
addData(MachineTags.Blocks.RANGE_EXTENDER, MachineBlocks.WIRELESS_CHARGER_ANTENNA.get(), 16);
Rover656 (Migrated from github.com) commented 2025-05-06 19:47:45 +00:00

ah gotcha, thats fine then :)

ah gotcha, thats fine then :)
coderabbitai[bot] (Migrated from github.com) reviewed 2025-05-06 19:53:56 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 0

♻️ Duplicate comments (2)
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (2)

57-64: Initialise the bounds in the constructor

The bounds field is marked @Nullable but should be initialised in the constructor rather than being checked for null later, to ensure it's always available after object creation.

 private @Nullable AABB bounds;

 public WirelessChargerBlockEntity(BlockPos worldPosition, BlockState blockState) {
     super(MachineBlockEntities.WIRELESS_CHARGER.get(), worldPosition, blockState, true, CapacitorSupport.REQUIRED,
             EnergyIOMode.Input, CAPACITY, USAGE);
     actionRange = new ActionRange(MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get(), false);
     energyUpkeep = MachinesConfig.COMMON.ENERGY.WIRELESS_CHARGER_UPKEEP;
+    updateBounds();
 }

198-210: Add error handling for RangeExtender data retrieval

The data map retrieval doesn't have proper error handling if the getBlockHolder or getData operations fail. Consider adding more robust error handling.

 private int getRangeExtension() {
     int rangeExtension = 0;
     if (level != null) {
         BlockState bs = level.getBlockState(getBlockPos().above());
         if (bs.is(MachineTags.Blocks.RANGE_EXTENDER)) {
-            Map<TagKey<Block>, Integer> map = bs.getBlockHolder().getData(RangeExtender.DATA_MAP);
-            if (map != null) {
-                rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0);
+            try {
+                var holder = bs.getBlockHolder();
+                if (holder != null) {
+                    Map<TagKey<Block>, Integer> map = holder.getData(RangeExtender.DATA_MAP);
+                    if (map != null) {
+                        rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0);
+                    }
+                }
+            } catch (Exception e) {
+                // Log error or handle exception
+                rangeExtension = 0;
             }
         }
     }
     return rangeExtension;
 }
🧹 Nitpick comments (3)
enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (3)

121-128: Call super.clientTick() at the beginning of the method

It's a good practice to call the parent method first unless there's a specific reason to do otherwise. This ensures that the parent's setup code runs before any child-specific logic.

 @Override
 public void clientTick() {
+    super.clientTick();
     if (level instanceof ClientLevel clientLevel) {
         getActionRange().addClientParticle(clientLevel, getBlockPos(),
                 MachinesConfig.CLIENT.BLOCKS.WIRELESS_CHARGER_RANGE_COLOR.get());
     }
-    super.clientTick();
 }

182-187: Extract duplicate block update code

The code to send block updates is duplicated in both calculateMaxRange() and setActionRange() methods. Extract this to a helper method to reduce duplication and improve maintainability.

+private void sendBlockUpdate() {
+    if (level != null) {
+        level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL);
+    }
+}

 private void calculateMaxRange() {
     this.maxRange = MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get() + getRangeExtension();
-    if (level != null) {
-        level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL);
-    }
+    sendBlockUpdate();
 }

 @Override
 @UseOnly(LogicalSide.SERVER)
 public void setActionRange(ActionRange actionRange) {
     this.actionRange = actionRange.clamp(0, getMaxRange());
     updateBounds();
     setChanged();
-    if (level != null) {
-        level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL);
-    }
+    sendBlockUpdate();
 }

Also applies to: 222-226


79-97: Optimise player inventory iteration

The current implementation iterates through all players and all their inventory slots, which could be inefficient with many players. Consider optimising by limiting energy distributed per player or implementing a batched processing approach.

 int toDistribute = Math.min(energyStorage.getEnergyStored(), getMaxEnergyUse());

 List<Player> players = level.getEntitiesOfClass(Player.class, bounds);
+// Distribute energy fairly among players
+int energyPerPlayer = players.isEmpty() ? 0 : toDistribute / players.size();
+if (energyPerPlayer > 0) {
     for (Player player : players) {
+        int playerEnergy = Math.min(energyPerPlayer, toDistribute);
         Inventory inventory = player.getInventory();
         for (int i = 0; i < inventory.getContainerSize(); i++) {
             ItemStack stack = inventory.getItem(i);
             @Nullable
             IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM);
             if (cap != null && cap.canReceive()) {
-                int received = cap.receiveEnergy(toDistribute, false);
+                int received = cap.receiveEnergy(playerEnergy, false);
                 energyStorage.consumeEnergy(received);
                 toDistribute -= received;
+                playerEnergy -= received;
                 if (toDistribute <= 0) {
                     return;
                 }
+                if (playerEnergy <= 0) {
+                    break;
+                }
             }
         }
     }
+}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 069a6fd5fc and 493a911aaa.

📒 Files selected for processing (9)
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/farming_station/FarmingStationBlockEntity.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java (2 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java (1 hunks)
  • enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java (1 hunks)
Files skipped from review due to trivial changes (3)
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/farming_station/FarmingStationBlockEntity.java
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java
  • enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java
🚧 Files skipped from review as they are similar to previous changes (5)
  • enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java
  • enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java
  • enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java
Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: verify
**Actionable comments posted: 0** <details> <summary>♻️ Duplicate comments (2)</summary><blockquote> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (2)</summary><blockquote> `57-64`: **Initialise the bounds in the constructor** The `bounds` field is marked `@Nullable` but should be initialised in the constructor rather than being checked for null later, to ensure it's always available after object creation. ```diff private @Nullable AABB bounds; public WirelessChargerBlockEntity(BlockPos worldPosition, BlockState blockState) { super(MachineBlockEntities.WIRELESS_CHARGER.get(), worldPosition, blockState, true, CapacitorSupport.REQUIRED, EnergyIOMode.Input, CAPACITY, USAGE); actionRange = new ActionRange(MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get(), false); energyUpkeep = MachinesConfig.COMMON.ENERGY.WIRELESS_CHARGER_UPKEEP; + updateBounds(); } ``` --- `198-210`: **Add error handling for RangeExtender data retrieval** The data map retrieval doesn't have proper error handling if the getBlockHolder or getData operations fail. Consider adding more robust error handling. ```diff private int getRangeExtension() { int rangeExtension = 0; if (level != null) { BlockState bs = level.getBlockState(getBlockPos().above()); if (bs.is(MachineTags.Blocks.RANGE_EXTENDER)) { - Map<TagKey<Block>, Integer> map = bs.getBlockHolder().getData(RangeExtender.DATA_MAP); - if (map != null) { - rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0); + try { + var holder = bs.getBlockHolder(); + if (holder != null) { + Map<TagKey<Block>, Integer> map = holder.getData(RangeExtender.DATA_MAP); + if (map != null) { + rangeExtension = map.getOrDefault(MachineTags.Blocks.RANGE_EXTENDER, 0); + } + } + } catch (Exception e) { + // Log error or handle exception + rangeExtension = 0; } } } return rangeExtension; } ``` </blockquote></details> </blockquote></details> <details> <summary>🧹 Nitpick comments (3)</summary><blockquote> <details> <summary>enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java (3)</summary><blockquote> `121-128`: **Call super.clientTick() at the beginning of the method** It's a good practice to call the parent method first unless there's a specific reason to do otherwise. This ensures that the parent's setup code runs before any child-specific logic. ```diff @Override public void clientTick() { + super.clientTick(); if (level instanceof ClientLevel clientLevel) { getActionRange().addClientParticle(clientLevel, getBlockPos(), MachinesConfig.CLIENT.BLOCKS.WIRELESS_CHARGER_RANGE_COLOR.get()); } - super.clientTick(); } ``` --- `182-187`: **Extract duplicate block update code** The code to send block updates is duplicated in both `calculateMaxRange()` and `setActionRange()` methods. Extract this to a helper method to reduce duplication and improve maintainability. ```diff +private void sendBlockUpdate() { + if (level != null) { + level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL); + } +} private void calculateMaxRange() { this.maxRange = MachinesConfig.COMMON.WIRELESS_CHARGER_RANGE.get() + getRangeExtension(); - if (level != null) { - level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL); - } + sendBlockUpdate(); } @Override @UseOnly(LogicalSide.SERVER) public void setActionRange(ActionRange actionRange) { this.actionRange = actionRange.clamp(0, getMaxRange()); updateBounds(); setChanged(); - if (level != null) { - level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), Block.UPDATE_ALL); - } + sendBlockUpdate(); } ``` Also applies to: 222-226 --- `79-97`: **Optimise player inventory iteration** The current implementation iterates through all players and all their inventory slots, which could be inefficient with many players. Consider optimising by limiting energy distributed per player or implementing a batched processing approach. ```diff int toDistribute = Math.min(energyStorage.getEnergyStored(), getMaxEnergyUse()); List<Player> players = level.getEntitiesOfClass(Player.class, bounds); +// Distribute energy fairly among players +int energyPerPlayer = players.isEmpty() ? 0 : toDistribute / players.size(); +if (energyPerPlayer > 0) { for (Player player : players) { + int playerEnergy = Math.min(energyPerPlayer, toDistribute); Inventory inventory = player.getInventory(); for (int i = 0; i < inventory.getContainerSize(); i++) { ItemStack stack = inventory.getItem(i); @Nullable IEnergyStorage cap = stack.getCapability(Capabilities.EnergyStorage.ITEM); if (cap != null && cap.canReceive()) { - int received = cap.receiveEnergy(toDistribute, false); + int received = cap.receiveEnergy(playerEnergy, false); energyStorage.consumeEnergy(received); toDistribute -= received; + playerEnergy -= received; if (toDistribute <= 0) { return; } + if (playerEnergy <= 0) { + break; + } } } } +} ``` </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 069a6fd5fcb7ee43b8d10a56de884de48cc8e914 and 493a911aaaa8bf5b45a7217568a572e49990327c. </details> <details> <summary>📒 Files selected for processing (9)</summary> * `enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/farming_station/FarmingStationBlockEntity.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java` (2 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerBlockEntity.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java` (1 hunks) * `enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java` (1 hunks) </details> <details> <summary>✅ Files skipped from review due to trivial changes (3)</summary> * enderio-machines/src/main/java/com/enderio/machines/common/blocks/farming_station/FarmingStationBlockEntity.java * enderio-machines/src/main/java/com/enderio/machines/common/blocks/drain/DrainBlockEntity.java * enderio-machines/src/main/java/com/enderio/machines/common/attachment/ActionRange.java </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (5)</summary> * enderio-machines/src/main/java/com/enderio/machines/common/init/MachineAttachments.java * enderio-machines/src/main/java/com/enderio/machines/common/blocks/obelisks/ObeliskBlockEntity.java * enderio-machines/src/main/java/com/enderio/machines/common/blocks/vacuum/VacuumMachineBlockEntity.java * enderio-machines/src/main/java/com/enderio/machines/common/blocks/wireless_charger/WirelessChargerMenu.java * enderio-machines/src/main/java/com/enderio/machines/client/gui/screen/WirelessChargerScreen.java </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary> * GitHub Check: verify </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Rover656 (Migrated from github.com) approved these changes 2025-05-06 20:06:40 +00:00
Rover656 (Migrated from github.com) left a comment

This looks good to me, thanks Ferri!

This looks good to me, thanks Ferri!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Team-EnderIO/EnderIO#1017
No description provided.