MCCTeam / Minecraft-Console-Client

Lightweight console for Minecraft chat and automated scripts
https://mccteam.github.io
Other
1.61k stars 390 forks source link

[Idea] Add more detection methods for AutoFishing. #2590

Open Cassy-Lee opened 11 months ago

Cassy-Lee commented 11 months ago

Prerequisites

Console Client Version

Latest

Describe your problem

I'm using AutoFishing in a small pool and some iron bars are placed to make sure the fishing bobber fell into the center of the pool so that I can get treasure from it. But AutoFishing doesn't work because the fishing bobber stop moving in X and Z axis when it hit the iron bars.

Suggest a possible solution

Enable sound or velocity change detection for AutoFishing as a fabric mod "autofish"(https://github.com/MrTroot/autofish). The autofish mod use EntityVelocityUpdateS2CPacket and PlaySoundS2CPacket to detect the fish(https://github.com/MrTroot/autofish/blob/fabric/src/main/java/troy/autofish/mixin/MixinClientPlayNetworkHandler.java).

Attach screenshot here (If applicable)

No response

Minecraft Version

1.18.2

Device

Desktop

Operating System

Windows

Cassy-Lee commented 11 months ago

There are some codes about motion detect at https://github.com/MrTroot/autofish/blob/fabric/src/main/java/troy/autofish/monitor/FishMonitorMPMotion.java and sound detect at https://github.com/MrTroot/autofish/blob/fabric/src/main/java/troy/autofish/monitor/FishMonitorMPSound.java

Cassy-Lee commented 11 months ago

If use motion detection, autofish start catching fish 1 second after the fishing bobber touches water. If use sound detection, autofish catch fish only if the sound happens within 5 blocks around the fishing bobber.

milutinke commented 8 months ago

The sound method I think we could implement, as for the FishMonitorMPMotion.java, the MCC does not handle collision and physics yet, so we can't add that one. I'll look into it after 1.20.4 update