BotaniaCombat release and commentary

Recently I released my BetterCombat and Botania compat mod, aptly named BotaniaCombat (Modrinth / Curseforge). It’s not a big mod, but I wanted to write about its development a bit, as I learned a lot while making it. I also got some feedback from the Violet Moon forum thread, which I incorporated into the design.

So, what spurred on this idea was the desire to A) make a personal fabric modpack utilizing BetterCombat and related combat mods and B) be able to introduce my girlfriend to Botania in the same pack.

The issues that arose from this were:

  • Obviously, Botania does not have native compatibility with BetterCombat
    • Terra Blade won’t fire a beam due to how BetterCombat changes attacking
    • BetterCombat allows for weapon use in the offhand, and Botania items don’t have offhand attributes, but a player would expect two gain the benefits of holding a weapon in their offhand
    • Botania has vanilla-ish weapon variety, and BetterCombat-compatible mods will of course have more (including shields and crossbows – which didn’t exist when Botania was being designed 10 years ago)

So, I figured I have the opportunity to be fix those problems and be a little creative on top of that. Let’s take a walk through the features:

  • Adds a Dagger for Elementium and Terrasteel (Manasteel equivalent is Botania’s Soulscribe)
    • These were easy. I originally had a Manasteel Dagger but then remembered Botania has its own dagger-like weapon.
  • Adds the Soulstaff, a battlestaff version of the Soulscribe
    • This was mostly easy to implement, I just had to learn about Botania’s ColorHandler to do the sprite animation. Initially I was using Minecraft’s standard animated texture format, but I wanted to mimic Botania colors as much as possible.
  • Adds a Spear for Elementium and Terrasteel
    • These ended up being hard to decide on what to do for. Initially, I wanted to have separate textures for the item being in a GUI (which would be 16x16px, like everything else in Minecraft) and the item being in the players’ hands (first/third person, which would be 32x32px), but this ended up being more trouble than it was worth – it would take custom rendering code which I couldn’t get working anyway. BetterCombat-compatible mods did not shy away from having large textures on their two-handed weapons, and my items would stick out if they did.
  • If you are a patron of Vazkii, terrasteel weapons will emit mana beams with a random color from your Psi CAD colorizer colors
    • This was a “it would be really cool if” feature. I know I wanted to have a new weapon that fired multiple beams, I realized beams could be colored, and I remembered that the mod I’m adding on to, Botania, has an author that has patron colors. This was pretty easy to implement, as the Psi mod had already done the work (Patron colors were used with permission and while following the license of Psi).
  • Adds additional post-Gaia weapon, the Gaia Greatsword, which can use all of your Patreon colors
    • Another large weapon, that also has to do ColorHandler stuff for its animation.
    • The actual item wasn’t too hard, but it took a lot of tweaking to get the angles of the 7 beams it shoots to be satisfying.
    • Getting the Patron colors to distribute among the 7 beams the way I wanted was more difficult than I expected design-wise. You see, not all of Vazkii’s patrons chose seven colors, and many patrpms had pride flag colors in order. I wanted for the pride flag colors to be preserved in their order, so I made this ColorContainer class.
  • Buffs player-spawned pixies by making them always have the +2 damage bonus that would normally only be applied when the player is holding the Elementium Sword
    • A personal change, to make pixies more viable without the Elementium Sword. This wasn’t just to buff pixies while using the new Elementium weapons – I know I have used the Great Fairy Ring in Botania after progressing from Elementium equipment, and the Elementium Shield ended up being able to spawn pixies when attacks are blocked. Pixies are fun, they should be better IMO.
  • Adds Gaia Gifts: “secret” weapon(s) obtained by defeating Gaia II under specific conditions
    • These were mostly inspired by a suggestion on the VM forums. I will describe these items at the end as they are technically spoilers

If Better Combat is installed, it also does the following:

  • Adds offhand pixie spawn chance attribute to Elementium weapons (including Elementium Sword)
    • This was just a mixin, but it was basically the first mixin I ever did, so it took some learning
  • Adds pixie spawn chance attributes to the Elementium Axe
    • This one is a mixin that adds a method to the relevant class. To me, this felt like black magic, but apparently this is not uncommon in the modding space
  • Makes Terrasteel weapons (including Terra Blade) shoot a beam at the start of a BetterCombat swing; also works with offhand swings
  • Reduces Thundercaller attack range to 1.5 (from BetterCombat’s default 2.5), electricity range is unaffected
    • just JSON, easy

If Fabric Shield Lib is installed, it also does the following:

  • Adds the Manasteel Buckler
    • This was easy, it’s a smaller shield so has a faster swing speed attribute. I’m not totally satisfied with the art, and may come back to it.
  • Adds the Elementium Shield
    • This one support Banners, so it took some extra effort, but the FabricShieldLib guide told me what to do. First time I’ve ever had to make minecraft/atlases/blocks.json file, the purpose of which isn’t totally clear to me.
    • The un-bannered shield looks like the Elementium Blocks. This is the one texture I copied more than just the palette for.
  • Adds the Terra Tower Shield
    • Modelling this one was hard. I’m not an artist, and although I had a palette to reference, the design is
    • Coding the concept wasn’t too hard, but getting the area-of-effect and particle effects to be satisfactory made this item probably take more time than any other.
  • Adds shield Gaia Gift
    • see end

If Ranged Weapon API* is installed, it also does the following:

*This was actually a request to me from Daedelus_dev to split Archers into a library and content mod, because that mod simplified the ranged-weapon-coding process quite a lot. Without it, any custom bows I made would not have the FOV zoom, and I would have had to do the model predicate process for the different stages of bow pulling.

  • Adds Pull Time and Projectile Damage attributes to Botania’s bows
    • This was just a mixin, but I learned about MixinLoadingPlugins to ensure this mixin doesn’t try to happen if the mod containing those attributes weren’t loaded
  • Adds Livingwood Crossbow
    • This was the easiest item in the mod as it’s basically a retextured vanilla crossbow with mana repair
  • Adds Crystal Crossbow
    • This one took some time to get right. I wanted it to work like Botania’s Crystal Bow, where it can summon arrows with mana.
  • Adds bow Gaia Gift
    • see end

Overall, this was a fun mod to make. I got to learn the Fabric/vanilla way of doing some basics like registering items, and had the opportunity to ask for help when I ran into a problem. Even though I primarily made this as a personal project, I hope it is enjoyed by other players.


Gaia Gifts:

Mjolnir: This one was pretty easy to make, as it’s pretty derivative of an existing Botania item, but it took my longer than it should have to figure out how to make the “use item” animation happen for the right-click action.

Svalinn: This one was inspired by the VM Forums post. Making this item is how I learned that a Minecraft world’s play time is stored in ticks, and using the /time set commands resets the world to Day 0. I think this is the first time I’ve ever used the modulo operator, and it was to the desired number representing the amount of ticks passed in the current Minecraft day (rather than what was available, the amount of ticks pass in the world).

Skadi’s Bow: Again, inspired by the VM Forums post. It uses a lot of custom logic to convert arrows.