I shall write a Minecraft mod. Day #10
Let the crafting commence.
I found this awesome tutorial with everything explained. The whole mod writing thing is like running from a tutorial to a tutorial, assembling examples. At least for now. I guess the more advanced the modding gets, the trickier work gets, ending with no answers to one's questions. I don't think I will reach that phase though. It's not the point of this thing.
The only thing I noticed that changed was the recipe method - addShapedRecipe
is what I want. I'm not sure how it was before, but I guess a shapless recipe is one in which the items layout is not important. I found other resources on that: one and two. They were also insufficient as I was missing information on what the flip ResourceLocation is for and where to get it from. I then found yet another thread on a Minecraft Forge forum that gave me an example and I got this going. The last post however suggested that I should use jsons and not code to register a recipe. I decided to explore it and make it as thay say. It turned out much easier than I initially thought (once someone described it in a clean way). Threw the code out, added a json, done.
Since it feels we're done with most of the investigations, I guess it's time to look around. One thing I didn't like in the screenshot on day 9 was the presentation of a bluestone. I would like to make it glow a bit to add some nice looks to it. setLightLevel
was enough to get what I wanted.
Then I thought I could add a nicer texture to the block. Well, I'm not sure it's nicer, so I will leave it around for now, I can revert at any time.
I'm not in the same place with Fergus at the moment, so I don't know what to do next. I'm not sure if I will be trying to make anything new or just call it done. I haven't baked bread for a while. We'll see.
You can see the outcome on github: https://github.com/breadcentric/fergusmod. I started tagging the state after each day of work with tag day_x.
Repo state after this work: https://github.com/breadcentric/fergusmod/tree/day_10
Visit the tag #ishallwriteaminecraftmod and follow me to see the progress
My 7 yo son loves Minecraft so much, but I don't think I can teach him to create cool stuff even after reading your mod(s). I am too old to be creative 😀
I haven't planned this to be a tutorial. More of a story of trying to make a boy happy. I didn't learn much, he didn't learn anything.
I wouldn't recommend forge and Minecraft to be a subject to learn coding from. It's bit well structured, it's but well explained, a lot of materials are not up to date, code is not documented, most tutorials don't even explain the versions of tools being used.
It's a great pity.