Topic category: Help with modding (Java Edition)
I have spent hours poring over examples, documentation and forum posts looking for someone who created something similar to this and have had no luck. I do not know if this is because it is not doable in MCreator or maybe just because it is such a stupid idea!
Anyways, what I want to write is a mod that allows the player to keep track of all the resources they have been selling so they can use this mod to say "Wow! I have made over 200 diamonds this week off of my slime farm" or "I need to raise the prices of my Sea Lanterns because I am almost out of them and only made 40 emeralds" etc. etc.
The mod would have the following features:
1. Ability to assign prices for various units of items
2. Ability to record every sale made by item and purchaser
3. Ability to access remote hosted MySQL database for reporting and transaction storage
I am seeing that the place to hook all this in would be in GUI object and I have done event-driven development in Windows Visual C++ since the 90's so once I know the proper high-level strategy I will be able to implement this but I am just at sea as far as where to direct my initial efforts and this can only be a part-time effort on my part because of other real-world development projects.
I learn best with working example code so any pointers would be extremely helpful and appreciated. I have seen a lot of the followups on these forums just telling the person to use feature XYZ in MCreator. I am pretty sure we all know XYZ exists already. It is the nuts and bolts of how others were able to successfully implement the features in question while using XYZ that would be helpful. Maybe this is because a lot of the MCreator users are gamers who started modding rather than coders who started using MCreator? I don't know. But working code examples are best because otherwise you are just saying "keep Googling" when it comes right down to it :)
My high-level plan for this mod is:
1. Assign a hot key to open the main GUI for the mod with an alternative of an added inventory GUI button
2. Once in my GUI, let user select from LOG A SALE, SET PRICES and REPORTS buttons
3. Based on actions within those screens read from/write to a remote database
I apologize if this is too vague - this environment is still 100% new to me and I hope to come up to speed quickly. I am hoping for some working code examples of remote SQL connections or if that is not possible, remote HTTP connections through which I can just pass the query parameters as POST data.