BetterCombat API [Forge 1.19.4 - 1.20.1]

Published by MinoBanana on
Supported MCreator versions
2023.4
2024.1
Tags / plugin type
API support
Better Combat API Logo
Downloads:
880
Upvotes: 14
About the plugin

Better Combat API adds support for the Better Combat mod within MCreator

 

--Enabling the Mod / How to Use--

Click "Workspace Settings" at the top right--> Click External API -->
Ensure the following 3 external API's are turned on for everything to work properly

(If you cannot see these options, restart McCreator)

Enable BetterCombat, PlayerAnimator, and ClothConfig

 

--Adding Animations to Weapons--

Method 1 - Simple Way:

Begin by adding a tool element

Add a tool element

 

Within the Tool name / ID MAKE SURE YOU INCLUDE ONE OF THE FOLLOWING PRESETS:

Anchor, Axe, Battlestaff, Claw, Claymore, CoralBlade, Cutlass, Dagger, DoubleAxe, Fist, Glaive, Halberd, Hammer, HeavyAxe, Katana, Lance, Mace, Pickaxe, Rapier, Scythe, Sickle, SoulKnife, Spear, Staff, Sword, Trident, TwinBlade, Wand

Enter tool name

 

It should look something like this

Enter tool name with preset

 

You can the change the in-game name of the item to whatever you like:

Change the in game name to whatever you like

 


 

Method 2 - Complex Way:

Begin by opening the workspace file browser by sliding the bar at the far left, towards the right

Open file manager in mcreator

 

Open the Resources/data/modID folder - if you cannot find the data folder simply create a recipe, save it, then delete it

folder overview

 

Right click on the modID folder and add a folder called weapon_attributes

create a weapon_attributes folder

 

Right Click that folder and click add JSON file

Adding json file

 

Name the JSON file with the weapon ID you'd like to customize - ensure each capital letter/space in the element name is separated by an underscore

json file naming

 

Within the JSON file, type the following, substituting one of the aforementioned presets into the <preset> placeholder:

{
"parent": "bettercombat:<preset>"
}

Save the JSON file, and everything should be ready!

 

--Changing the Size of Weapons--

Begin by locking the code of your chosen weapon

Lock the code of the element

 

Open the associated JSON file

open element json

 

Copy and Paste the Following:

https://pastebin.com/W9cFzZeV

 

Make sure to change the modID, and textureID

You may then edit the rotation, translation, and scale freely

 

--Better Combat Documentation--

GitHub: https://github.com/ZsoltMolnarrr/BetterCombat

Weapon Presets: https://github.com/ZsoltMolnarrr/BetterCombat/tree/1.20.1/common/src/main/resources/data/bettercombat/weapon_attributes

 

License
All Rights Reserved

Plugin downloads
(2023.4) Version 1.0.0 ~ BetterCombatAPI - BetterCombatAPI.zipUploaded on: 01/21/2024 - 14:11   File size: 2.62 KB
(2024.1) Version 1.0.1 ~ BetterCombatAPI - bettercombatapi.zipUploaded on: 04/14/2024 - 13:30   File size: 2.65 KB

Comments

Is there a way to make "entity swings item" procedure work with this plugin? Or is the toggling mode only way?

As someone who's inexperienced with using JSON files, how would I combine the text from the "change_weapon_size_mccreator" pastebin as well as this text that i use to define the attack range of the item

{
"parent": "bettercombat:staff",
"attributes": {
"attack_range": 2.5
}
}

Trying to make a unique staff weapon texture with longer reach

I have a mod with more than 150 weapons. I did the complex way by creating all the json files with the same ID as my weapons but it did not worked when i exported the mod to try with better combat.

Can you change the weapon range in the weapon attribute setting?

I’m currently having two problems: first is that I have a weapon in my mod that’s called “claws of hades”, and I’m trying to use the complex method to give them the sword preset. Because of their name tho, they keep changing back to the claws preset. Second problem is that for some reason the animations aren’t working for another weapon I have called mjolnir, and I have no idea why.

In regards to the Claws of Hades, switch their in game ID to HadesSword but keep their in game name the same. For the Mjolnir, not sure why it wouldnt work, try changing the ID as well if not try following this tutorial: https://youtu.be/1h1racwsL5I?si=ckrCH62EdCjeqzTx

Top right, there should be a blue file like icon called "Workspace Settings" click that and a new pop up window should appear. Click external apis at the top of the pop up and you should be able to find it. If not please send a reply to this message