For what project is this:
This a Post which talks about the introduction of the DataStores and the capability of Resets to the RS.
Resetting the RS and its problems
When I initially introduced the RS a couple of months ago, there was one flaw with it: Its data was distributed over several classes and several places inside those classes, all losely coupled using ITokens.
This was a problem when something broke. So I decided to change it.
A central database here we go:
Using our factory systems and a simple Map I was quickly able to create a nice central storage for our SRM:
This storage is now the central place were the RS stores data that it needs, I gave it an endpoint in its API:
Getting data:
Now that we have a central place to store the Data. We need a way to get it out. To make this possible we make use of TypeTokens (Google GenericType catchers) and again ITokens to identify which store we are looking for. As you can see the StandardDataStoreManager, will create a DataStore if it is not already known using our factory system:
Resetting the RS.
Now that we have all our ducks in a row so to speak resetting the RS to its defaults was easy as this:
We resetup our SRM to create a new DataStoreManager and to get new ITokens for the respective datastores:
After that we run our SRM Update logik to register all components back into it again.
Done.
Now it is possible to use a single command to reset the RS, incase it breaks, without having to dig through several NBT files that Minecolonies uses.
Posted on Utopian.io - Rewarding Open Source Contributors
Your contribution cannot be approved because we have already accepted the same Pull Request in your previous contribution.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Bless up.... You're excelling
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Nice
And good post also
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
so thankful of ur post... i have upvoted ur post please do upvote my post once please
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @oriononline, this post is the tenth most rewarded post (based on pending payouts) in the last 12 hours written by a Dust account holder (accounts that hold between 0 and 0.01 Mega Vests). The total number of posts by Dust account holders during this period was 18613 and the total pending payments to posts in this category was $6514.34. To see the full list of highest paid posts across all accounts categories, click here.
If you do not wish to receive these messages in future, please reply stop to this comment.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit