Compatible Items - RobertSkalko/Mine-and-Slash GitHub Wiki
Auto Compatibility
To enable the Auto Compatibility feature of Mine and Slash, you simply need to edit the MineAndSlash-Server.toml
located in your world save serverconfig
You'll want to enable
USE_COMPATIBILITY_ITEMS = true
and then edit
[SERVER.AUTO_ITEM_COMPATIBILITY]
#Used in power level calculation. Total stats of an item are capped to this value to prevent the median being offset too much by god items.
#Range: 0 ~ 100000
MAX_TOTAL_STATS = 200
#This automatically makes items compatible that i can recognize automatically, meaning they extend from vanilla classes.
ENABLE_AUTOMATIC_COMPATIBLE_ITEMS = false
#Range: 0 ~ 100000
MAX_SINGLE_STAT_VALUE = 50
[SERVER.AUTO_ITEM_COMPATIBILITY.BEST]
#Range: 0 ~ 4
MAX_RARITY = 4
#Range: 0 ~ 4
MIN_RARITY = 1
CAN_BE_SALVAGED = false
#Range: 0.0 ~ 1.0
POWER_REQ = 0.800000011920929
#Range: > 0
MAX_LEVEL = 2147483647
[SERVER.AUTO_ITEM_COMPATIBILITY.HORRIBLE]
#Range: 0 ~ 4
MAX_RARITY = 0
#Range: 0 ~ 4
MIN_RARITY = 0
CAN_BE_SALVAGED = false
#Range: 0.0 ~ 1.0
POWER_REQ = 0.0
#Range: > 0
MAX_LEVEL = 20
[SERVER.AUTO_ITEM_COMPATIBILITY.TRASH]
#Range: 0 ~ 4
MAX_RARITY = 2
#Range: 0 ~ 4
MIN_RARITY = 0
CAN_BE_SALVAGED = false
#Range: 0.0 ~ 1.0
POWER_REQ = 0.029999999329447746
#Range: > 0
MAX_LEVEL = 40
[SERVER.AUTO_ITEM_COMPATIBILITY.NORMAL]
#Range: 0 ~ 4
MAX_RARITY = 4
#Range: 0 ~ 4
MIN_RARITY = 0
CAN_BE_SALVAGED = false
#Range: 0.0 ~ 1.0
POWER_REQ = 0.30000001192092896
#Range: > 0
MAX_LEVEL = 80
Datapack
To start, I suggest reading HERE on how to get a basic datapack created. Once you have that set up to easily get the basic needed jsons, you simply load up Mine and Slash along side the mods you wish to make compatible and run the command: /slash generate compatible_items modid
for each mod you wish to add.
This will create a set of folders with the jsons located in ~/config/Mine and Slash/generated/
. Take the folder for each modid and move it to your datapacks data folder, first creating the following path in the data folder like so mmorpg/compatible_items/
and putting them in the compatible_items
folder. The modded items will now have built-in compatibility with Mine and Slash as per the configurations you edited in the jsons.
In An Addon or Your own Mod
Do this do, just follow the instructions here Adding Compatibility in Your Mod