Skip to content

feat: add config option to simulate vanilla detached fishing-hook portal behavior#171

Open
BaconCat1 wants to merge 26 commits intoCraftCanvasMC:ver/1.21.11from
BaconCat1:feat/fishing-rod-stasis
Open

feat: add config option to simulate vanilla detached fishing-hook portal behavior#171
BaconCat1 wants to merge 26 commits intoCraftCanvasMC:ver/1.21.11from
BaconCat1:feat/fishing-rod-stasis

Conversation

@BaconCat1
Copy link
Copy Markdown
Contributor

Adds a configurable option to simulate vanilla's detached fishing hook behavior during movement through portals. This behavior is relied upon by certain wireless redstone and technical setups but is normally broken by region threading.

When enabled, fishing hooks can temporarily remain in a detached state while their owner or target exists on another region thread or dimension, closely reproducing vanilla behavior.

This is disabled by default and intended only for servers that explicitly want to emulate the vanilla bug.

This change does not alter default gameplay behavior.
Instead, it introduces an optional compatibility mode that recreates a vanilla bug/quirk used in some redstone contraptions and technical mechanics.

Has been production tested without issue.

@BaconCat1 BaconCat1 closed this Mar 9, 2026
@BaconCat1 BaconCat1 reopened this Mar 9, 2026
Copy link
Copy Markdown
Member

@Dueris Dueris left a comment

Choose a reason for hiding this comment

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

I am currently unsure about this, how closely does this match the Vanilla mechanic?

Also, is this something that can be simplified? I don't entirely mind it being a tad complex, however I am curious if it is simplify-able.

@Dueris Dueris requested review from a team, Dueris and MrMasrozYTLIVE and removed request for a team March 10, 2026 20:27
@BaconCat1
Copy link
Copy Markdown
Contributor Author

I am currently unsure about this, how closely does this match the Vanilla mechanic?

Also, is this something that can be simplified? I don't entirely mind it being a tad complex, however I am curious if it is simplify-able.

It seems to match the vanilla behavior for all practical purposes afaik. I will look through again to see if I left anything redundant, but as the current approach is simulating quite complex behavior of a bug, I'm not sure it can be simplified much.

Copy link
Copy Markdown
Contributor

@MrMasrozYTLIVE MrMasrozYTLIVE left a comment

Choose a reason for hiding this comment

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

Overall lgtm

@Dueris
Copy link
Copy Markdown
Member

Dueris commented Mar 15, 2026

Can this be made into a base patch? Id rather it be in that, since it is a lot of changes for a bug that Mojang could just fix anytime.

@Toffikk Toffikk added the enhancement New feature or request label Mar 19, 2026
@BaconCat1 BaconCat1 force-pushed the feat/fishing-rod-stasis branch from 2aad920 to cc57375 Compare March 20, 2026 00:37
Copilot AI review requested due to automatic review settings March 21, 2026 19:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an opt-in compatibility mode to emulate vanilla’s “detached fishing hook across portals” quirk in a region-threaded environment, intended for technical/wireless-redstone setups that rely on this behavior.

Changes:

  • Introduces combat.restoreDetachedFishingHookPortalBug config toggle (default: off).
  • Patches Player/FishingHook to preserve and later “realize” hooks during cross-dimension / cross-region-thread transitions.
  • Adjusts fishing-rod retrieval to schedule retrieval on the hook’s region thread when needed.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
canvas-server/src/main/java/io/canvasmc/canvas/Config.java Adds the new combat config option and its admin-facing description.
canvas-server/minecraft-patches/base/0013-Restore-detached-fishing-hook-portal-bug.patch Core implementation: hook detach/realize state handling, portal-transfer marking, and rod retrieval scheduling.
canvas-server/minecraft-patches/sources/net/minecraft/world/entity/projectile/FishingHook.java.patch Adjusts patch hunks/offsets around existing fishing hook behavior.
canvas-server/minecraft-patches/sources/net/minecraft/world/entity/player/Player.java.patch Adjusts patch hunks/offsets around player logic to align with the new base patch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread canvas-server/src/main/java/io/canvasmc/canvas/Config.java
BaconCat1 and others added 4 commits March 23, 2026 11:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… chunk loaders, and make owner restoration/reel-in handling safer across portal transitions and region-thread boundaries.
@@ -1,5 +1,6 @@
package net.minecraft.world.item;

+import net.minecraft.server.level.ServerPlayer;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops, wasn't thinking when I added this. Will fix.

@BaconCat1
Copy link
Copy Markdown
Contributor Author

BaconCat1 commented Mar 23, 2026

Not ready to merge this, needs more testing.

Done testing this, but needs a few polishing changes

@R00tB33rMan R00tB33rMan marked this pull request as draft March 23, 2026 19:32
@BaconCat1 BaconCat1 marked this pull request as ready for review March 25, 2026 21:15
@BaconCat1 BaconCat1 marked this pull request as draft March 25, 2026 21:20
@BaconCat1 BaconCat1 closed this Mar 25, 2026
@BaconCat1 BaconCat1 reopened this Mar 25, 2026
@BaconCat1 BaconCat1 marked this pull request as ready for review March 25, 2026 23:08
@BaconCat1
Copy link
Copy Markdown
Contributor Author

BaconCat1 commented Mar 25, 2026

Fixed weird issues with patches, has been tested as well.

Still wait a bit on merging this because I need to verify smth.

…od-stasis

# Conflicts:
#	canvas-server/minecraft-patches/sources/net/minecraft/server/level/ServerPlayer.java.patch
@Dueris
Copy link
Copy Markdown
Member

Dueris commented Mar 28, 2026

Still wait a bit on merging this because I need to verify smth.

Have you verified what u wanted to verify yet?

Copy link
Copy Markdown
Member

@R00tB33rMan R00tB33rMan left a comment

Choose a reason for hiding this comment

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

I'm not seeing any obvious issues with this. This is probably good to merge, assuming @BaconCat1 is also confident

@BaconCat1
Copy link
Copy Markdown
Contributor Author

I'm not seeing any obvious issues with this. This is probably good to merge, assuming @BaconCat1 is also confident

I haven't found any issues so far. While the patches do apply im not sure on the format. It seems a little strange to me. That being said i'm also unsure how to fix that so.... maybe it's fine ig

@Dueris
Copy link
Copy Markdown
Member

Dueris commented Apr 11, 2026

If u could fix the conflicts I can go in and cleanup the diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants