Traits - ToCraft/woodwalkers-mod GitHub Wiki
Traits are buffs and debuffs that a mob can implicit.
This disables the hunger. To heal, players must deal damage.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:zombie"
],
"traits": [
{
"type": "walkers:attack_for_health"
}
]
}
Most mobs with this trait can swim faster and breath underwater.
-
- water mobs
-
- "water & land" mobs
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:turtle"
],
"traits": [
{
"type": "walkers:aquatic",
"isAquatic": true,
"isLand": false
}
]
}
-
isAquatic
: optional, default: true. If a mob is aquatic, it can breathe underwater and swim faster -
isLand
: optional, default: false. If a mob is a land mob, it can breathe at land.
e.g. Zombies burn in daylight
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:zombie"
],
"traits": [
{
"type": "walkers:burn_in_daylight",
"burn_in_moonlight_instead": false
}
]
}
-
burn_in_moonlight_instead
: optional, default: false
Prevent freezing, e.g. through Powdered Snow.
Example Implementation (Click to expand)
{
"entity_types": [
"friendsandfoes:iceologer"
],
"traits": [
{
"type": "walkers:cant_freeze"
}
]
}
e.g. Raiders can't interact with villagers
Example Implementation (Click to expand)
{
"entity_tags": [
"minecraft:raider"
],
"traits": [
{
"type": "walkers:cant_interact",
"can_only_interact_with_listed": false,
"types": [
"minecraft:villager"
],
"tags": [
"minecraft:raider"
]
}
]
}
-
can_only_interact_with_listed
: optional, default: false. If true, the entity can only interact with listed entities. If false, the player can't interact with the listed entities. -
types
: optional, default: empty. The entity types where the player has to interact with in order for the trait to apply. -
tags
: optional, default: empty. The entity tags where the player has to interact with in order for the trait to apply.
Disable the swimming mechanism.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:iron_golem"
],
"traits": [
{
"type": "walkers:cant_swim"
}
]
}
Climb blocks like spiders!
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:spider"
],
"traits": [
{
"type": "walkers:climb_blocks",
"horizontal_collision": true,
"valid_blocks": [
"minecaft:cobweb"
],
"invalid_blocks": [
"minecraft:bedrock"
]
}
]
}
-
horizontal_collision
: optional, default is true. If true, the trait applies on horizontal collision (e.g. when walking against a wall), if false, the trait applies only when in a block (e.g. cobweb, ladder). -
valid_blocks
: optional. If not specified, every block is possible (exceptinvalid_blocks
) -
invalid_blocks
: optional, Disallow every listed block to be climbable with this trait
Make mobs run away from you (like Skeletons run from Wolves).
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:wolf"
],
"traits": [
{
"type": "walkers:feared",
"fearful": [
"minecraft:skeleton"
],
"fearful_tags": [
"namespace:tag"
]
}
]
}
-
fearful
: optional iffearful_tags
is present, the list of mobs which run away. -
fearful_tags
: optional iffearful
is present, the list of entity tags which run away.
Fly like bats!
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:bat"
],
"traits": [
{
"type": "walkers:flying",
"slow_falling": true
}
]
}
-
slow_falling
: optional, default: true. Should the SlowFallingTrait be automatically implemented?
Only recommended for mobs which also have a humanoid model. This scales the hitbox according to the model.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:zombie"
],
"traits": [
{
"type": "walkers:humanoid"
}
]
}
Suppresses mob effects.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:wither_skeleton"
],
"traits": [
{
"type": "walkers:immunity",
"effect": "minecraft:wither"
}
]
}
-
effect
: required, the id of mob effect that should be suppressed
This instant kills you if you get damage with a specific message.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:turtle"
],
"traits": [
{
"type": "walkers:instant_die_on_damage_msg",
"msgId": "lightningBolt"
}
]
}
-
msgId
: required, the id of the message that will be send when the player dies (used to compare the damage types)
Probably the most used trait. This applies a mob effect on the player or nearby ones.
The icon equals the effect icon.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:dolphin"
],
"traits": [
{
"type": "walkers:mob_effect",
"mob_effect": {
"id": "minecraft:dolphins_grace",
"duration": 0,
"amplifier": 0
},
"show_in_inventory": true,
"apply_to_self": "true",
"apply_to_nearby": 0,
"max_distance_for_entities": -1,
"amount_of_entities_to_apply_to": -10
}
]
}
-
mob_effect
: required. The mob effect the player should receive. Must containid
(ResourceLocation),duration
( Integer),amplifier
(Integer). Can containambient
(Boolean),show_particles
(Boolean),show_icon
(Boolean) -
show_in_inventory
: optional, default: true. If false andapply_to_self
is true, the effect won't be visible to the player. -
apply_to_self
: optional, default: true. If true, the effect will be applied to the player. -
apply_to_nearby
: optional, default: -1. Should nearby entities get it? negative - no, 0 - player only, 1 - mobs only, 2 - players and mobs -
max_distance_for_entities
: optional, default: -1. Requiresapply_to_nearby
to be true. The maximal distance for the effect to apply on nearby entites. -
amount_of_entities_to_apply_to
: optional, default: -1. Requiresapply_to_nearby
to be true. The amount of entities the effect applies to. If negative, every within range will gain the effect.
Sleep on the day, wake up at night.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:dolphin"
],
"traits": [
{
"type": "walkers:nocturnal"
}
]
}
This allows you to fly through blocks (or fall, if you don't have flying).
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:vex"
],
"traits": [
{
"type": "walkers:no_physics"
}
]
}
Make mobs hunt you (e.g. wolves hunt you if you're morphed as skeleton).
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:skeleton"
],
"traits": [
{
"type": "walkers:prey",
"hunter": [
"minecraft:wolf"
],
"hunter_tags": [
"namespace:tag"
]
}
]
}
-
hunter
: optional ifhunter_tags
is present, the list of mobs which hunt you. -
-
hunter_tags
: optional ifhunter
is present, the list of entity tags which hunt you.
-
Calls Reinforcements if you're hurt (e.g. wolves attack the zombie that just hurt you).
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:wolf"
],
"traits": [
{
"type": "walkers:reinforcements",
"range": 32,
"reinforcements": [
"minecraft:wolf"
],
"reinforcement_tags": [
"namespace:tag"
]
}
]
}
-
range
: optional, default: 32. The range where reinforcements shall be alarmed. -
reinforcements
: optional, default: the entity type you're morphed as. The reinforcements to be called. -
reinforcement_tags
: optional, default: empty. The reinforcement tags to be called.
Ride mobs that are normally not rideable (e.g. you can ride spiders as a skeleton).
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:skeleton"
],
"traits": [
{
"type": "walkers:rider",
"rideable": [
"minecraft:spider"
],
"rideable_tags": [
"namespace:tag"
]
}
]
}
-
rideable
: optional ifrideable_tags
is present. The mobs you can ride with this trait. -
rideable_tags
: optional ifrideable
is present. The entity tags you can ride with this trait.
You get slow falling unless you crouch.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:chicken"
],
"traits": [
{
"type": "walkers:slow_falling"
}
]
}
You get slow falling unless you crouch.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:strider"
],
"traits": [
{
"type": "walkers:stand_on_fluid",
"fluid": "minecraft:lava"
}
]
}
-
fluid
: required. The fluid you can stand on.
Hurt the player if it's to warm or to cold.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:snow_golem"
],
"traits": [
{
"type": "walkers:temperature",
"cold_enough_to_snow": true
}
]
}
-
cold_enough_to_snow
: optional, default: true. If true, the player gets hurt if it can't snow. If false, the player gets hurt if it can snow.
These mobs can't drown but don't regain air underwater.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:snow_golem"
],
"traits": [
{
"type": "walkers:undrownable"
}
]
}
The player can walk on powder snow with this trait.
Example Implementation (Click to expand)
{
"entity_types": [
"minecraft:rabbit"
],
"traits": [
{
"type": "walkers:walk_on_powder_snow"
}
]
}