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

villager trade() improvement request #3361

Open
Hiradpi opened this issue Apr 26, 2024 · 0 comments
Open

villager trade() improvement request #3361

Hiradpi opened this issue Apr 26, 2024 · 0 comments
Labels
new feature Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f

Comments

@Hiradpi
Copy link

Hiradpi commented Apr 26, 2024

Is your feature request related to a problem?

This issue is related to the villager trade() function and putSelectedItemRange()

Describe the solution you'd like

work on it and try to make it better

Describe alternatives you've considered

Additional context

Server villagers and trade automation issues

This server uses villagers with infinite trades instead of shops. Unfortunately, the deposit() and putRequirements() functions don't support loops. This creates problems when my bot's inventory is full of carrots.

Looping these functions requires manually setting trade quantities instead of automatic retrieval. For example, if the bot has 8 extra carrots and the carrot price is 10, using these functions with a loop can crash .

Additionally, the transfer() function, which calls putSelectedItemRange, can glitch randomly. insted of joining the items together it just tosses them

Main Issue:

When trading with a villager example: (10 carrots for 4 emeralds) and the bot has 60 carrots, the script in villager.js on line 160 needs to run 6 times (count argument) trading 10 carrots each. However, sending too many trade packets quickly can lead to a kick on strict servers. and somehow when used in loops it can cause crashes and desyncs
and please insted of getting the item from the trade's inputItem1 add an argument to the trade() that gets the item (the whole slot item value for example, (bot.inventory.items[9] ) )

please consider improving this function ❤️

@Hiradpi Hiradpi added new feature Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

1 participant