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 Stacking [Suggestion] #72

Open
nicholasveronico opened this issue Dec 26, 2022 · 1 comment
Open

Villager Trade Stacking [Suggestion] #72

nicholasveronico opened this issue Dec 26, 2022 · 1 comment

Comments

@nicholasveronico
Copy link

One of the worst entities to have an abundance of loaded with many players online is villagers. A large number of villagers loaded is normally caused by many loaded villager trading halls. Stacking villagers usually cannot fix this, as trades of individual villagers must be present. My proposed solution is villager trade stacking. The following explanation assumes that all of this is possible code-wise. If there's something that cannot be done, please let me know.

Option 1. Stacking Villagers and their trades based on the profession
This option accounts for the texture of the villager being different due to different professions. If the villagers are stacked based on their profession, the texture of the villager is not a problem.

The idea is to stack villagers, and their trades will be added to the bottom of the list of the trades of the villager stack. For example, if Villager 1 has the following trades: 7 emeralds --> iron leggings, lava bucket -->1 emerald and villager 2 has the following trades: 5 emeralds --> bell, 1 diamond --> 1 emerald, stacking villager 2 with villager 1 will make the stack's trade menu be the following:

  • 7 emeralds --> iron leggings
  • lava bucket -->1 emerald
  • 5 emeralds --> bell
  • 1 diamond --> 1 emerald

Unstacking the villagers will assign the corresponding trades to the unstacked villagers. The problematic aspect of this is how to handle villager curing (for discounts.)

To cure a villager, you must do the following:

  1. Turn the villager into a zombie villager by having a zombie kill the villager
  2. If the villager turns into a zombie villager, splash a weakness potion on the zombie villager and feed it a golden apple

Once the zombie villager turns back into a villager, the villager will give you discounts on the same trades it offered prior to zombification (if the trades have been locked in, i.e., the player has traded with the villager once.) My thought was if a zombie "kills" a villager from the stack, it will remove the bottom-most villager's trades from the stack GUI, and it will spawn a zombie villager (saving the trades of the villager that just died in this zombie villager.) Once the zombie villager turns back into a villager, it will queue that villager to be restacked, and their discounted trades will be added to the bottom of the villager stack.

Option 2. Stacking Villagers and their trades all in the same villager
This option functions the same as the above, but the only issue I would see here is there being a problem with what texture the villager would have. Perhaps, it could have the texture of the villager on top of the stack, but that might be confusing to players. However, I would recommend disallowing the stacking of villagers with no profession if this option is enabled.

Please let me know what you think.

@PukPukov
Copy link

Or just lobotomize-villagers in purpur.yml

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

No branches or pull requests

2 participants