Skip to content

Instantly share code, notes, and snippets.

@riddle
Created June 18, 2016 15:25
Show Gist options
  • Save riddle/397bee2298450e6d97137d4aba86b58e to your computer and use it in GitHub Desktop.
Save riddle/397bee2298450e6d97137d4aba86b58e to your computer and use it in GitHub Desktop.
{
"version": 0.1,
"definitions": {
"mob.rabbit": {
"width": 0.4,
"height": 0.4,
"lootTable": "loot.tables.entities.rabbit",
"onSpawn": {
"probability": 0.05,
"action": "setState Age:baby"
},
"attributes": {
"health": 3,
"movementSpeed": 0.3
},
"sounds": {
"hurt": {
"sound": "mob.rabbit.hurt",
"volume": 1,
"pitch": [ 0.8, 1.2 ]
},
"ambient": {
"sound": "mob.rabbit.idle",
"volume": 1,
"pitch": [ 0.8, 1.2 ]
},
"death": {
"sound": "mob.rabbit.death",
"volume": 1,
"pitch": [ 0.8, 1.2 ]
},
"step": {
"sound": "mob.rabbit.hop",
"volume": 0.15,
"pitch": 1
}
},
"goals": [
{
"priority": 1,
"name": "Float"
},
{
"priority": 1,
"name": "RabbitPanic",
"speed": 2.2
},
{
"priority": 2,
"name": "Breed",
"speed": 0.8
},
{
"priority": 3,
"name": "Tempt",
"speed": 1,
"items": [
"golden_carrot",
"carrot",
"yellow_flower"
]
},
{
"priority": 4,
"name": "AvoidMobType",
"entity_type": "Player",
"max_dist": 8,
"walk_speed_modifier": 0.8,
"sprint_speed_modifier": 1.33
},
{
"priority": 4,
"name": "AvoidMobType",
"entity_type": "Wolf",
"max_dist": 10,
"walk_speed_modifier": 0.8,
"sprint_speed_modifier": 1.33
},
{
"priority": 4,
"name": "AvoidMobType",
"entity_type": "Monster",
"max_dist": 4,
"walk_speed_modifier": 1.5,
"sprint_speed_modifier": 1.33
},
{
"name": "RaidGarden",
"blocks": [
"carrots"
],
"search_range": 16,
"goal_radius": 0.8
},
{
"priority": 6,
"name": "RandomStroll",
"speed": 0.6,
"xz_dist": 2,
"y_dist": 1
},
{
"priority": 11,
"name": "LookAtPlayer",
"speed": 10
}
],
"state_machines": [
{
"name": "Age",
"states": {
"adult": {
"default": true,
"breedable": {
"requireTame": false,
"breedItems": [
"golden_carrot",
"carrot",
"yellow_flower"
],
"onBred": "spawn mob.rabbit Age:baby"
}
},
"baby": {
"width": 0.2,
"height": 0.2,
"ageable": {
"duration": 60,
"onGrownUp": "setState Age:adult"
}
}
}
},
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment