Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the support of fishing in MCmmo server #24

Open
wants to merge 6 commits into
base: fabric
Choose a base branch
from

Conversation

WhitrayHB
Copy link

Add the support of fishing in MCmmo server(Autoturn)
Add rough simplified Chinese translation

WhitrayHB and others added 4 commits May 24, 2022 18:46
Add the support of MCmmo server
Add simplified Chinese translation
@Tuaniwan
Copy link

This is amazing, I would love this PR to get approved.

@7coil
Copy link
Contributor

7coil commented Jun 7, 2022

It's probably not a good idea to have server-specific comments/messages within the code, by just keeping it generic.

Furthermore, I'm not sure what this is trying to evade; is this just automatically rotating you so you don't get AFK banned?

@Expose String clearLagRegex = "\\[ClearLag\\] Removed [0-9]+ Entities!";
@Expose String autoturningRegex = "(.*)sense(.*)|(.*)过度捕捞(.*)";
Copy link
Contributor

Choose a reason for hiding this comment

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

A bit strange to have a regular expression in Chinese

Copy link
Author

Choose a reason for hiding this comment

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

This is just a test beacuse I'm a Chinese player. It can be removed or replaced.

Choose a reason for hiding this comment

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

If It's in MCMMO we should be able to find the English. Indeed, mcMMO-Dev/mcMMO#3829 gives the text!

"options.autofish.advanced.title": "Advanced Options",

"options.autofish.useautoturning": "Enable Autoturning",
"options.autofish.useautoturning.tooltip_0": "To fish in an MCmmo server,",
Copy link
Contributor

Choose a reason for hiding this comment

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

And probably should not point out specific servers within the mod; keeping it generic would be nice.

Copy link
Author

Choose a reason for hiding this comment

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

I made this specially for Mcmmo servers or other servers which added "overfishing". So I think it's reasonable

Copy link
Contributor

Choose a reason for hiding this comment

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

Although it may be made for a specific server, it may be better justified to not name the server because it may be applicable to multiple servers; better defining the description of what this feature does can aid the player into understanding how and when to enable the function, instead of making server specific features.

(But that's just my opinion, I'm just the person who annoys the developer with version updates every time a new version of Minecraft comes out)

Copy link
Author

Choose a reason for hiding this comment

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

However, it's just description that can be changed easily so maybe I will edit it later

Copy link
Contributor

Choose a reason for hiding this comment

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

Other than some clean-up, it sounds like a feature that is appreciated...

I'm just wondering if it could be extended to move the player in the X/Z direction to further evade checks (but at that point, you're making a macro library)

Copy link
Author

Choose a reason for hiding this comment

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

Thanks! But I haven't see any server will check the X/Z direction when fishing. Players will swing hand when catching the fish so they won't be detected as AFK.

Copy link

@XCRailFans XCRailFans Sep 4, 2022

Choose a reason for hiding this comment

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

Try:

Suggested change
"options.autofish.useautoturning.tooltip_0": "To fish in an MCmmo server,",
"options.autofish.useautoturning.tooltip_0": "Some servers (e.g. the MCmmo mod) detect autofishing by requiring head movement.",

@WhitrayHB
Copy link
Author

WhitrayHB commented Jun 8, 2022

Because MCmmo add “overfishing”, you cannot just fishing in an area for a long time. When the fishing limit is reached, server will sent you an message. So I use this to rotate player to another direction so that once you made a big enough pool you can AFK for a long time. I've tested it and it works well :)

@7coil
As I'm a Chinese-speaker, I don't understand the first line of your comment very well. I guess you mean that we shouldn't use the message from server to control it but I think my guess is wrong.If you could give me an clearer explanation, that will be great. Thanks!

@Tuaniwan
Copy link

I would recommend removing mcmmo mentions. This is more of a rotation feature to prevent fishing in the same spot.

@WhitrayHB many players will fish in a boat in minecraft. I do not think that the rotation feature you have developped takes boats into consideration. When I tested the code on a boat and it rotates, I get stuck in the same position and can no longer rotate because boats do not support 360 degree rotation.

@WhitrayHB
Copy link
Author

WhitrayHB commented Jun 23, 2022

I truly didn't think about fishing in a boat. I will make an extra commit to support it, resolve the conflicts and get rid of the mcmmo contexts soon.

@WhitrayHB
Copy link
Author

I noticed that the mod has update to 1.19, but there aren't many mods in 1.19, so I will support 1.19 at a later time. I will make an 1.18 release on my fork instead.

Update zh_cn.json from origin
Add config for boatfishing
*/
}
if( angle < -180 || angle > 180) modAutofish.getConfig().setAutoturnAngle(90);
if( yaw + angle > 180) client.player.setYaw(yaw + angle - 360);
Copy link

@XCRailFans XCRailFans Sep 4, 2022

Choose a reason for hiding this comment

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

Can't we write it just once for brevity, like,

float newYaw = yaw + angle;
client.player.setYaw(newYaw > 180 ? newYaw - 360 :
                     newYaw < -180 ? newYaw + 360 :
                     newYaw);

Copy link

@XCRailFans XCRailFans Sep 4, 2022

Choose a reason for hiding this comment

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

So it seems to turn all the way horizontally in a fixed direction, so I guess you still need to be surrounded by water? This is nicely stateless, but a bit annoying...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants