Minecraft Modding For Kids For Dummies
Book image
Explore Book Buy On Amazon

You will be well on your way to Minecraft modding success if you make sure to do two things for all of your mods: refactor your mods and test, test, test!

Refactor your mods

A mod that starts to grow too big for you to remember it all can cause a lot of problems because if you try to make changes, you might make changes in the wrong function.

Always consider refactoring your mods when they become too large to understand easily.

An effective way to refactor your mod is to turn it into a library and then import it into a new mod, where you have more control.

Another form of refactoring occurs when you simply change how your functions interact, or even which functions you have.

Before starting to refactor, save a copy of your mod so that you can always return to a working version.

Sometimes, when you’re making simple refactoring changes, you can break your code. Be sure to continually test your code as you build it.

Test your code

Test, and test often. Avoid the situation where you spend hours writing code that doesn’t even work and then have to rewrite it. That’s when designing on paper and using a gameplay loop are helpful.

If you always have code that can be tested and you make only small changes between testing periods, you’re more likely to create correct, working code that you can be proud of.

About This Article

This article is from the book:

About the book authors:

Sarah Guthals, Ph.D. is the CTO of ThoughtSTEM and has dedicated her life to coding education.

Stephen Foster, Ph.D. is the CEO of ThoughtSTEM, a company that teaches computer science to kids across America.

Lindsey Handley, Ph.D. is the COO of ThoughtSTEM and has hundreds of hours of experience as a classroom instructor for Minecraft based science and computer science classes.

This article can be found in the category: