Skip to content

Conversation

@dphaldes
Copy link
Contributor

@dphaldes dphaldes commented Jan 29, 2026

Invert the check for block Teleports.
I have also added comments for future work/todos

Summary by CodeRabbit

  • Bug Fixes

    • Fixed teleportation block detection logic to function correctly.
  • New Features

    • Enhanced energy resource management for travel mechanics, enabling improved tracking and consumption of resources during teleportation activities.

✏️ Tip: You can customize this high-level summary in your review settings.

@dphaldes dphaldes added P-0-High High priority, crash/breaking. MC-1.21.1 labels Jan 29, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 29, 2026

Walkthrough

Logic inverted for block teleportation checks in TravelHandler: the canBlockTeleport() method now returns true when encountering BLOCKS_TELEPORTATION blocks. Two public helper methods added for resource management: hasResources() and consumeResources() to handle Travelling Staff energy operations.

Changes

Cohort / File(s) Summary
Travel Handler Updates
enderio/src/main/java/com/enderio/enderio/content/travel/TravelHandler.java
Inverted block teleportation logic; added hasResources(ItemStack) and consumeResources(ItemStack) public methods for energy-based resource handling. Includes minor NOTE/FIXME comments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A traveller's staff now checks its might,
Resources counted, energy bright,
Blocks that once blocked now let us through,
Helper methods—fresh and new!
hops excitedly

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is incomplete. It lacks the required sections from the template: detailed summary explaining design choices, things to test, breaking changes section, and checklist verification. Expand the description to include the required template sections: detailed explanation of the change, test scenarios, breaking changes assessment, and completion of the checklist items.
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix block teleports' is specific and directly related to the main change of inverting the block teleportation logic in TravelHandler.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@Rover656 Rover656 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix!

@Rover656 Rover656 merged commit cca556a into Team-EnderIO:1.21.1 Jan 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MC-1.21.1 P-0-High High priority, crash/breaking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants