Create 6 Shopkeeper payment integration (1.21.1)#134
Create 6 Shopkeeper payment integration (1.21.1)#134adam8797 wants to merge 7 commits intoLayers-of-Railways:1.21.1/1.0.xfrom
Conversation
|
Wow! Looks awesome! Would love to test it out on my survival world. Is it okay just to build it from your PR or is there something else I would need to think about before testing it out? :) |
|
Thanks! Yeah it should build just fine, and doesn’t need any extra dependencies. Have fun! If you notice any issues that I didn’t catch lmk. No telling if the maintainers will actually accept the PR, so don’t get too attached just yet :) |
Sounds great! Have you heard anything from the maintainers? This PR is the only thing we missed while using this mod just now. We have a bank terminal infront of every shopkeeper, but to have a card to use is much cleaner. :) I'll comment here if I find any bugs, and I wish you the best to getting this merged! I wish you a nice weekend here from Sweden! |
|
I haven’t heard anything recently! However I get that they’re all volunteers and probably focused on Steam n’ Rails right now, so I imagine someone will get to it eventually. And same here, it’s the main thing holding us back from having an economy really based on numismatics coins. I made this PR cause I was in the same position as you! Hope you have a wonderful weekend as well :) |
|
Hello again @adam8797 ! I realized when I was compiling this that you have (for obvious reasons) aimed this for the 1.21 version, however the server me and my friends are on is 1.20.1. Is it still possible to compile or is there too big of a difference? Take care! |
|
Hey @Bjorkan yeah I can take a look, I may end up with a few hours today. It should be pretty easy, but if it turns into a big effort I probably wont unless the maintainers want to be supporting both 1.20 and 1.21 |
How kind! However feel no pressure from me to do it! I am just impressed with what you have already done! So don't push yourself! Wishing you all the best :) |
|
Hey Sorry @Bjorkan it looks like its gonna be more than just a simple rebase, so I'm not going to put the effort into back-porting to 1.20 for now... sorry! I tried it, but they made a number of changes between 1.20 and 1.21 that I'm not looking to try and unwind. Hopefully if you all move the server to 1.21 in the future you can give it a try! :) |
|
@IThundxr I noticed you pushed recently to |
No need to apologize! 🥳 Thank you for taking a look! |
That's fine, i can rebase it whenever we merge it |
|
@Bjorkan you're in luck, my friends decided they wanted to run a pack on 1.20.1 so I'm backporting these changes anyway! I hope to have it done in a few days, if you're still willing to pilot the feature :) |
Wow! Is that so? Of course! 🤩 |
|
@Bjorkan see the other PR I have open! It should build for Fabric and Forge, whichever you're running on. As always, please backup your world! I can't really see how it would break anything, but I don't want to be responsible if anything goes bad :) Let me know if you find any issues! |
d71997e to
76adb75
Compare
|
Ok, Sorry for all the noise. I've done the following:
Please let me know if there's anything else I can do! |
49e5ee7 to
fcb37f3
Compare
|
is there anything holding this back? looking to use it in one of my mod packs. i may just end up using the fork until its merged |
|
From my standpoint, no- its ready to go. I've been using a local build of the 1.20.1 branch for weeks on my personal server. It just depends on when the maintainers accept it, or ask for changes. I think they're mostly focused on Create and SnR right now I wont provide a build, but you should be able to build it locally for yourself off the fork. |
thanks. will definitively build it locally for my server im running atm. thanks again for the work and hopfully this can be merged in at some point |
|
I went ahead and compiled this for 1.20.1 and 1.21.1 and created both CurseForge and Modrinth projects for them, so people can use them in modpacks published there, since it's been so long; CurseForge is already approved, and the Modrinth one is under review. I made sure to start the description off with crediting and linking both you and the pull requests you made here. EDIT: If you have any desire to take ownership of them, I'm more than willing to transfer them; I just did this because a modded server I've been playing on/helping out with uses CurseForge to publish their modpack, and they don't allow mods they don't host to be included, unless there's specific approval for that mod. |
…egration # Conflicts: # build.gradle.kts # common/src/generated/resources/.cache/4a647960c58f00edc4e31df653bfe3586eff8c6c
We would rather people not publish reuploads. As for the curseforge situation i hereby give permission for people to include unpublished versions of this mod in their pack. (If your pack gets denied for using a override, just show curseforge this) |
They specifically require pre-approval to get it added to a list of approved non-hosted mods; I think there's also concerns for safety, since they know what scrutiny they apply to mods they host themselves. Problem is, it is slow to get that updated; I'm still waiting for them to approve a version of Apotheotic Creation updated with Create 6.0 support that's hosted on Modrinth. They also require you to provide a link to where the mod can be downloaded, so it has to be hosted somewhere. |
I’ve been hosting my friends’ personal mod pack on curseforge and using the override with my personal version for weeks now. They shouldn’t give you any trouble going down that route. I’d say you’ll probably be better served doing that until this is ready for the official merge, that way there’s not an extra fork floating around to confuse people. |
|
Sounds like their enforcement isn't as strict as their written policy, I guess. |
|
I've gone ahead and deleted the Modrinth project (which never finished review); the CurseForge project is already being used by 1.20.1 modpack that just got published, so once the main project gets the 1.20.1 update, I'll personally DM that author to let them know I'm deleting the project 24 hours later. |
Your build on curseforge is compiled with java 21 for 1.20.1 (this is an error), though I'm not sure how relevant this is going to be if these PRs get merged in a reasonable amount of time. |
This PR implements a workflow for users to both make and accept payments using numismatics coins (or cards) at Create shopkeepers.
Player Experience
Enabling the shopkeeper to accept coins
Opting into these features is as simple as placing a coin depositor next to the same stock ticker that serves the shop. It can be placed on any orthogonal side, like so:

The player may then optionally place a card in the depositor. If they do not insert a card, coins will be accepted but they will remain in the depositor.
Placing an order as a customer
If a customer attempts a transaction that does not include any numismatics coins in its costs, the player will not experience any difference. The standard Create shop mechanics will take over and fulfill the order.
If the order does have costs in the form of coins, they'll be prompted with a payment screen:
They can then place a card in the slot, or pay with coins out of their inventory. The
Pay with Coinsbutton is disabled if they do not have the requisite amount of coins available in their inventory.Upon clicking one of the payment buttons, the transaction is processed, and then any non-coin item costs are processed in the standard way.
If the player pays with coins, we withdraw coins in a greedy fashion, and will break a coin into change if needed. This is a one-click coin payment, regardless of the number and variety of coins needed.
This patch does allow for payment of mixed item & coin, but each individual item can still only have a cost of a single item or coin.
Technical details
The main flow here is that of a deferred payment system. We intercept calls to the Create
interactWithShop()function which is called whenever the player right clicks on a stock keeper with a shopping list. We check a handful of preconditions, and if they all pass we:resolves #119