
Adding custom datapack traits not functional in singleplayer or multiplayer
rlyscaryclownz opened this issue ยท 1 comments
Mod loader
NeoForge
Minecraft version
1.21.1
Woodwalkers version
5.6
CraftedCore version
5.8
Modloader version
21.1.129
The latest.log file
Issue description
Several attempts were made to apply custom traits (night vision for fox and unable to swim for bat) via data packs. The traits only seem to appear briefly after a datapack /reload and then immediately stop working.
Steps to reproduce
- Insert data pack into saves/worldname/datapacks
- Open game
- Change into 2nd shape
- Observe lack of traits being applied
Other
No response
Hey! First of all, it seems like you registered the UndrownableTrait for the bats. In order to avoid swimming, you'll need to use the CantSwimTrait. Note that it doesn't prevent moving in water but jumping in water:
{
"entity_types": [
"minecraft:bat"
],
"traits": [
{
"type": "walkers:cant_swim"
}
]
}
For the foxes, you'll need a high effect duration, otherwise the night vision will start to flutter.. The file should look like this:
{
"entity_types": [
"minecraft:fox"
],
"traits": [
{
"type": "walkers:mob_effect",
"mob_effect": {
"id": "minecraft:night_vision",
"duration": 100000,
"amplifier": 0,
"show_particles": false,
"show_icon": false
},
"show_in_inventory": false
}
]
}