Open nicolio03 opened 4 months ago
It's just a warning. It is safe to ignore. The problem is in mineflayer-pvp not mineflayer. Here is a patch file if the warning is really that annoying: mineflayer-pvp+1.3.2.patch
diff --git a/node_modules/mineflayer-pvp/lib/PVP.js b/node_modules/mineflayer-pvp/lib/PVP.js
index 758c2b3..7c7220e 100644
--- a/node_modules/mineflayer-pvp/lib/PVP.js
+++ b/node_modules/mineflayer-pvp/lib/PVP.js
@@ -48,7 +48,7 @@ class PVP {
this.meleeAttackRate = new TimingSolver_1.MaxDamageOffset();
this.bot = bot;
this.movements = new mineflayer_pathfinder_1.Movements(bot, require('minecraft-data')(bot.version));
- this.bot.on('physicTick', () => this.update());
+ this.bot.on('physicsTick', () => this.update());
this.bot.on('entityGone', e => { if (e === this.target)
this.stop(); });
}
Though I don't know how to use javascript with python.
Detailed description of a problem
I am having trouble loading the code I have written due to an error saying : [JSE] Mineflayer detected that you are using a deprecated event (physicTick)! Please use this event (physicsTick) instead. I am using python so this might be the issue but I am fairly new to programing so I have no clue on how to begin troubleshooting farther than the code I write.
Your current code
''' from javascript import require, On, Once from threading import Thread from time import sleep
mineflayer = require('mineflayer') pathfinder = require('mineflayer-pathfinder') pvp = require('mineflayer-pvp').plugin Entity = require("prismarine-entity")('1.8.9') global movements
def main():
if name == 'main': main() '''
Expected behavior
I am simply trying to get a bot to fight the closest entity.