Minecraft Modding

And so I downloaded Forge for 1.18.1 BETA. I’ve got the basic details down, and hope to convert some tutorial module to 1.18.1 and then set about making some extras to try out. ExactFeather396 is the github repo, and it will develop slowly. I seem to have a Microsoft username.

It seems quite a lot is JSON these days, and sometimes the names of methods change a bit. Hopefully this is not too weird to convert and make into something. Some AI mob redstone thing? Who knows?

EDIT 2022-03-01: Ah, so that’s how potions are made! And the RegistryMap class might come in useful later. I’ll have to make some of the classes final and private or default some of the public classes.

Just analyzing the base code at the moment to make it adaptive and have minimal technical debt. I might abstract off some of the names.

Seems the rendering of Mobs is somewhat complex. So I’ll have to have a look see. A basic Zomie clone reskinned seems easiest. I’ve started on an AI exception mechanism. It starts with BaseCodeException which fires the instict emote() when it reaches the base code, which proxies the actionTry() and actionCatch(BaseCodeException) for consequential instinct.

Ah, exceptions and encapsulation within a RuntimeException to avoid the dreaded can’t override method with throws extension, and having type checking and catching.

EDIT 2022-03-09: So it has been simplified a bit and made more complex. I’m making it so that various Loaded classes via extension are invoked via a static and then an instance of self passed to it allows the invoke dynamic override while avoiding lots of casts to super classes.  This may look more complex but it does allow easier pull request merges by keeping things in seperate files to the mini module level.

Added in a simple potion system I’ve yet to test.

Minecraft Mod Development

Got distracted. It will work out fine as I move backwards and forwards between the this and DSDev. Version 1.16 of Minecraft now has a Forge to make mods. I had an idea and started on a mod. There are a lot of changes since I last dipped a toe in the water. It looks as though it will make many things easier.

After a little track into crafting recipes, simple potion time extensions and extra Redstone blocks, I could move onto more complex potions with new effects or maybe even mobs. Mobs are however less likely than other gameplay elements.

  • Enchantments – nice but seems like a stats and number modification game.
  • Mobs – quite a lot already, but mob AI looks like an interesting thing to improve.
  • Crafting – best with new blocks with uses.
  • Brewing – similar to enchantments but can have player Effects and there is much scope with Think Potion or Mundane Potion expansion.
  • Non Block Items – could have use (Food, Item Frames …) but would have to have utility and not just another thing to be of interest. I’m adding a Written Book for example.
  • Block Items – there are already many, but I find adding to Redstone blocks an interesting one for mechanisation and automation. Maybe new technology is possible? I remember writing a teleport chest a long while ago and now the Ender Chest has some of the same functionality but is better.

Nice after getting used to things like @ObjectHandler and other new things. Still a few assumptions in the documentation such as default loot tables for blocks.