mrkinau / fishingbot Goto Github PK
View Code? Open in Web Editor NEW1.8 - 1.20.6 Fishing bot for Minecraft
License: GNU General Public License v3.0
1.8 - 1.20.6 Fishing bot for Minecraft
License: GNU General Public License v3.0
Hi, can you give me a little guide to connect this bot to "realms" server?
I want only starts fishing, wiout reconnects and other thigs.. if i use # can i "suprime" the "ip config" "name account config" and other things are useless for me?
Thanks a lots !!
Bets regards and nice proyect mates!
I'm constantly getting these errors:
What's causing these errors? The server is not shutting down, all other clients are unaffected.
Edit: New issue arose, this is the output:
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/util/Pair
at systems.kinau.fishingbot.network.protocol.play.PacketInEntityMetadata.readNBT(PacketInEntityMetadata.java:512)
at systems.kinau.fishingbot.network.protocol.play.PacketInEntityMetadata.readWatchableObjects_1_14(PacketInEntityMetadata.java:131)
at systems.kinau.fishingbot.network.protocol.play.PacketInEntityMetadata.defaultLoop(PacketInEntityMetadata.java:89)
at systems.kinau.fishingbot.network.protocol.play.PacketInEntityMetadata.read(PacketInEntityMetadata.java:48)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readPacket(NetworkHandler.java:411)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readUncompressed(NetworkHandler.java:362)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:337)
at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:142)
at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:104)
at systems.kinau.fishingbot.Main.main(Main.java:12)
Caused by: java.lang.ClassNotFoundException: javafx.util.Pair
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 10 more
My guess is that the game sees something that it can't detect, or understand, so it quits. That's my BEST guess though, please help LOL :)
Would be nice if it had an auto-reconnect feature that reconnects every time it gets kicked (server restarts).
I was planning to run this script on a lightsail instance. What specs it would run on?
What information can I provide you for troubleshooting?
I'm on Ubunut 18.04. and MC java v. 1.15.2. I'm getting this:
[2020-04-18 19:26:16] [SEVERE ] Could not start bot: Connection refused (Connection refused)
[2020-04-18 19:26:16] [INFO ] FishingBot restarts in 3 seconds...
I've been getting [WARNING] Bot is slow (maybe stuck). Trying to restart!
in the console for a while now, and I've been trying to figure out why it keeps happening. What I think is going on is that the server detects that a long while has passed without a fish being caught (because of the slow ping), and then recasts the fishing rod. The issue is that this basically kills the productivity of the bot once more than two people are on at the same time (yes, it's pretty bad). So, in case that feature works the way I think it does, is there a way to turn it off? If it works differently from how I think it works, how does it work?
On the server I'm on we have an agreement to kick the bot when other players want to sleep (ingame). This is supposed to work on the premise that the bot automatically reconnects 20 or so seconds after being kicked, but that isn't the case, as it just spews out a bunch of
[SEVERE ] Error while trying to send: PacketOutPosition
with the occasional
java.net.SocketException: Connection reset
instead of properly connecting (although that second one doesn't seem to be related to the actual problem. I did some testing, and it seems to actually manage to connect to the server, but the error messages just keep on coming instead of it actually starting to fish. It might be noteworthy that I'm running the bot on a Raspberry Pi 3.
Would be nice if it had an auto-reconnect feature that reconnects every time it gets kicked (server restarts).
This feature would allow you to run this in the background (maybe even on a Raspberry Pi), it would passively ping the server to check how many players are online, and if it fits into criteria below a certain amount of players, it will connect and do it's thing :)
settings example:
passive-mode=true
passive-player-treshold=3
(I'm on a slow server and think I'm only going to be using this while only few people are online to prevent causing lag)
pls do that you can do commands with the bots
When trying to sign into a forge server, this error presents itself.
java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at systems.kinau.fishingbot.network.protocol.Packet.readVarInt(Packet.java:108)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readUncompressed(NetworkHandler.java:425)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:419)
at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:210)
at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:143)
at systems.kinau.fishingbot.Main.main(Main.java:12)
[2020-04-05 12:09:44] [WARNING] Could not receive packet! Shutting down!
[2020-04-05 12:09:44] [INFO ] Module "ClientDefaultsModule" disabled!
[2020-04-05 12:09:44] [INFO ] Module "FishingModule" disabled!
[2020-04-05 12:09:44] [INFO ] FishingBot restarts in 3 seconds...
[2020-04-05 12:09:47] [INFO ] Module "FishingModule" enabled!
[2020-04-05 12:09:47] [INFO ] Module "HandshakeModule" enabled!
[2020-04-05 12:09:47] [INFO ] Module "LoginModule" enabled!
[2020-04-05 12:09:47] [INFO ] Module "ChatCommandModule" enabled!
[2020-04-05 12:09:47] [INFO ] Module "ClientDefaultsModule" enabled!
[2020-04-05 12:09:47] [SEVERE ] Login failed: {"text":"This server has mods that require Forge to be installed on the client. Contact your server admin for more details."}
[2020-04-05 12:09:47] [INFO ] Module "ClientDefaultsModule" disabled!
[2020-04-05 12:09:47] [INFO ] Module "FishingModule" disabled!
[2020-04-05 12:09:47] [INFO ] FishingBot restarts in 3 seconds...
Exception in thread "Thread-5" Exception in thread "Thread-3" java.lang.NullPointerException
at systems.kinau.fishingbot.FishingBot.lambda$connect$0(FishingBot.java:202)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at systems.kinau.fishingbot.FishingBot.lambda$connect$0(FishingBot.java:202)
at java.lang.Thread.run(Unknown Source)
https://wiki.vg/Minecraft_Forge_Handshake#Pre-1.13
https://github.com/PrismarineJS/node-minecraft-protocol-forge this is an offering for node-protocol (which doesn't support 1.15 grumble grumble).
I might take a look into implementing this, but we'll see
when i use 2 or 3 bot sometime they are sync data or something just 1 fishing and the others does not and they chat all the samething when the one fishing caught something.
Sorry for my bad english. Btw where can i see the tutorial about making minecraft bot like this
If the bot has a bad internet connection and the option stucking-fix-enabled is set to false, the bot doesn't even try to start fishing.
like title say just random direction cast rod for anti auto fishing
Just got a message in chat saying "FishingBot 2.4 - Caught "dirt"
I was just digging out some dirt in the area - guess it thought the entity from me digging was it's drop? Not sure if there is a workaround, but wanted to bring it into your attention :)
"If you could announce leveling up along with the current level both chat and console / discord that would be fantastic"
It would be much easier to allow the bot to empty it's inventory on command so the other player can just pick the items up. Empty its inventory as in pressing "ctrl" and "Q" on every inventory slot (except the fishing rod equipped).
Can you please add the transfer of attributes to the jar file it will be very useful.
For example, pass the file path with config or pass attributes without a file.
A setting that would toggle whether or not the bot sends any message to chat.
When running the jar downloaded via readme I get the following error.
Not a java developer, am I doing something wrong?
java -jar Fishingbot.jar
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/impl/io/TypeMismatchException
at systems.kinau.fishingbot.io.Config.init(Config.java:14)
at systems.kinau.fishingbot.io.SettingsConfig.<init>(SettingsConfig.java:60)
at systems.kinau.fishingbot.FishingBot.<init>(FishingBot.java:66)
at systems.kinau.fishingbot.Main.main(Main.java:11)
Caused by: java.lang.ClassNotFoundException: com.sun.corba.se.impl.io.TypeMismatchException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 4 more
Hello, can i use this bot in my singleplayer game with open lan?
im playing on a server we have to log in but i cant log in with bot
I filled in the Config.properties.
I changed the account-username and account-password to the informations of my minecraft account, changed the default protocol to 1.15 and the server ip to the ip of my server (its a minehut server).
I ran the fishinbot.jar trought the cmd, but the bot didn't seem to work.
Here is the log: log0.log
I probably just don't know how to properly set the bot up, but I tried changing everything i could in the Config.properties and i couldn't figure it out, so I'm seeking help
[2020-04-19 18:44:30] [INFO ] Module "ClientDefaultsModule" disabled!
[2020-04-19 18:44:30] [INFO ] Module "FishingModule" disabled!
[2020-04-19 18:44:30] [INFO ] FishingBot restarts in 3 seconds...
[2020-04-19 18:44:33] [INFO ] Module "FishingModule" enabled!
[2020-04-19 18:44:33] [INFO ] Module "HandshakeModule" enabled!
[2020-04-19 18:44:33] [INFO ] Module "LoginModule" enabled!
[2020-04-19 18:44:33] [INFO ] Module "ChatProxyModule" enabled!
[2020-04-19 18:44:33] [INFO ] Module "ChatCommandModule" enabled!
[2020-04-19 18:44:33] [INFO ] Module "ClientDefaultsModule" enabled!
[2020-04-19 18:44:34] [INFO ] Login successful!
[2020-04-19 18:44:34] [INFO ] Name: IOwenronal
[2020-04-19 18:44:34] [INFO ] UUID: 0b2caed5-f05f-4a64-8f96-3886eb973ee6
Exception in thread "Thread-11" java.lang.NullPointerException
at systems.kinau.fishingbot.network.protocol.play.PacketOutUseItem.write(PacketOutUseItem.java:28)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.sendPacket(NetworkHandler.java:371)
at systems.kinau.fishingbot.modules.FishingModule.lambda$onSetDifficulty$7(FishingModule.java:224)
at java.lang.Thread.run(Unknown Source)
systems.kinau.fishingbot.network.utils.InvalidPacketException: VarInt too big
at systems.kinau.fishingbot.network.protocol.Packet.readVarInt(Packet.java:112)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:409)
at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:210)
at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:143)
at systems.kinau.fishingbot.Main.main(Main.java:12)
[2020-04-19 18:44:35] [WARNING] Could not receive packet! Shutting down!
[2020-04-19 18:44:35] [INFO ] Module "ClientDefaultsModule" disabled!
[2020-04-19 18:44:35] [INFO ] Module "FishingModule" disabled!
[2020-04-19 18:44:35] [INFO ] FishingBot restarts in 3 seconds...
What am I doing wrong?
log0.log
When I run the program I get this error:
exception in thread "main" java.lang.ClassCastException: com.google.gson.JsonPrimitive cannot be cast to com.google.gson.JsonObject
at com.google.gson.JsonObject.getAsJsonObject (JsonObject.java:205)
at systems.kinau.fishingbot.network.ping.ServerPinger.ping (ServerPinger.java:80)
at systems.kinau.fishingbot.fishingbot.(Fighingbot.java:133)
at systems.kinau.fishingbot.Main.main(Main.java:13)
when the error happens it does not catch fish so im assuming its a easy fix on your end
[2019-11-13 19:55:42] [INFO ] Achieved level 36
[2019-11-13 19:55:46] [INFO ] Caught "RAW_FISH"
java.lang.IllegalStateException: Not a JSON Object: "?7"
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
at systems.kinau.fishingbot.network.protocol.play.PacketInChat.read(PacketInChat.java:37)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readPacket(NetworkHandler.java:446)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readUncompressed(NetworkHandler.java:396)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:371)
at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:218)
at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:144)
at systems.kinau.fishingbot.Main.main(Main.java:12)
java.lang.IllegalStateException: Not a JSON Object: "?e?lDonate"
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
at systems.kinau.fishingbot.network.protocol.play.PacketInChat.read(PacketInChat.java:37)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readPacket(NetworkHandler.java:446)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readUncompressed(NetworkHandler.java:396)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:371)
at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:218)
at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:144)
at systems.kinau.fishingbot.Main.main(Main.java:12)
java.lang.IllegalStateException: Not a JSON Object: "?7"
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
at systems.kinau.fishingbot.network.protocol.play.PacketInChat.read(PacketInChat.java:37)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readPacket(NetworkHandler.java:446)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readUncompressed(NetworkHandler.java:396)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:371)
at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:218)
at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:144)
at systems.kinau.fishingbot.Main.main(Main.java:12)
Is there any way to pass a specific config file to the bot? I've built a large fishing complex with thousand of chests and it's been lagging my computer like mad to run many instances of Minecraft. Thus, I need to be able to spawn the bot with a number of different configs.
I can't seem to find usage details about how to specify which config file to load, though.
I get the following error when trying to start the bot.
[2020-04-28 16:58:11] [INFO ] Module "ClientDefaultsModule" enabled!
[2020-04-28 16:58:12] [SEVERE ] Login failed: {"extra":[{"text":"Not authenticated with "},{"clickEvent":{"action":"open_url","value":"http://Minecraft.net"},"text":"Minecraft.net"},{"text":""}],"text":""}
[2020-04-28 16:58:12] [INFO ] Module "ClientDefaultsModule" disabled!
When i click to open the Fishing Bot java... it makes it seem as if something is loading.. due to the revolving circle next to the mouse.. but nothing happens
Can you make 1.15.1 version of the bot please.
wie nimmt man alle gefische items aus seinem inventar raus
can the player respawn using fishing bot
please do that they can put items they catch in chest and please make automine bots
I keep getting my IP tempbanned by Mojang's auth service from logging in to Minecraft. I've done a lot of work with Minecraft automation in the past and the solution is always the same: switch to using authentication tokens. I built a tool to help automate and manage this: https://github.com/sudofox/minecraft-alt-manager
Now, along with being able to simply pass an authentication token to the bot to avoid unnecessary re-auths (it tries to auth over and over again if it fails which quickly worsens the length of the auth ban), it would be excellent to have a full set of command line flags I can use to override the config file.
For example:
-c --config Path to config file (default: config.properties)
-u --username Account username or email
-p --password Account password
-t --token Auth token (overrides username/password)
-h --server-ip Server IP
-P --server-port Server Port
This way you can put all your preferred config stuff into your config file and override it with command-line flags.
It would be nice if this bot could throw away junk items from user-defined list (for example bowls, leather boots etc...) and keep only needed items (enchanted books, bows, etc)
I believe the issue is the server has a queue system that makes you wait about 5 - 10 seconds to be connected, i read in a another error that it might be fixable by disabling fishingrod check how could i do that?
[2019-11-11 10:04:58] [INFO ] fantasy.vanitymc.co
[2019-11-11 10:04:58] [INFO ] Module "FishingModule" enabled!
[2019-11-11 10:04:58] [INFO ] Module "HandshakeModule" enabled!
[2019-11-11 10:04:58] [INFO ] Module "LoginModule" enabled!
[2019-11-11 10:04:58] [INFO ] Module "ChatCommandModule" enabled!
[2019-11-11 10:04:58] [INFO ] Module "ClientDefaultsModule" enabled!
[2019-11-11 10:04:59] [SEVERE ] Error while trying to send: PacketOutPosition
[2019-11-11 10:05:00] [SEVERE ] Error while trying to send: PacketOutPosition
512
[2019-11-11 10:05:00] [INFO ] Login successful!
[2019-11-11 10:05:00] [INFO ] Name: FgtEric
[2019-11-11 10:05:00] [INFO ] UUID: d63e675a-d0d1-40fb-bd8e-fcb373f93b88
[2019-11-11 10:05:00] [SEVERE ] No fishing rod equipped. Retrying later!
[2019-11-11 10:05:00] [SEVERE ] No fishing rod equipped. Retrying later!
[2019-11-11 10:05:00] [SEVERE ] No fishing rod equipped. Retrying later!
[2019-11-11 10:05:01] [SEVERE ] Error while trying to send: PacketOutPosition
Exception in thread "Thread-13" com.github.kevinsawicki.http.HttpRequest$HttpRequestException: java.net.MalformedURLException: no protocol: true
at com.github.kevinsawicki.http.HttpRequest.(HttpRequest.java:1475)
at com.github.kevinsawicki.http.HttpRequest.post(HttpRequest.java:1044)
at com.mrpowergamerbr.temmiewebhook.TemmieWebhook$1.run(TemmieWebhook.java:24)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.MalformedURLException: no protocol: true
at java.net.URL.(Unknown Source)
at java.net.URL.(Unknown Source)
at java.net.URL.(Unknown Source)
at com.github.kevinsawicki.http.HttpRequest.(HttpRequest.java:1473)
... 3 more
[2019-11-11 10:05:01] [INFO ] Starting fishing!
java.lang.RuntimeException: VarInt too big
at systems.kinau.fishingbot.network.protocol.Packet.readVarInt(Packet.java:203)
at systems.kinau.fishingbot.network.protocol.NetworkHandler.readData(NetworkHandler.java:366)
at systems.kinau.fishingbot.FishingBot.connect(FishingBot.java:218)
at systems.kinau.fishingbot.FishingBot.start(FishingBot.java:144)
at systems.kinau.fishingbot.Main.main(Main.java:12)
[2019-11-11 10:05:02] [WARNING] Could not receive packet! Shutting down!
[2019-11-11 10:05:02] [INFO ] FishingBot restarts in 10 seconds...
[2019-11-11 10:05:02] [SEVERE ] Error while trying to send: PacketOutArmAnimation
[2019-11-11 10:05:02] [SEVERE ] Error while trying to send: PacketOutPosition
Exception in thread "Thread-10" java.lang.NullPointerException
at systems.kinau.fishingbot.FishingBot.lambda$connect$0(FishingBot.java:210)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-3" java.lang.NullPointerException
at systems.kinau.fishingbot.FishingBot.lambda$connect$0(FishingBot.java:210)
at java.lang.Thread.run(Unknown Source)
Hi, I was just wandering around looking for bots, and I was wondering if you would be able to add a function to fish for pixelmon. I know it's a forge mod, but I was just wondering if that would work. It goes off the system whereby it uses exclamation to indicate the catch and the amount of exclamation marks (1-3) indicates the level of catch. It drops important items, and the encountering of pokemon can be avoided with a fainted pokemon in the team. So I was just wondering if it would be possible? # #
When I disconnect, I have to login again
I want to add auto-command. . .
ex. auto-reconnect-command
it dont work on few servers like saicopvp.com and play.yourgames.co.il
Implementation:
In NetworkHandler.java:
getPlayRegistryIn().get(ProtocolConstants.MINECRAFT_1.15).registerPacket(0x49, PacketInSetHealth.class);//added, done
getPlayRegistryOut().get(ProtocolConstants.MINECRAFT_1.15).registerPacket(0x04, PacketOutRespawn.class); //added, done
Add this to the other @Getter @Setter
annotations in Player.java:
@Getter @Setter private int health;
@Getter @Setter private int food;
@Getter @Setter private int saturation;
Add this to the other events in Player.java:
@EventHandler
public void onUpdateHP(UpdateHealthEvent event) {
this.health = event.getHealth();
this.food = event.getSaturation();
if(this.health <= 0) {
double posX = FishingBot.getInstance().getPlayer().x;
double posY = FishingBot.getInstance().getPlayer().y;
double posZ = FishingBot.getInstance().getPlayer().z;
posX = Math.round(posX);
posY = Math.round(posY);
posZ = Math.round(posZ);
FishingBot.getLog().info("DIED! Respawning ... (Position: " + posX + " " + posY + " " + posZ + ")");
if(!FishingBot.getInstance().getConfig().getDeathMessage().equalsIgnoreCase("false")) {
String deathMessage = FishingBot.getInstance().getConfig().getDeathMessage();
deathMessage = deathMessage.replace("{X}", String.valueOf(posX));
deathMessage = deathMessage.replace("{Y}", String.valueOf(posY));
deathMessage = deathMessage.replace("{Z}", String.valueOf(posZ));
FishingBot.getInstance().getNet().sendPacket(new PacketOutChat(deathMessage));
}
if(FishingBot.getInstance().getConfig().isAutoRespawnEnabled()) {
FishingBot.getInstance().getNet().sendPacket(new PacketOutRespawn());
}
}
FishingBot.getLog().info("Health: " + this.health);
FishingBot.getLog().info("Food Level: " + this.food);
FishingBot.getLog().info("Saturation Level: " + this.saturation);
}
Create the class PacketInSetHealth in systems.kinau.fishingbot.network.protocol.play with the following code:
/*
* Credits to MrKinau for the code base.
* I've just stolen half the class lol.
*/
package systems.kinau.fishingbot.network.protocol.play;
import com.google.common.io.ByteArrayDataOutput;
import lombok.Getter;
import systems.kinau.fishingbot.FishingBot;
import systems.kinau.fishingbot.event.play.UpdateHealthEvent;
import systems.kinau.fishingbot.network.protocol.NetworkHandler;
import systems.kinau.fishingbot.network.protocol.Packet;
import systems.kinau.fishingbot.network.utils.ByteArrayDataInputWrapper;
public class PacketInSetHealth extends Packet {
@Getter private int food;
@Getter private int saturation;
@Getter private int health;
@Override
public void write(ByteArrayDataOutput out, int protocolId) {
//Only incoming packet
}
@Override
public void read(ByteArrayDataInputWrapper in, NetworkHandler networkHandler, int length, int protocolId) {
health = (int)in.readFloat();
food = Packet.readVarInt(in);
saturation = (int)in.readFloat();
FishingBot.getLog().info("Health: " + health);
FishingBot.getLog().info("Food: " + food);
FishingBot.getLog().info("Saturation: " + saturation);
FishingBot.getInstance().getEventManager().callEvent(new UpdateHealthEvent(health, food, saturation));
}
}
Create the class PacketOutRespawn in systems.kinau.fishingbot.network.protocol.play with the following code: (you probably have to use the switch (protocolId)
for versions with other packet stuff)
package systems.kinau.fishingbot.network.protocol.play;
import com.google.common.io.ByteArrayDataOutput;
import systems.kinau.fishingbot.network.protocol.NetworkHandler;
import systems.kinau.fishingbot.network.protocol.Packet;
import systems.kinau.fishingbot.network.utils.ByteArrayDataInputWrapper;
public class PacketOutRespawn extends Packet {
@Override
public void write(ByteArrayDataOutput out, int protocolId) {
Packet.writeVarInt(0, out);
}
@Override
public void read(ByteArrayDataInputWrapper in, NetworkHandler networkHandler, int length, int protocolId) {
//nothing.
}
}
In SettingsConfig.java insert this to the other @properties annotations:
@Property(key = "auto-respawn") private boolean AutoRespawnEnabled = true;
@Property(key = "death-msg") private String DeathMessage = "I died at X: {X}, Y: {Y}, Z: {Z}!";
Create the class UpdateHealthEvent in systems.kinau.fishingbot.event.play with this code:
package systems.kinau.fishingbot.event.play;
import lombok.AllArgsConstructor;
import lombok.Getter;
import systems.kinau.fishingbot.event.Event;
@AllArgsConstructor
public class UpdateHealthEvent extends Event {
@Getter private int health;
@Getter private int food;
@Getter private int saturation;
}
I hope you can use my code and/or improve it! Do whatever you want with it!
Note: You will have to add some imports in the modified files. (Also the code is a bit buggy, but I hope you can still use it)
I've been having an odd issue where sometimes a mending rod will break (maybe the bot gets stuck or something.) However tossing it another fishing rod doesn't seem to make it autoselect the rod unless the currently selected hotbar slot happens to be the one with the rod in it, which can only be changed as an actual player.
Would be great if it could automatically pull rods from the inventory in certain conditions, such as if it fishes or picks up a better rod than the one it's currently using.
Here is a mod with a reference implementation of the "select better rod" functionality: AutoFish
can you update to 1.15.2 please
When I try to start the bot, I get this error message: (both with the one I compiled and with the latest release)
Authentication failed with code 403 from https://authserver.mojang.com/authenticate: HTTP/1.1 403 Forbidden
If I wait 10 minutes, it usually works again. Is this an error from the bot or is it only the Minecraft Authentication server? (sorry for wasting ur time, im just dumb)
If possible could you add a feature where if will move left or right every 2-3 minutes, the servers i play on all have some sort of anti afk fishing plugins and so they prevent fishing from the same spot every like 3 minutes or so
Hi,
Thanks for your fishing bot. I wonder how to use it on a realm server
I can't import the source code in IntelliJ IDEA and almost every class is full of errors such as:
Cannot resolve method 'getInstance' in FishingBot
Cannot resolve method 'getConfig' in FishingBot
and so on, but compiling and running works fine. Also it show this warning while compiling etc:
Some problems were encountered while building the effective model for systems.kinau:FishingBot:jar:1.0-SNAPSHOT
'dependencies.dependency.version' for com.flowpowered:flow-nbt:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 64, column 22
It is highly recommended to fix these problems because they threaten the stability of your build.
For this reason, future Maven versions might no longer support building such malformed projects.
I really do not know what I did wrong, this is the first time I used Maven. It would be really nice if someone could help me. (Also sorry for my bad english, I am from Germany)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.