Giter VIP home page Giter VIP logo

Comments (7)

Tonnanto avatar Tonnanto commented on May 25, 2024 1

Thanks for letting me know. I will try to consider this in the next update :)

from basicquests.

Tonnanto avatar Tonnanto commented on May 25, 2024

This turned out much trickier than expected.
I was not yet able to change this unfortunately :(

Will have a look at it again in the future.
This is the relevant part in the code. I'm open for any suggestions on how to detect the amount of trades that happened when a MOVE_TO_OTHER_INVENTORY action (shift-click) happened.

from basicquests.

GamingHQ avatar GamingHQ commented on May 25, 2024

This turned out much trickier than expected. I was not yet able to change this unfortunately :(

Will have a look at it again in the future. This is the relevant part in the code. I'm open for any suggestions on how to detect the amount of trades that happened when a MOVE_TO_OTHER_INVENTORY action (shift-click) happened.

Would it not be possible to search for the trader hook itself and count from there?

If the user sells an item, Once sold, it counts. If the user uses shift and sell, it will still be counting in the end as your looking at the sold hook of the trader and not at what the user has in his inventory.

Just wild thinking here. I'm new in the Minecraft world, but I do have a bit of coding knowledge.

from basicquests.

Tonnanto avatar Tonnanto commented on May 25, 2024

Thanks for your comment @GamingHQ !

Sounds interesting. I'm not entirely sure what you mean by trader hook.
Do you maybe have a documentation reference for me?

from basicquests.

GamingHQ avatar GamingHQ commented on May 25, 2024

i'm afraid i dont have such documentation. The thing is when it comes on hooks, we use them for modding on rust for example. Hooks like "canentitytakedamage" or "OnGrowableGather" ( see Rust oxide API here of what I'm mentioning https://umod.org/documentation/games/rust#ongrowablegather )

i bet that there is a way to define the hook that we need to use for it. Something like "OnItemSold" is something to look after if there would be a such way of modding. I mean, all i have used is a few bukkit plugins and that's about it. I do have heard that modding on Minecraft can be a bit tricky, so if my thoughts are fully non-valid as it's impossible to mod or code that way in Minecraft, my apologies ofc!

from basicquests.

GamingHQ avatar GamingHQ commented on May 25, 2024

i actually just found something to look deeper into. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/WanderingTrader.html

You could listen to this hook and determine if an item would be sold.

from basicquests.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.