Hey everyone, as I said these days we're currently working on some huge changes in our mod and I'll present you today the first part of this together with the port of all of this to the 1.11 version of our mod.
What's new:
Most of our players are complaining for quite a while already that they want our workers to be able to craft, even if they are simple recipes.
We're planning on the long run complex crafter workers. But we set up things step by step to get them tested and stable before we advance further.
For that, we set up a crafting GUI which allows you to drag items into the crafting grid and then click done after the recipe has been analyzed.
After that, you'll be able to display those recipes on the crafting list and remove or order them by priority.
The worker will then if he has the regarding item craft the item and not request it to the warehouse (One of our other devs will post about that in the next days.)
What we did:
First of all ,we added a RecipeManager to our ColonyManager.
This means that all recipes are stored globally in the scope of the server.
The recipe manager has a list of Recipes (Which are instances of IRecipeStorage) and they are accessible by a unique token implementation.
Each worker then has a list of those tokens stored inside his building which allow him to retrieve the recipe from the RecipeManager through the ColonyManager.
We did this to make our system as light as possible on the memory.
Most players will probably teach mostly the same recipes to their workers and we would have to store the heavy recipe storages in each worker or colony dozens and dozens of times all over the server. This way each worker only has to store the tokens of the recipes he knows which makes this system way lighter.
Since the ColonyManager also takes care of serializing it to the client side of the mod each building also only has to serialize the tokens and not the whole RecipeStorage to display it to the client which is also way faster and lighter on the bandwidth.
Each RecipeStorage holds a number of fields.
Which are namely the input (the blocks needed), the output (the resulting block), a possible intermediate block (a furnace or modded crafting bench) the grid size (2x2 or 3x3) and the token of it which we use to store it in its manager.
Then, it is also responsible for knowing if it can be resolved by a certain citizen, or, to be more accurate by a certain list of inventories.
It will then go through the input stack and adds it up (adds 4 wheat stacks in the size of 1, to 1 wheat stack with the size of 4).
Afterwards, it goes through all the resulting stacks and through all the incoming inventories and checks if the right amount of the blocks can be found in a combination of all inventories.
Fulfillment
With the help of this, it will even do the fulfillment.
It will first, check for the free space in the inventory to add the result and then check if it actually can fulfill the recipe.
Afterwards, it runs through all the input and extracts it from the inventories and afterwards, inserts the crafted item in the inventories.
This was it from my side of this issue. In the next days, one of our main developers will write about how those recipes will be handled by the colony and how this will be integrated with the warehouse and delivermen.
I hope you liked the post of today and our new update, I will keep you posted!
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
very good post and help @raycoms
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Survival is the best! :D I love building in survival
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
this is good
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I have a suggestion. I think you should change the font of the game. It doesn't seem to attractive to the eye. The UI of a game cannot be overemphasized. I think you should work more on the presentation. Between, I checked out the code base... Really clean.
Nice one
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hi, thanks for the comment, for the time being, we're bound to the default minecraft fonts, nevertheless, we're currently rewriting our GUI handling so we can adapt to different kinds of fonts.
If you're interested participating in our project just contact me here on Steemit =) we always have things to do.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Your information is out standing ill be keeping my eye on you thanks fir the post its really going to help me out and alot of others no question in my mind about that keep putting this type of material out there for all of us to enjoy
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Outstanding post its very helpful for us thanks for sharing with us...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @raycoms I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
thanks to people like you who always develop and update for the community ...
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Absolutely amazing work, very keen to play this in the future :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
excelente posts gracia por publicarlo
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations, very interesting, continue like this. @raycoms
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit