An ever growing list of mod diaries/tutorials. They focus mainly on the development of my personal mods, but you may learn a thing or two about modding along the way.
A journey developing the butterflies mod, a mod that adds butterflies to the world. There will be some butterfly themed surprises as the mod grows.
The Forge website has a quick guide to getting started with modding. I’m just getting back into it, so I thought I’d walk through the steps to get a project set up with Forge.
Butterflies Part 1: Entities
I’m developing my own version of a Butterfly mod for Minecraft. Naturally, one of the first features I want to implement are the butterflies themselves. To do this we need to add new entities to the game, along with models and renderers for the entity, and define how the entities will spawn in the game.
Butterflies Part 2: The rest of the @!#$ Owl
In Part 1 we coded a butterfly entity. Now we need to put the rest of the pieces together, so we can model, render, register, and ultimately spawn butterflies in our Minecraft world!
Regional Variety in Butterflies
Adding new textures to our implementation of butterflies is an easy way to add variety. However, we can strive to do better. Our ultimate goal is to have achievements for catching all butterfly varieties, but this becomes too easy when butterflies of all varieties can spawn anywhere.
Butterfly Nets: Gotta Catch ‘Em All
I mentioned in my last article that I wanted to add a collectible element to my butterfly mod. In order to do that we need a way to catch said butterflies. So the next step is to implement a butterfly net. With the latest change we can now craft butterfly nets that can be used to catch (and release) ’em all.
How to Upgrade a Forge Mod
Minecraft version 1.20.1 has been out for a while now, and a stable version of Forge has been released for it. So it’s time to update our mod to run in the latest version of Minecraft. That way we’ll be able to use the Butterflies mod with the fancy new features of Minecraft.
Bottling Butterflies in a Jar
Butterfly nets can only hold one butterfly at a time, and we can’t do anything with them once caught. We will add a new way to interact with them: moving them to jars so they can be put on display. This adds something we can do with butterflies, as well as another “catch ’em all” element to the mod.
Laying Butterfly Eggs in Leaves
Butterflies lay eggs that eventually become caterpillars. Caterpillars then feed on leaves until they are fat enough to become a chrysalis. Finally, they morph into a butterfly before breaking out of the chrysalis. The next step for our mod is to implement butterfly eggs.
Modelling and Animating Caterpillars
Everyone knows that butterflies come from caterpillars. The next stage in the life cycle is for butterfly eggs to hatch into caterpillars. So we will add caterpillars to our mod that will hatch from the eggs we created last time.
Cleaning Out the Butterflies Backlog
During any development it’s inevitable that you introduce bugs or leave minor tasks behind. The Butterflies Mod is no exception. We have a list of small details that are incomplete, as well as some bugs we’ve picked up on while testing. This week we try to clear out that list.
Caterpillars will always spawn on top of a leaf block. We want to give a bit more variety in our caterpillar behaviour. So we modify caterpillars so that they can crawl on any side of a leaf block. It’s a small detail, but took a decent amount of time to develop.
Chrysalis: Completing the Cycle
We finally implement the chrysalis and complete the life cycle of the butterfly. Butterflies lay eggs. Eggs hatch into caterpillars. Caterpillars create a chrysalis. Butterflies hatch out of a chrysalis. The circle of life is complete.
Cats: The Butterfly’s Natural Enemy
I wanted to have some interaction between butterflies and vanilla entities to make them feel like part of the Minecraft world. An easy way to have an entity interact is to make butterflies the target of a predator. Our furry friends seemed like the best candidate for this.
Releasing the Butterflies
We are on the road to release! This week I finally finished the first version of the mod and have pushed an official version of my mod out to the world. It’s taken me a while, but I finally have this simple butterfly mod out in the wild.
Forks, Branches, and Scrolls
I’ve finally released the butterfly mod, but I’m still not done. Now I’m working on the next release which will have a few extra features. This week I’ve been working on Butterfly Scrolls – a new way to create a collection of butterflies.
Pinning Up Butterfly Corpses
I’ve always struggled to get my head around modern day rendering code. There’s a reason I became a network and server programmer. Still, I managed to get this working in the end. Though I’m sure my computer knows many more swear works now…
Screwing Up the Life Cycle
Well, I screwed up. It turns out a major selling point of Bok’s Butterflies wasn’t working at all. The life cycle of the butterflies wasn’t working at all. It all boils down to a misunderstanding on my part. So this week I have a new release that fixes this feature.
It’s All About the Little Things
It’s always worth taking some time to focus on the details. Small things can make a huge difference to a mod. I spent some time this week working on small features and little improvements. In the long run, these things will make a huge difference.
These are older diaries and tutorials that aren’t part of the main series I’m working on. You might still find these useful, however.
How to Learn Minecraft Modding
Some advice on how to go about learning how to mod minecraft (or learn anything, really).
Setting up a Development Environment for Forge Modding
An older tutorial on how to set up a development environment.
Data Driving Minecraft
Some old ideas on how to add more data driven assets to Minecraft.
Data Driven Donuts
How I used data to add donuts to Minecraft.