ユーザー:Hytsnbr10519/sandbox/3
目次
- 1 Version: 1.8.0-beta.1
- 2 Client Entity Documentation
- 3 Data Driven Animation Documentation
- 4 Entity Flags
- 5 Particle Documentation
- 6 Render Controllers Documentation
- 7 Attachables Documentation
- 8 Server Entity Documentation
- 9 Data Driven Spawning Documentation
- 10 MoLang
- 11 ファイル定義
- 12 エンティティ定義プロパティ
- 13 Attributes
- 14 Properties
- 14.1 minecraft:ambient_sound_interval
- 14.2 minecraft:can_climb
- 14.3 minecraft:can_fly
- 14.4 minecraft:can_power_jump
- 14.5 minecraft:collision_box
- 14.6 minecraft:color
- 14.7 minecraft:color2
- 14.8 minecraft:default_look_angle
- 14.9 minecraft:equipment
- 14.10 minecraft:fire_immune
- 14.11 minecraft:floats_in_liquid
- 14.12 minecraft:flying_speed
- 14.13 minecraft:foot_size
- 14.14 minecraft:friction_modifier
- 14.15 minecraft:ground_offset
- 14.16 minecraft:input_ground_controlled
- 14.17 minecraft:is_baby
- 14.18 minecraft:is_charged
- 14.19 minecraft:is_chested
- 14.20 minecraft:is_dyeable
- 14.21 minecraft:is_ignited
- 14.22 minecraft:is_saddled
- 14.23 minecraft:is_shaking
- 14.24 minecraft:is_sheared
- 14.25 minecraft:is_stackable
- 14.26 minecraft:is_tamed
- 14.27 minecraft:item_controllable
- 14.28 minecraft:loot
- 14.29 minecraft:mark_variant
- 14.30 minecraft:push_through
- 14.31 minecraft:scale
- 14.32 minecraft:sound_volume
- 14.33 minecraft:type_family
- 14.34 minecraft:variant
- 14.35 minecraft:walk_animation_speed
- 14.36 minecraft:wants_jockey
- 15 Component IDs
- 16 Components
- 16.1 minecraft:addrider
- 16.2 minecraft:ageable
- 16.3 minecraft:angry
- 16.4 minecraft:boostable
- 16.5 minecraft:breathable
- 16.6 minecraft:breedable
- 16.7 minecraft:bribeable
- 16.8 minecraft:burns_in_daylight
- 16.9 minecraft:damage_over_time
- 16.10 minecraft:damage_sensor
- 16.11 minecraft:environment_sensor
- 16.12 minecraft:equippable
- 16.13 minecraft:explode
- 16.14 minecraft:genetics
- 16.15 minecraft:healable
- 16.16 minecraft:hurt_when_wet
- 16.17 minecraft:insomnia
- 16.18 minecraft:interact
- 16.19 minecraft:inventory
- 16.20 minecraft:item_hopper
- 16.21 minecraft:jump.dynamic
- 16.22 minecraft:jump.static
- 16.23 minecraft:leashable
- 16.24 minecraft:lookat
- 16.25 minecraft:movement.amphibious
- 16.26 minecraft:movement.basic
- 16.27 minecraft:movement.fly
- 16.28 minecraft:movement.generic
- 16.29 minecraft:movement.jump
- 16.30 minecraft:movement.skip
- 16.31 minecraft:movement.sway
- 16.32 minecraft:nameable
- 16.33 minecraft:navigation.climb
- 16.34 minecraft:navigation.float
- 16.35 minecraft:navigation.fly
- 16.36 minecraft:navigation.generic
- 16.37 minecraft:navigation.swim
- 16.38 minecraft:navigation.walk
- 16.39 minecraft:peek
- 16.40 minecraft:projectile
- 16.41 minecraft:rail_movement
- 16.42 minecraft:rail_sensor
- 16.43 minecraft:rideable
- 16.44 minecraft:scaffolding_climber
- 16.45 minecraft:scale_by_age
- 16.46 minecraft:shareables
- 16.47 minecraft:shooter
- 16.48 minecraft:sittable
- 16.49 minecraft:spawn_entity
- 16.50 minecraft:tameable
- 16.51 minecraft:tamemount
- 16.52 minecraft:target_nearby_sensor
- 16.53 minecraft:teleport
- 16.54 minecraft:tick_world
- 16.55 minecraft:timer
- 16.56 minecraft:trade_table
- 16.57 minecraft:transformation
- 16.58 minecraft:trusting
- 17 AI Goals
- 17.1 minecraft.behavior.scared
- 17.2 minecraft:behavior.avoid_mob_type
- 17.3 minecraft:behavior.beg
- 17.4 minecraft:behavior.break_door
- 17.5 minecraft:behavior.breed
- 17.6 minecraft:behavior.charge_attack
- 17.7 minecraft:behavior.circle_around_anchor
- 17.8 minecraft:behavior.controlled_by_player
- 17.9 minecraft:behavior.defend_village_target
- 17.10 minecraft:behavior.door_interact
- 17.11 minecraft:behavior.dragonchargeplayer
- 17.12 minecraft:behavior.dragondeath
- 17.13 minecraft:behavior.dragonflaming
- 17.14 minecraft:behavior.dragonholdingpattern
- 17.15 minecraft:behavior.dragonlanding
- 17.16 minecraft:behavior.dragonscanning
- 17.17 minecraft:behavior.dragonstrafeplayer
- 17.18 minecraft:behavior.dragontakeoff
- 17.19 minecraft:behavior.drop_item_for
- 17.20 minecraft:behavior.eat_block
- 17.21 minecraft:behavior.enderman_leave_block
- 17.22 minecraft:behavior.enderman_take_block
- 17.23 minecraft:behavior.find_mount
- 17.24 minecraft:behavior.find_underwater_treasure
- 17.25 minecraft:behavior.flee_sun
- 17.26 minecraft:behavior.float
- 17.27 minecraft:behavior.float_wander
- 17.28 minecraft:behavior.follow_caravan
- 17.29 minecraft:behavior.follow_mob
- 17.30 minecraft:behavior.follow_owner
- 17.31 minecraft:behavior.follow_parent
- 17.32 minecraft:behavior.go_home
- 17.33 minecraft:behavior.guardian_attack
- 17.34 minecraft:behavior.harvest_farm_block
- 17.35 minecraft:behavior.hurt_by_target
- 17.36 minecraft:behavior.lay_down
- 17.37 minecraft:behavior.lay_egg
- 17.38 minecraft:behavior.leap_at_target
- 17.39 minecraft:behavior.look_at_entity
- 17.40 minecraft:behavior.look_at_player
- 17.41 minecraft:behavior.look_at_target
- 17.42 minecraft:behavior.look_at_trading_player
- 17.43 minecraft:behavior.make_love
- 17.44 minecraft:behavior.melee_attack
- 17.45 minecraft:behavior.mount_pathing
- 17.46 minecraft:behavior.move_indoors
- 17.47 minecraft:behavior.move_through_village
- 17.48 minecraft:behavior.move_to_land
- 17.49 minecraft:behavior.move_to_water
- 17.50 minecraft:behavior.move_towards_restriction
- 17.51 minecraft:behavior.move_towards_target
- 17.52 minecraft:behavior.nearest_attackable_target
- 17.53 minecraft:behavior.ocelot_sit_on_block
- 17.54 minecraft:behavior.ocelotattack
- 17.55 minecraft:behavior.offer_flower
- 17.56 minecraft:behavior.open_door
- 17.57 minecraft:behavior.owner_hurt_by_target
- 17.58 minecraft:behavior.owner_hurt_target
- 17.59 minecraft:behavior.panic
- 17.60 minecraft:behavior.peek
- 17.61 minecraft:behavior.pet_sleep_with_owner
- 17.62 minecraft:behavior.pickup_items
- 17.63 minecraft:behavior.play
- 17.64 minecraft:behavior.player_ride_tamed
- 17.65 minecraft:behavior.raid_garden
- 17.66 minecraft:behavior.random_breach
- 17.67 minecraft:behavior.random_fly
- 17.68 minecraft:behavior.random_look_around
- 17.69 minecraft:behavior.random_sitting
- 17.70 minecraft:behavior.random_stroll
- 17.71 minecraft:behavior.random_swim
- 17.72 minecraft:behavior.ranged_attack
- 17.73 minecraft:behavior.receive_love
- 17.74 minecraft:behavior.restrict_open_door
- 17.75 minecraft:behavior.restrict_sun
- 17.76 minecraft:behavior.roll
- 17.77 minecraft:behavior.run_around_like_crazy
- 17.78 minecraft:behavior.send_event
- 17.79 minecraft:behavior.share_items
- 17.80 minecraft:behavior.silverfish_merge_with_stone
- 17.81 minecraft:behavior.silverfish_wake_up_friends
- 17.82 minecraft:behavior.skeleton_horse_trap
- 17.83 minecraft:behavior.slime_attack
- 17.84 minecraft:behavior.slime_float
- 17.85 minecraft:behavior.slime_keep_on_jumping
- 17.86 minecraft:behavior.slime_random_direction
- 17.87 minecraft:behavior.snacking
- 17.88 minecraft:behavior.sneeze
- 17.89 minecraft:behavior.squid_dive
- 17.90 minecraft:behavior.squid_flee
- 17.91 minecraft:behavior.squid_idle
- 17.92 minecraft:behavior.squid_move_away_from_ground
- 17.93 minecraft:behavior.squid_out_of_water
- 17.94 minecraft:behavior.stay_while_sitting
- 17.95 minecraft:behavior.stomp_attack
- 17.96 minecraft:behavior.stomp_turtle_egg
- 17.97 minecraft:behavior.summon_entity
- 17.98 minecraft:behavior.swell
- 17.99 minecraft:behavior.swim_wander
- 17.100 minecraft:behavior.swoop_attack
- 17.101 minecraft:behavior.take_flower
- 17.102 minecraft:behavior.tempt
- 17.103 minecraft:behavior.trade_with_player
- 17.104 minecraft:behavior.vex_copy_owner_target
- 17.105 minecraft:behavior.vex_random_move
- 17.106 minecraft:behavior.wither_random_attack_pos_goal
- 17.107 minecraft:behavior.wither_target_highest_damage
- 18 Filters
- 18.1 clock_time
- 18.2 has_ability
- 18.3 has_biome_tag
- 18.4 has_component
- 18.5 has_damage
- 18.6 has_equipment
- 18.7 in_caravan
- 18.8 in_clouds
- 18.9 in_lava
- 18.10 in_water
- 18.11 in_water_or_rain
- 18.12 is_altitude
- 18.13 is_biome
- 18.14 is_brightness
- 18.15 is_climbing
- 18.16 is_color
- 18.17 is_daytime
- 18.18 is_difficulty
- 18.19 is_family
- 18.20 is_game_rule
- 18.21 is_humid
- 18.22 is_immobile
- 18.23 is_moving
- 18.24 is_owner
- 18.25 is_riding
- 18.26 is_sneaking
- 18.27 is_snow_covered
- 18.28 is_target
- 18.29 is_temperature_type
- 18.30 is_temperature_value
- 18.31 is_underground
- 18.32 is_underwater
- 18.33 is_variant
- 18.34 moon_intensity
- 18.35 moon_phase
- 18.36 on_ground
- 18.37 on_ladder
- 19 Triggers
- 19.1 minecraft:on_death
- 19.2 minecraft:on_friendly_anger
- 19.3 minecraft:on_hurt
- 19.4 minecraft:on_hurt_by_player
- 19.5 minecraft:on_ignite
- 19.6 minecraft:on_start_landing
- 19.7 minecraft:on_start_takeoff
- 19.8 minecraft:on_target_acquired
- 19.9 minecraft:on_target_escape
- 19.10 minecraft:on_wake_with_owner
- 20 Built-in Events
- 21 Entities
- 22 Blocks
- 23 ステータス効果
- 24 Geometry
Version: 1.8.0-beta.1[編集 | ソースを編集]
This is documentation for a beta release of Minecraft. New component names and parameters, and parameter changes for old components in this release are not final and might change before the final release. Make sure to check the documentation once the release is out of beta if your add-on isn't working properly
This section contains the latest documentation for the new Add-on features of the 1.8.0-beta.1 release of Minecraft:
Client Entity Documentation[編集 | ソースを編集]
This document contains a walkthrough on how to create new client entity definitions in Minecraft.
Overview[編集 | ソースを編集]
The schema should follow the current Minecraft JSON paradigms:
- Fields should be lower-case and use underscores (no spaces)
- Field values should be direct where possible (floats should be just the float, not a string)
- All JSON files in the "entity" directory are required for the entity to render in the world
For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use this feature in Resource Packs.
Getting Started[編集 | ソースを編集]
New client entity definitions are contained within a Resource Pack.
Entity[編集 | ソースを編集]
To start, create a new folder and name it "entity" inside the root of the Resource Pack. In the entity folder create a JSON file and give it a name. The JSON file needs a format version and minecraft:client_entity information.
Important For the October Technical Preview the format version needs to be 1.8.0.-beta.1. This allows the client entity definitions JSON to be used when using the Experimental Gameplay toggle.
Example client entity definitions JSON for the pig
{ "format_version": "1.8.0-beta.1", "minecraft:client_entity": { "description": { "identifier": "minecraft:pig", "materials": { "default": "pig" }, "textures": { "default": "textures/entity/pig/pig", "saddled": "textures/entity/pig/pig_saddle" }, "geometry": { "default": "geometry.pig" }, "animations": { "setup": "animation.pig.setup", "walk": "animation.quadruped.walk", "look_at_target": "animation.common.look_at_target", "baby_transform": "animation.pig.baby_transform" }, "animation_controllers": [ { "setup": "controller.animation.pig.setup" }, { "move": "controller.animation.pig.move" }, { "baby": "controller.animation.pig.baby" } ], "render_controllers": [ "controller.render.pig" ], "locators": { "lead": { "head": [ 0.0, 14.0, -6.0 ] } }, "spawn_egg": { "texture": "spawn_egg", "texture_index": 2 } } } }
The minecraft:client_entity section contains the description for the entity. Under description there are a number of things that you can set about an entity. Generally, this file is defining what resources a mob requires and gives a friendly name to each, that the other definition files can use.
Identifier[編集 | ソースを編集]
The identifier is used to register the entity with the server. In the Client Entity Definitions JSON the identifier sets the appearance of the entity (materials, textures, geometry, etc.) The matching identifier in the Entity Behavior JSON in the Behavior Pack is what gives the entity its behaviors.
min_engine_version[編集 | ソースを編集]
When present, players can set the min version needed to allow the JSON to be parsed. The version in the definition is compared to the engine version for which the top resource pack was built. If a definition's min_engine_version is newer than that pack's engine version then the definition is not parsed.
Multiple definition files may use the same identifier, in which case only one of those definitions will be loaded. The definition with the same or closest and not greater min_engine_version, as compared to the top resource pack's engine version, will be parsed; all other definitions with the same identifier will not be parsed.
This can be useful for continuing to support an older version of an entity, when an older resource pack is used at the top of the resource pack stack, while also supporting a newer version of the entity in all other cases.
Materials, Textures, and Geometry[編集 | ソースを編集]
Players can set the materials, texture and geometry used for the entity in this section. Players can set one or more materials, textures, and geometries that can be used by the mob. Players must set user defined names for them. These names are used in the Render Controllers JSON. Players can reference materials, textures, and geometry from the vanilla Minecraft Resource Pack or create their own. Custom materials, textures, and geometry should be in the corresponding folder at the root of the Resource Pack.
Scripts[編集 | ソースを編集]
Scripts allow players to use MoLang to compute calculations once and store that value. This value than can be used over and over again without the need to constantly recompute the calculations. Scripts currently support pre-animation and scale. More script types will be added later.
- Pre-animation scripts are evaluated immediately before animations are processed.
- Scale sets the scale of the mob's geometry.
Example pre-animation script for cod
"scripts": { "pre_animation": [ "Entity.ZRot == !Entity.IsInWater ? Math.cos((Entity.Member.TimeStamp + Params.FrameAlpha) * 14.32) * 90 : 0.0;", "Entity.AnimationAmountBlend == Math.lerp(Entity.AnimationAmountPrev, Entity.AnimationAmount, Params.FrameAlpha);" ] },
Example scale script for the bat
"scripts": { "scale": "0.35" },
Animation[編集 | ソースを編集]
Allows the player to assign names to reference the long name for animations. These names are used by the animation controller JSON. Players can reference animations from the vanilla Minecraft Resource Pack or create their own. Custom animations should be in the animation folder at the root of the Resource Pack.
Animation controllers[編集 | ソースを編集]
Animation controllers decide which animations to play when. Each Controller contains a list of states that play one or more animations. Allows the player to assign names to reference the long names for animation controllers. Names are required and need to be unique from all other names in the animation controllers for that mob. Players can reference animation controllers from the vanilla Minecraft Resource Pack or create their own. Custom animation controllers should be in the animation_controllers folder at the root of the Resource Pack.
Particle[編集 | ソースを編集]
Allows the player to assign a key to reference the long name for particles. When these are present, the particle is created when the entity is spawned. keys are required and need to be unique from all other keys in the animation controllers. Players can reference particles from the vanilla Minecraft Resource Pack or create their own. Custom particles should be in the particle folder at the root of the Resource Pack.
Render Controllers[編集 | ソースを編集]
Specifies the names of render controllers. This name needs to match the name of a corresponding JSON located in the Render Controllers folder. Players can reference Render Controllers from the vanilla Minecraft Resource Pack or create their own. Custom Render Controllers should be in the textures folder at the root of the Resource Pack.
Locators[編集 | ソースを編集]
Locator offsets are specified in model space. An example of a locator is the "lead" locator used to specify where the lead will attach to graphically.
Example
"locators": { "lead": { "head": [ 0.0, 14.0, -6.0 ] } }
Enable_attachables[編集 | ソースを編集]
This determines if the entity can equip attachables when this is set to true. This allows the entity to render armor.
Example
"enable_attachables": true
Spawn Egg[編集 | ソースを編集]
This sets the color or texture used for the entity Spawn Egg. There are 2 ways to do this. The first is to use the hex value for the base color and the overlay color.
Example Spawn Egg using hex value
"spawn_egg": { "base_color": "#53443E", "overlay_color": "#2E6854" }
The other way is to specify a texture.
Example Spawn Egg specifying a texture. The texture is located in the "items_texture" JSON in the textures folder of the Resource Pack. When there are more than one texture associated with a texture name you can use an index to pick the one that you want. If no index is specified than it is assumed to be 0 and the first texture in the list is used.
"spawn_egg": { "texture": "spawn_egg", "texture_index": 2 }
Data Driven Animation Documentation[編集 | ソースを編集]
This document contains a detailed explanation of the Data Driven Animation system for Minecraft.
Overview[編集 | ソースを編集]
The scheme should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – All JSON files in the definitions directory and subtree will be read into and interpreted by the animation system – For the October Technical Preview, you will need to enable the "Use Experimental Gameplay" option in the world
Getting Started[編集 | ソースを編集]
There are a number of new directories in resource packs with the addition of animations. – resource_pack_root\ – animation_controllers – animations – entity
Animations are stored in the 'animations' folder of a resource pack in a .json format, and referenced by the entity's .json definition file. Resource packs on the stack will overwrite previously specified animations of the same name in stack order (top overwriting bottom). They can be organized in any number of files with any names (ending in .json).
Adding Animations[編集 | ソースを編集]
In order to define what animations an entity has, you must add both animations and animation controllers to an entity's entity definition file.
Here you can see the entity definition for pig.json:
{ "format_version": "1.8.0-beta.1", "minecraft:client_entity": { "description": { "identifier": "minecraft:pig", "materials": { "default": "pig" }, "textures": { "default": "textures/entity/pig/pig", "saddled": "textures/entity/pig/pig_saddle" }, "geometry": { "default": "geometry.pig" }, "animations": { "setup": "animation.pig.setup", "walk": "animation.quadruped.walk", "look_at_target": "animation.common.look_at_target", "baby_transform": "animation.pig.baby_transform" }, "animation_controllers": [ { "setup": "controller.animation.pig.setup" }, { "move": "controller.animation.pig.move" }, { "baby": "controller.animation.pig.baby" } ], "render_controllers": [ "controller.render.pig" ], "locators": { "lead": { "head": [ 0.0, 14.0, -6.0 ] } }, "spawn_egg": { "texture": "spawn_egg", "texture_index": 2 } } } }
Note: the walk animation for pig is the same for cows and sheep, and thus uses animation.quadruped.walk instead of defining its own. This means you will not see the move animation in the pig.json animation file either. If you would like to make a custom pig walk you can change this line to point to your custom animation.
Animations are specified as a short name, followed by their full name. The short name is used in the animation controller, while the long name is used in the animations file.
Animation Controller[編集 | ソースを編集]
One needs to be able to control how animations are played, when, and how they interact with other animations. Animation controllers allow for blending of multiple animations based on parameters such as those exposed by the entity (eg: ground speed, rotation speed, etc).
Here is Pig's animation controller:
{ "format_version": "1.8.0-beta.1", "animation_controllers": { "controller.animation.pig.setup": { "states": { "default": { "animations": { "setup": {} } } } }, "controller.animation.pig.baby": { "states": { "baby": { "parameters": [ "Entity.Flags.BABY" ], "animations": { "baby_transform": [ { "0.0": 0.0, "1.0": 1.0 } ] } } } }, "controller.animation.pig.move": { "states": { "default": { "parameters": [ "Entity.Member.WalkSpeed" ], "animations": { "walk": [ { "0.0": 0.0, "1.0": 1.0 } ], "look_at_target": {} } } } } } }
Animations[編集 | ソースを編集]
At the beginning of each frame, the skeleton is reset to its default pose from its geometry definition and then animations are applied additively in order.
Here is an example from pig.json in the vanilla resource pack's animation folder:
{ "format_version": "1.8.0-beta.1", "animations": { "animation.pig.setup": { "loop": true, "bones": { "body": { "rotation": [ "-this", 0.0, 0.0 ] } } }, "animation.pig.idle": { "loop": true, "bones": { "head": { "rotation": [ "Math.cos(Params.{{code|AnimTime * 38}}.17) * 2.0 + Math.cos(Params.{{code|AnimTime * 27}}.0) * 2.0", "Math.cos(Params.{{code|AnimTime * 15}}.1) * 4.0", 0.0 ] } } }, "animation.pig.baby_transform": { "loop": true, "bones": { "head": { "scale": 2.0, "position": [ 0.0, 8.0, 4.0 ] } } } } }
Here is a small example from sheep.animation.json:
{ "animation.sheep.grazing": { "bones": { "head": { "position": { "0.0": [ 0.0, 0.0, 0.0 ], "0.2": [ 0.0, 9.0, 0.0 ], "1.8": [ 0.0, 9.0, 0.0 ], "2.0": [ 0.0, 0.0, 0.0 ] }, "rotation": { "0.2": { "pre": [ 36.0, 0.0, 0.0 ], "post": [ "180.0 * (0.2 + 0.{{code|07 * Math}}.Sin(Params.{{code|KeyFrameLerpTime * 1644}}.39))", 0.0, 0.0 ], }, "1.8": { "pre": [ "180.0 * (0.2 + 0.{{code|07 * Math}}.Sin(Params.{{code|KeyFrameLerpTime * 1644}}.39))", 0.0, 0.0 ], "post": [ 36.0, 0.0, 0.0 ] } } } } } }
- Note that animation data can be either raw data:
"rotation": [90.0, 0.0, 0.0] // by default, if three values are specified, then values are in degrees, in euler X then Y then Z format "rotation": [0.373, 0.577, 0.687, 0.235] // if four values are specified, then values represent a quaternion. This behavior is overrideable per component
- or a run-time interpreted script:
"rotation": [ "cos(Params.{{code|AnimPos * 38}}.17) * 80.{{code|0 * Params}}.AnimSpeed", 0.0, 0.0 ]
Animation Hierarchy[編集 | ソースを編集]
- Animations are channel based (rotation, position, or scale), and within that, they are key-framed:
EntityAnimation
animation nameBoneAnimation []
bone name to animation for this animationAnimationChannel []
rotation, scale, or translation to animateKeyFrame []
the value for the channel to be at, at a specific time
All of the above concepts are described in a detailed, bottom-up approach below
Names[編集 | ソースを編集]
- All names: animations, bones, states, etc, must all start with a letter and contain only alphanumerics, underscore, or period.
- All lower case letters is recommended.
Transforms[編集 | ソースを編集]
- For each of scale, rotation, position, one can set the fields individually or uniformly with a single value. For example, these are equivalent.
"scale": [2.0, 2.0, 2.0] "scale": 2.0 "scale": [2.0]
- To clarify order of operations, vertices are scaled, rotated, then translated.
- Animation data is assumed to be hierarchical, and is applied to a bone by name matching the bone name in the animation data to the targeted geometry's skeleton.
- Not every bone needs to be animated
- You can animate bones that don't exist in the targeted geometry (missing bones are ignored).
Scripting vs Raw Data[編集 | ソースを編集]
When specifying a transform (scale, rotation, or position), one can specify either a specific value, or a script:
"position": [3.0, 10.0, 2.0] "position": [3.0, "10.
0 * Math
.cos(Params.AnimTime * Math
.Pi + 3.3)", 2.0]
Scripting Language[編集 | ソースを編集]
- Refer to the MoLang documentation for details on scripting
- Note: when scripting rotations, it is assumed that angles are in degrees.
Parameters and Member Variables[編集 | ソースを編集]
- There are a few parameters currently exposed to all scripts to help control animation:
Parameters[編集 | ソースを編集]
Name Meaning Params.AnimTime
time into this animation Params.DeltaTime
time since this animation was last updated Params.KeyFrameLerpTime
amount of blending between key frames from 0.0 === start key frame
to1.0 === end key frame
Params.LifeTime
time since this entity was created
Member Variables[編集 | ソースを編集]
Name Meaning Entity.Member.Variant
The variant this Entity is (eg. which cat/horse texture) Entity.Member.YawSpeed
How fast this Entity is turning (in degrees) Entity.Member.WalkSpeed
How fast this Entity is moving
- See the Animation Controller section below for details on how these are used
Entity Flags[編集 | ソースを編集]
- Animation scripts can query the current entity for any entity flag such as ONFIRE, ISBABY, GLIDING, etc. See Entity.h for the complete up-to-date list. These are boolean values that can be used to affect the animation via the ?: operator.
For example, changing the position of a bone based on whether the Mob is a baby or not:
"position": [ 0.0, "EntityFlag::BABY ? -8.0 : 0.0", "EntityFlag::BABY ? 4.0 : 0.0" ]
- For a full list of Entity Flags, please refer to the Entity Flags List
Channels (rotation, position, scale)[編集 | ソースを編集]
- The engine tracks the animation of rotation, position, and scale separately.
- Within a channel, one or more key frames are specified at arbitrary times, in seconds, from the start of the animation.
- If no key frames are specified, a single key frame is created at t==0.0 and all channel data is stored within that key frame.
Entity Animation Format[編集 | ソースを編集]
- The json format for an animation is as follows:
Note Matching the geometry format, units are in 1/16ths of meters.
"<animation_name>": { // optional "loop": <bool> // default == false. Should the animation loop back to t==0.0 when it finishes? "blend_weight": <expression> // default == "1.0". How much this animation is blended with the others. 0.0 == off. 1.0 == fully apply all transforms. Can be an expression – see the Animation Controller section below "animation_length": <float> // default == time of last key frame. At what time does the system consider this animation finished? "override_previous_animation": <bool> // default == false. Should the animation pose of the bone be set to the bind pose before applying this animation, thereby overriding any previous animations to this point? // required "bones": [ { "<bone_name>": { // must match the name of the bone specified in the geometry skeleton // various flavours of setting data // omitting a channel skips that channel for this animation of this bone // any number of floats below can be replaced by a string expression as described above; you don't have to replace all the floats on a line with expressions, only the ones you want to be expression-based "position": 1.0, // set x, y, and z to 1 "position": [1.0], // set x, y, and z to 1 "position": [1.0, 2.0, 3.0], // set x==1 , y==2 , and z==3 "rotation": 45.0, // set x, y, and z to 45 degrees "rotation": [45.0], // set x, y, and z to 45 degress "rotation": [30.0, 0.0, 45.0], // set x, y, and z to the respective values (in degrees) "rotation": [0.373, 0.577, 0.687, 0.235], // set x, y, z, and w to the respective values (in radians) // note: only uniform scaling is supported at this time "scale": 2.0, // scales the bone by 2.0 "scale": [2.0], // scales the bone by 2.0 // Key frame data is described below // Note that any of the above styles of values will work for "pre" and "post", and "pre" does not have to have the same format as "post" "rotation": { "0.0": [80.0, 0.0, 0.0], "0.1667": [-80.0, 0.0, 0.0], "0.333": [80.0, 0.0, 0.0] } // For discontinuous channel curve, you can specify a different value when interpolating to/from this key frame "rotation": { "0.3": { // the key field is the time stamp for this key frame : the value can be any of the above examples "pre": [30.0, 0.0, 45.0], // when interpolating towards this keyframe from the previous, use this value "post": "180.{{code|0 * Math}}.Sin(Params.KeyFrameLerpTime)" // when interpolating away from this key frame to the next, use this value } } // another example "rotation": { "0.0": [80.0, 0.0, 0.0], // start at an x rotation of 80 degrees "0.4": { "pre": [80.0, 0.0, 0.0], // stay at 80 until 0.4 seconds have elapsed "post": [0.0, 0.0, 0.0], // discontinuously pop the x rotation to 0.0 degrees }, "0.8": [-80.0, 0.0, 0.0] // using the previous frame's lerp mode, lerp to a x rotation of -80 degrees by 0.8 seconds } } } ]
Key Frames[編集 | ソースを編集]
- A key frame defines two values for a channel-specific transform to a specific bone at a specified time, one as time approaches the key frame time, and the second from that key frame time onwards.
- As such, when interpolating between two key frames, one can define the slope of the animation curve in either a continuous or discontinuous manner.
Interpolation[編集 | ソースを編集]
- Key frame "pre" and "post" settings allow for controlling the interpolation curve at a key frame.
- For interpolation, currently only linear is supported – Key frames do not need to be specified in order in the json. They will be sorted by time on import.
Continuous Example – This example spins the bone "head" around the y axis 1 rotation in 1 second. – Note that because interpolation is linear, at .25 seconds the head will be rotated to 90 degrees.
"head": { "rotation": { "0.0":[0, 0, 0], "0.5": [ 0, 180, 0], "1.0": [0, 360, 0] } }
Discontinuous Example – Discontinuous just means that there won't be a smooth transition between key frames. It is useful if you want something to happen immediately. – This example scales the bone "head" – From 0 to 0.5 seconds (in the "pre" tag), the head bone is set to its normal scale of 1 in all dimensions [X, Y, Z] – At 0.5 seconds, the bone will instantly scale up to 2 times its normal size and then – From 0.5 to 1 second ("post"), the bone will re-scale back to its normal size of scale of 1 in all dimensions
"head": { "scale": { "0.5": { "pre": [ 1, 1, 1 ], "post": 2.0 } "1.0": [ 1.0 ] } }
Note In the larger example above of the file format, "pre" and "post" can also be defined by a MoLang expression that calculates that value at runtime. Allowing you to have a mathematically defined curve instead of being purely linear.
Animation Controllers[編集 | ソースを編集]
- Animation controllers decide which animations to play when.
- Each Controller contains a list of states that play one or more animations
- Each animation can be blended based on one or more parameters.
- Controller files are stored as json in the resource pack's definitions/animation_controllers folder.
- The format is as follows:
"<controller_name>": { "states": { "<state_name>": { "parameters": [ <parameter 0 script>, ... ], // optional "animations": { "<animation 0 name>": [ { "min": 0.0, // optional "peak": 0.1, "max": 0.3 // optional } ], ... }, "transitions": [ { "<target_state_name>", "<expression>" }, ... ] }, ... } },
States[編集 | ソースを編集]
- A controller contains n states. A state defines how one or more animations interact with zero or more parameters.
- Each state has an optional parameters section, listing any number of parameters used by the animations to control their blending
- Each state also has one or more animations, using the name given in the entity's definition json
State Parameters[編集 | ソースを編集]
- Parameters are either set by the game or by a user defined script that can be found in the entity definition json found in definitions/entity/<entityname>.json
- For Example:
"animation.controller.pig.move": { "states": { "default": { "parameters": [ "Params.GroundSpeed" ], "animations": { "walk": [ { "0.0": 0.0, "2.3": 1.0, } ] } } } }
- This defines a controller with a single state
default
that references the entity's ground speed (in metres per second). - It will play one animation
walk
that will blend from 0.0 to 1.0 as the ground speed increases from stopped to 2.3 m/s. - If the ground speed is greater than 2.3 m/s, the walk blend value will remain at 1.0.
- If the ground speed is 0.0, the blend value will be 0.0 and the animation will be skipped.
- If we change the example to this:
"controller.animation.pig.move": { "states": { "default": { "parameters": [ "Params.GroundSpeed" ], "animations": { "idle": [ { "0.0": 1.0, "0.1": 0.0 } ], "walk": [ { "0.1": 0.0, "2.7": 1.0, "3.88": 0.0 } ], "run": [ { "2.7": 0.0, "3.88": 1.0 } ] } } } }
- If pig is stopped it will play the
idle
animation. - As the pig's speed increases to 0.1 m/s, the
idle
animation will be faded out. - As the pig's speed goes from 0.0 to 2.7 m/s, the
walk
animation will be blended in from 0.0 to 1.0. - As the pig's speed goes from 2.7 to 3.88 m/s, the
walk
animation will be blended out from 1.0 to 0.0 and therun
animation will be blended in from 0.0 to 1.0 - Any speed higher than 3.88 m/s will simply play the run animation at a blend value of 1.0.
User Defined Script[編集 | ソースを編集]
Example In definitions\entity\tiger.json:
{ "custom:tiger":{ "scripts":{ "pre_animation": { //determine these values before the animation happens each frame "Entity.foo == Math.sin(Params.LifeTime)" } } } }
This script will set foo to the result of the sin of Params.LifeTime to later be used in the animation or animation controller. Note: "pre_animation" tells the script to figure out the values of those variables once a frame, before animation occurs, so that the animation can use those values in their own formulas. If a variable didn't exist, it will create a new variable and its default value will be 0.0
"controller.animation.tiger.move": { "states": { "default": { "parameters": ["Entity.foo"], "animations": { //animations are ADDITIVE unless otherwise specified //in this case, base_pose will always be playing in the default state //walk will play as well if Entity.foo is greater than 0.0 "base_pose": {}, "walk": [ { "0.0": 0.0, //play none of the walk animation if foo is "0.0" "1.0": 1.0 //play the walk animation fully blended if foo is "1.0" } ] } } } }
Note that because foo is equal to a sin wave, that its values will range from -1 to 1. This means that you will have a period from 0 to -1 to 0 where only "base_pose" will play and then an equal amount of time where Walk will play on top of base_pose as foo goes from 0 to 1 back to 0. Base_pose will have a blend value of 1.0.
Zero parameters[編集 | ソースを編集]
- A controller with zero parameters will simply play its animation(s).
Multi-parameter blending[編集 | ソースを編集]
- If the controller has multiple parameters, the resulting blend values are simply multiplied together. If you want a turn animation to play if a pig is turning, but fade it out if the pig is moving:
"animation.controller.pig.move": { "states": { "default": { "parameters": [ "Params.YawSpeed", "Params.GroundSpeed" ], "animations": { "turn_right": [ { // this first entry maps to parameter 0 (YawSpeed in this example) "0.0": 0.0, "90.0": 1.0 }, { // the second entry maps to parameter 1 (GroundSpeed in this example) "0.0": 1.0, "1.2": 0.0 } ] } } } }
- Blend in the
turn_right
animation from 0.0 to 1.0 as the yaw speed increases from 0.0 to 90.0 degrees / second. - Scale that value by 1.0 to 0.0 as the ground speed increases from 0.0 to 1.3 m/s.
- So if the pig is standing still, the first parameter will result in a blend weight of 0.0 and the second will be 1.0, which, when multiplied together gives 0.0.
- If the pig is rotating at 90.0 degrees per second, the first will be 1.0 and the second will be 1.0, so the turn animation will be blended at 1.0.
- If the pig is turning at 30.0 degrees per second and moving forwards at 0.9 m/s, the first will be 0.333, the second will be 0.75, so the turn animation will be weighted by 0.25.
State Transitions[編集 | ソースを編集]
- A state can specify any number of transition scripts, listed in order.
- Each transition has a target state to switch to, and a script for whether it should switch or not.
- For each transition in order, evaluate the script, and if it returns non-zero, switch to the specified state immediately.
- Only one transition will be processed per frame.
"<controller_name>": { "states": { "<state_name>": { }, "transitions": [ // Evaluate the below expressions in order. // The first to return non-zero is the state to transition to. // If all are zero, then don't transition. { "<target_state_name>", "<expression>" }, ... ] }, ... }
- For example:
"controller.animation.tiger.move": { "states": { "default": { "parameters": [ "Entity.WalkBlendAmount" ], "animations": { //animations are ADDITIVE unless otherwise specified //in this case, base_pose will always be playing in the default state //walk will play as well if Entity.WalkBlendAmount is greater than 0.0 "base_pose": {}, "walk": [ { "0.0": 0.0, //play none of the walk animation if WalkBlendAmount is "0.0" "1.0": 1.0 //play the walk animation fully if WalkBlendAmount is "1.0" } ] }, "transitions": [ { "angry" : "Entity.Flags.ANGRY" // transition to angry state if the ANGRY flag is true } ] }, "angry": { "animations": { "prowl": {} // play the prowl animation in the angry state }, "transitions": [ { "default" : "!Entity.Flags.ANGRY" } // transition back to default state if the ANGRY flag is false ] } } }
Entity Flags[編集 | ソースを編集]
- Entity Flags are boolean variables set by the engine under different circumstances.
- They are able to be used in MoLang expressions
- Useful for controlling things like, changing position/textures/ animations if a mob is a baby. For example:
Example of changing position of a bone if the Mob is a baby or not:
"position": [ 0.0, "EntityFlag::BABY ? -8.0 : 0.0", "EntityFlag::BABY ? 4.0 : 0.0" ]
List of Entity Flags:[編集 | ソースを編集]
Name True IF ONFIRE
Mob is on fire SNEAKING
Mob is Sneaking (i.e. players and ocelots) RIDING
Player/ Mob is riding another Mob SPRINTING
Mob is Sprinting USINGITEM
Mob is using an item (i.e. players eating food, or players and witches using potions) INVISIBLE
Mob is invisible/ affected by Invisibility potion effect TEMPTED
Mob is tempted by a food item INLOVE
Mob is in its "Love" state by being fed it's tempt item SADDLED
Mob has a saddle on its back (i.e. pigs and horses) POWERED
If mob is charged (i.e. Creeper's blue shield). Added via minecraft:charged component IGNITED
If a mob is ignited. Added through the is_ignited and explode components BABY
Mob is a baby CRITICAL
when a critical attach is achieved (i.e. when the player firs a fully charged bow or gets a critical melee attach this causes the particles to play WALLCLIMBING
Mob is currently climbing a wall (i.e. spiders) CANCLIMB
Mob is able to climb CANSWIM
Mob is able to swim CANFLY
Mob is able fly CANWALK
Mob is able to walk RESTING
Pet sleeping with its owner or boat is resting SITTING
Mob is currently sitting (i.e. dogs and cats) ANGRY
Mob is currently angry (i.e. wolves that been hit, zombie pigman once hit). Added via the minecraft:angry component INTERESTED
Mob is attracted to food the player is holding food they like (added via the minecraft:behavior.beg.) (i.e. tamed wolf sits and turn its head) CHARGED
This is set on a mob by the charge_charged_trigger parameter on the minecraft:behavior.ranged_attack component (i.e. the blaze's fireball attack) TAMED
If Mob is currently tamed (i.e. Dogs use this to draw their collars) ORPHANED
Pets that have lost their owners. LEASHED
Mob currently has a leash on it. SHEARED
Mob has been sheared. Set with the Minecraft:sheared component GLIDING
Player is gliding (using elytra) ELDER
If the Mob is an elder version (only used on Elder Guardian) MOVING
Mob is currently swimming through water BREATHING
if false, HUD bubbles render (water only) CHESTED
If the Mob has a chest on them (i.e. Horses and Donkey chests) STACKABLE
Used on minecarts and boats so that they don't collide through each other. Set via minecraft:stackable component STANDING
Mob is stomping (i.e. zombie's minecraft:behavior.stomp_turtle_egg, or Horses and the player jumping ) SHAKING
When Mobs shake off water (i.e. Wolves shaking off water when wet from swimming/rain IDLING
Used when the Agent is idling CASTING
Mob is casting a spell. (i.e. Evoker animation of arms in air and to have particles play next to its hands) CHARGING
Mob is using a charge attack (i.e. the vex's charge attack) WASD_CONTROLLED
When the mob is being controller by a player riding it CAN_POWER_JUMP
Mob can power jump (added with the minecraft:can_power_jump component LINGERING
Used on potions that are thrown to know it creates a lingering effect. HAS_COLLISION
Used to indicate if a mob can collide with things HAS_GRAVITY
if a Mob is affected by gravity (set by minecraft:physics component) FIRE_IMMUNE
If the mob has minecraft:fire_immune component or the fire resistance potion applied DANCING
When a mob is dancing (i.e. used by parrots to indicate they should dance) IS_TRANSFORMING
This flag is set by the minecraft:transformation component(i.e. Zombie villagers when they are transforming back to villagers) DAMAGENEARBYMOBS
Set by the player's spin attack using the Trident SWIMMING
True if the Mob is currently swimming BRIBED
Added when the mob is bribed (added through the minecraft:bribable component IS_PREGNANT
Set by some turtle behavior goals. Used to make pregnant turtles render larger LAYING_EGG
If the turtle is laying an egg RIDER_CAN_PICK
This is set by the "rider_can_interact" Parameter of the minecraft:rideable component.
Particle Documentation[編集 | ソースを編集]
This document contains a detailed walkthrough on how to create new particles in Minecraft.
Overview[編集 | ソースを編集]
The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – All JSON files in the "particle" directory and subtrees will be read into and interpreted by the particle system – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use the particle feature in Resource Packs
Getting Started[編集 | ソースを編集]
New particles are contained within a Resource Pack. To begin create a new folder named "particle" in the root of the Resource Pack that you want to add the new particle in. In the particle folder create a JSON file and give it a name. The JSON file needs a format and particle information.
Important For the October Technical Preview the format version needs to be 1.8.0.-beta.1. This allows the particle to be used when using the Experimental Gameplay toggle.
Particle Information contains the particles name, basic render parameters and a set of components. When giving the particle a name, namespacing should be used.
Naming – All particle effects should be namespaced – Namespacing involves adding a <name:> prefix on the effect tag – A name is required and is used to reference the particle from scripts, the particle /command, or a list of entities – All Vanilla Minecraft particles use the minecraft: namespace prefix
Basic render parameters Particle effects consist of basic render parameters and a set of components. The basic render parameters need to appear just after the version and contains a material and a texture. For materials there are 2 material types to choose from: – "particles_alpha" – "particles_opaque"
For textures, the particle system can use any particle that can be read by Minecraft. Components can be placed in any order, and know which category they belong in. Below is an example of a Smoke Puff particle. You can copy and paste this into your particle JSON to get started. Make sure you change the name if you are trying to create a new particle (instead of just replacing an old one.)
{ "format_version": "1.8.0-beta.1", "particles": { "minecraft:test_smoke_puff": { "basic_render_parameters": { "material": "particles_alpha", "texture": "textures/particle/particles" }, "components": { "minecraft:emitter_rate_instant": { "num_particles": 100 }, "minecraft:emitter_lifetime_once": { "active_time": 0 }, "minecraft:emitter_shape_sphere": { "radius": 0.1, "direction": "outwards" }, "minecraft:particle_initial_speed": "Math.random(0.0, 15.0)", "minecraft:particle_initial_spin": { "rotation": "Math.random(0, 360)", "rotation_rate": "Math.random(-300, 300)" }, "minecraft:particle_lifetime_expression": { "max_lifetime": "Math.random(1.0, 4.0)" }, "minecraft:particle_motion_dynamic": { "linear_acceleration": [ 0, 2.0, 0 ], "linear_drag_coefficient": 5, "rotation_drag_coefficient": 0.3 }, "minecraft:particle_appearance_billboard": { "size": [ "0.1 + Entity.{{code|ParticleAge * 0}}.3f", "0.1 + Entity.{{code|ParticleAge * 0}}.3f" ], "facing_camera_mode": "lookat_xyz", "uv": { "texturewidth": 128, "textureheight": 128, "flipbook": { "base_UV": [ 56, 0 ], "size_UV": [ 8, 8 ], "step_UV": [ -8, 0 ], "frames_per_second": 8, "max_frame": 8, "stretch_to_lifetime": true, "loop": false } } }, "minecraft:particle_appearance_tinting": { "color": [ "Entity.ParticleRandom1*0.5", "Entity.ParticleRandom1*0.5", "Entity.ParticleRandom1*0.5", 1.0 ] }, "minecraft:particle_appearance_lighting": {} } } } }
MoLang Integration[編集 | ソースを編集]
Where it makes sense, any field can use a MoLang expression (strings). Field will be the result of the MoLang string, cast to the expected type. In addition to the regular MoLang parameters, the Particle system uses some special parameters that particle MoLang expressions can use:
Name Meaning Entity.ParticleLifetime
How long the particle lives for Entity.ParticleAge
How long the particle has lived Entity.ParticleRandom1
A random from 0.0 to 1.0 that is constant for the lifetime of the particle Entity.ParticleRandom2
Another random from 0.0 to 1.0 that is constant for the lifetime of the particle Entity.EmitterLifetime
How long the current loop lasts for the emitter Entity.EmitterAge
Age since the current loop started for the emitter Entity.EmitterRandom1
A random from 0.0 to 1.0 that is constant for the current loop of the emitter Entity.EmitterRandom2
Another random from 0.0 to 1.0 that is constant for the current loop of the emitter
When a component field is for an emitter, then the special parameters are for the emitter itself. When a component field is for a particular particle, then the special parameters are for that particle only.
For example, Lifetime means how long the emitter has been alive, or how long the particle has been alive.
Particles Components[編集 | ソースを編集]
This is the documentation for the attributes properties, and components available to use in particle JSON files. Below is a list of components that can be used in the particle JSON files.
Emitter Initial State Components[編集 | ソースを編集]
minecraft:emitter_local_space This component specifies the frame of reference of the emitter.
Parameters
Type Name Default Value Description Bool position false When true, particle will simulate in entity space, otherwise it will simulate in world space Bool rotation false When true, particle will simulate in entity space, otherwise it will simulate in world space
Emitter Rate Components[編集 | ソースを編集]
minecraft:emitter_rate_instant This component causes all the particles to come out at once. The particles do not come out again unless the emitter loops.
Parameters
Type Name Default Value Description Float, MoLang num_particles
10 The number of particles that are emitted at once
minecraft:emitter_rate_steady This component causes the particles to come out at a steady rate over time.
Parameters
Type Name Default Value Description Float, MoLang spawn_rate
1 The number of particles that are emitted per second Float, MoLang num_particles
50 Maximum number of particles that can be active at once for this emitter
minecraft:emitter_rate_manual This component has particle emission only occur when the emitter is told to emit through code. This is used for legacy particle effects and should not be added to new particles.
Type Name Default Value Description Float, MoLang max_particles
50 The max number of particles emitted
Emitter Lifetime Components[編集 | ソースを編集]
minecraft:emitter_lifetime_looping This component causes the emitter to loop until the component is removed
Parameters
Type Name Default Value Description Float, MoLang active_time
10 The emitter will emit particles for this time per loop Float, MoLang sleep_time
0 The emitter will pause emitting particles this time per loop
minecraft:emitter_lifetime_once This component causes the emitter to execute once. When the lifetime ends or the number of particles allowed to emit is reached the emitter expires.
Parameters
Type Name Default Value Description Float, MoLang active_time
10 The emitter will emit particles for this time per loop
minecraft:emitter_lifetime_expression This component turns an emitter on when there is a non-zero value. The emitter turns off when there is a zero value. This component is used when controlling an entity attached emitter.
Parameters
Type Name Default Value Description Float, MoLang activation_expression
1 When the value is non-zero the emitter emits particles Float, MoLang expiration_expression
0 When the value is non-zero the emitter expires
Emitter Shape Components[編集 | ソースを編集]
Shape controls both where the particles are emitted from and the initial direction of the particles.
minecraft:emitter_shape_point This component causes all particles emerge from a point that is offset from the emitter.
Parameters
Type Name Default Value Description (Float, MoLang), (Float, MoLang), (Float, MoLang) offset 0, 0, 0 Specifies an offset from the emitter to emit the particles (Float, MoLang), (Float, MoLang), (Float, MoLang) direction 0, 0, 0 Specifies the direction of the particles
minecraft:emitter_shape_sphere This component causes all particles to come out of a sphere from an offset from the emitter.
Parameters
Type Name Default Value Description (Float, MoLang), (Float, MoLang), (Float, MoLang) offset 0, 0, 0 Specifies an offset from the emitter to emit the particles radius 1 Specifies the radius of the sphere Bool surface_only
false Cause the particles to emit only from the surface of the sphere (Float, MoLang), (Float, MoLang), (Float, MoLang) direction outwards Specifies the direction of the particles. Defaults to outwards, but players can specify inwards or give an x, y, z value
minecraft:emitter_custom_shape This component allows players to create a custom shape for the particle
Parameters
Type Name Default Value Description (Float, MoLang), (Float, MoLang), (Float, MoLang) offset 0, 0, 0 Specifies an offset from the emitter to emit the particles (Float, MoLang), (Float, MoLang), (Float, MoLang) direction Specifies the direction of the particles
minecraft:emitter_shape_entity_aabb This component causes all particles to come out of the aabb for the attached entity. If there is no entity then it comes out of the emitter point.
Parameters
Type Name Default Value Description (Float, MoLang), (Float, MoLang), (Float, MoLang) direction 0, 0, 0 Specifies the direction of the particles
Particle Initial State Components[編集 | ソースを編集]
minecraft:particle_initial_spin This component starts the particle with a specified rotation and rotation rate.
Parameters
Type Name Default Value Description Float, MoLang rotation 0 Specifies the initial rotation in degrees Float, MoLang rotation_rate
0 Specifies the spin rate in degrees per second
minecraft:particle_initial_speed This component starts the particle with a specified speed. Component uses the direction specified by the emitter shape. The speed can be defined by a float or MoLang with a default value of 0.
Particle Motion Components[編集 | ソースを編集]
minecraft:particle_motion_dynamic This component specifies the dynamic properties of the particle. This determines what forces affects the particle. The dynamic properties alters the velocity of the particle (Affects the speed and direction of the particle.) Direction is always the direction of the velocity.
Parameters
Type Name Default Value Description (Float, MoLang), (Float, MoLang), (Float, MoLang) linear_acceleration
0, 0, 0 Specifies the initial rotation in degrees Float, MoLang linear_drag_coefficient
0 Specifies the amount of drag that is applied to the particle. The higher the value the more drag that is applied to the particle Float, MoLang rotation_acceleration
0 Specifies the amount of rotation speed that's applied to the particle. Rotation slows down over time. Float, MoLang rotation_drag_coefficient
0 Specifies the amount of drag that is applied to particle rotation. The higher the value the more drag that is applied to particle rotation.
minecraft:particle_motion_parametric This component is used to directly control the particle. If a specific position is applied then velocity is ignored.
Parameters
Type Name Default Value Description (Float, MoLang), (Float, MoLang), (Float, MoLang) relative_position
0, 0, 0 (Float, MoLang), (Float, MoLang), (Float, MoLang) direction 0, 0, 0 Specifies the 3D direction of the particle Float, MoLang rotation 0 Specifies the rotation of the particle
minecraft:particle_motion_collision This component enables collision between blocks and the particle. The particle will not have collision if this particle doesn't exist.
Parameters
Type Name Default Value Description Bool, MoLang enabled true enables the collision when the value is true Float collision_drag
0 Specifies the amount of drag that is applied to a particle when it collides with a block Float coefficient_of_restitution
0 Specifies the amount of bounce the particle has when it collides (value between 0.0-1.0) Float collision_radius
Used to minimize the interpenetration of the particles with the environment. This must be less than or equal to 1/2 block
Particle Appearance Components[編集 | ソースを編集]
minecraft:particle_appearance_billboard This component specifies the size and facing mode for the particle. If this component isn't specified then all particles will aim upwards.
Parameters
Type Name Default Value Description (Float, MoLang), (Float, MoLang) size Specifies the x and y size of the billboard 文字列 face_camera_mode
A string used to determine the orientation of the billboard
StringsString Description rotate_xyz
Aligned to the camera, perpendicular to the view axis rotate_y
Aligned to the camera, but rotating around the world on the Y axis lookat_xyz
Aimed at the camera, biased toward world y up lookat_y
Aimed at the camera, but rotating around the world on the Y axis direction Billboard is aligned perpendicular to the direction vector
uv Specifies the UVs for the particle Type Name Default Value Description int texturewidth 1 Specifies the assumed texture width of the particle int textureheight 1 Specifies the assumed texture height of the particle [Float/MoLang], Float/MoLang] uv Assuming the texture width and height use these uv coordinates [Float/MoLang], Float/MoLang] uv_size
flipbook Specifies a flipbook animation Parameters
Type Name Default Value Description [Float, Float] base_UV
Specifies the upper-left corner of the UV patch [Float, Float] size_UV
Specifies the size of the UV patch [Float, Float] step_UV
Specifies how far to move the UV patch each frame Float frames_per_second
Specifies the default frames per second Float max_frame
Specifies the maximum frame number (with the first frame being frame 1) Bool stretch_to_lifetime
false Adjusts the Frames per Second to match the lifetime of the particle (optional) Bool loop false Loops the animation when it reaches the end (optional)
minecraft:particle_appearance_tinting This component specifies the color of the vertices of the billboard
Parameters
Type Name Default Value Description (Float, MoLang), (Float, MoLang), (Float, MoLang), (Float, MoLang) color 1, 1, 1, 1 Specifies the color of the vertices of the billboard
minecraft:particle_appearance_lighting When this component is present, particles will be tinted by local lighting conditions in-game.
Particle Lifetime Components[編集 | ソースを編集]
minecraft:particle_lifetime_expression This component controls when the particle expires
Parameters
Type Name Default Value Description Float, MoLang expiration_expression
0 Float, MoLang max_lifetime
Specifies the amount of time before the particle expires
minecraft:particle_expire_if_in_blocks This component causes the particles to expire when in one of the block types in the list. When adding a block name to the list ensure the at the "minecraft:" prefix appears for the block name (ex. minecraft:water, minecraft:dirt, etc.)
minecraft:particle_expire_if_not_in_blocks This component causes the particles to expire when it is not in one of the block types in the list. When adding a block name to the list ensure the at the "minecraft:" prefix appears for the block name (ex. minecraft:water, minecraft:dirt, etc.)
Render Controllers Documentation[編集 | ソースを編集]
This document contains a walkthrough on how to create new render controllers in Minecraft. Entities can have multiple render controllers.
Overview[編集 | ソースを編集]
The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – All JSON files in the "render_controllers" directory (located in the definitions folder of the Resource Pack) determine what renders on the entity – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use this feature in Resource Packs
Getting Started[編集 | ソースを編集]
New Render Controllers are contained within a Resource Pack. To begin create a new folder named "render_controllers" in the root of the Resource Pack that you want to add the new Render Controller JSON inside.
Example render controllers JSON for the ocelot
{ "format_version": "1.8.0-beta.1", "render_controllers": { "controller.render.ocelot": { "arrays": { "textures": { "Array.skins": [ "Texture.wild", "Texture.black", "Texture.red", "Texture.siamese" ] } }, "geometry": "Geometry.default", "materials": [ { "*": "Material.default" } ], "textures": [ "Array.skins[Entity.Variant]" ] } } }
Render Controllers[編集 | ソースを編集]
The Render Controller needs an identifier and needs to follow the format of "controller.render.<name>". This name needs to match the name set in the Client Entity Definitions JSON.
Render Controllers are a way for the player to determine what renders on the entity. Players can set the geometry, materials, textures, and part visibility of the entity. In addition to setting the keys directly, players can use arrays to have the entity choose between different options.
Example Array for geometry from the sheep JSON
"arrays": { "geometries": { "Array.geos": [ "Geometry.default", "Geometry.sheared" ] } }, "geometry": "Array.geos[Entity.Flags.SHEARED]",
Example Array for textures from the villager JSON
"arrays": { "textures": { "Array.skins": [ "Texture.farmer", "Texture.librarian", "Texture.priest", "Texture.smith", "Texture.butcher" ] } }, "textures": [ "Array.skins[Entity.Variant]" ]
Example Array for materials from the spider JSON
"arrays": { "materials": { "Array.materials": [ "Material.default", "Material.invisible" ] } }, "materials": [ { "*": "Array.materials[Entity.Flags.INVISIBLE]" } ],
Example with part_visibility for turning on and off visibility of parts from Llama JSON:
{ "format_version": "1.8.0-beta.1", "render_controllers": { "controller.render.llama": { "arrays": { "textures": { "Array.base": [ "Texture.creamy", "Texture.white", "Texture.brown", "Texture.gray" ], "Array.decor": [ "Texture.decor_none", "Texture.decor_white", "Texture.decor_orange", "Texture.decor_magenta", "Texture.decor_light_blue", "Texture.decor_yellow", "Texture.decor_lime", "Texture.decor_pink", "Texture.decor_gray", "Texture.decor_silver", "Texture.decor_cyan", "Texture.decor_purple", "Texture.decor_blue", "Texture.decor_brown", "Texture.decor_green", "Texture.decor_red", "Texture.decor_black"] } }, "geometry": "Geometry.default", "part_visibility": [ { "chest*": "Entity.Flags.CHESTED" } ], "materials": [ { "*": "Material.default" } ], "textures": ["Array.base[Entity.Variant]", "Array.decor[Entity.DecorTextureIndex]", "Texture.decor_none"] } }
Note The arrays for Materials and Part visibility are applied in the order specified. Materials and Part visibility specified later in the file will override previous materials or parts.
Material array example from Horse render controllers:
"materials": [ { "*": "Material.default" }, { "TailA": "Material.horse_hair" }, { "Mane": "Material.horse_hair" }, { "*Saddle*": "Material.horse_saddle" } ],
Saddle will override Mane, which will override TailA, etc.
Attachables Documentation[編集 | ソースを編集]
This document contains a walkthrough on how to create new attachables definitions in Minecraft.
Overview[編集 | ソースを編集]
The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – All JSON files in the "attachables" directory are required for the armor to render on an entity – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use this feature in Resource Packs
Getting Started[編集 | ソースを編集]
New attachables definitions are contained within a Resource Pack.
Attachables[編集 | ソースを編集]
Attachables are a way for you to specify what materials, textures, and geometry equipped armor will use.
In the root of the Resource Pack create a new folder and name it "attachables". In the "attachables" folder create a JSON file and give it a name. The JSON file needs a format version and minecraft:attachable information.
Important For the October Technical Preview the format version needs to be 1.8.0.-beta.1. This allows the attachables JSON to be used when using the Experimental Gameplay toggle.
Example attachables JSON for the chainmail_boots JSON
{ "format_version": "1.8.0-beta.1", "minecraft:attachable": { "description": { "identifier": "minecraft:chainmail_boots", "materials": { "default": "armor", "enchanted": "armor_enchanted" }, "textures": { "default": "textures/models/armor/chain_1", "enchanted": "textures/misc/enchanted_item_glint" }, "geometry": { "default": "geometry.humanoid.armor.boots" }, "render_controllers": [ "controller.render.armor" ] } } }
The minecraft:attachable section contains the description for the attachable. Under description there are a number of things that you can set and have the client run on the attachable.
Identifier[編集 | ソースを編集]
The identifier is used to register the attachable with the server. In the attachables JSON the identifier sets the appearance of the entity (materials, textures, geometry, etc.) The matching identifier needs to match a corresponding identifier in the "items_client" JSON of the resource pack.
Materials, Texture, and Geometry[編集 | ソースを編集]
Players can set the materials, textures, and geometry used for the attachable in this section. Players can set one or more materials, textures, and geometries that can be used by the attachable. Players can set create user defined keys of when materials, textures and geometries are used. These keys are set in the Render Controllers JSON. Players can reference materials from the vanilla Minecraft Resource Pack or create their own. Custom materials, textures, and geometries should be placed in the corresponding folder at the root of the Resource Pack.
Render Controllers[編集 | ソースを編集]
Specifies the identifier of the Render Controller. This identifier needs to match the identifier of a corresponding JSON located in the "render_controllers" folder. Players can reference Render Controllers from the vanilla Minecraft Resource Pack or create their own. Custom Render Controllers should be in the "textures" folder at the root of the Resource Pack.
Server Entity Documentation[編集 | ソースを編集]
This document contains a walkthrough on the changes to the entity behavior JSONs in Minecraft.
Overview[編集 | ソースを編集]
The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – All JSON files in the "entities" directory are required for the behaviors to be applied to the entity – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use this feature in Behavior Packs.
Updates[編集 | ソースを編集]
Format version[編集 | ソースを編集]
Format version is no longer contained within "minecraft:entity". It is pulled out into its own section.
Important For the October Technical Preview the format version needs to be 1.8.0.-beta.1. This allows the entity behavior JSON to be used when using the Experimental Gameplay toggle.
Example
{ "format_version": "1.8.0-beta.1", "minecraft:entity": {
Description[編集 | ソースを編集]
Under description there are a number of things that you can set about an entity.
Identifier[編集 | ソースを編集]
The identifier determines the behavior on the entity. The matching identifier in a Resource Pack sets the appearance of the entity (materials, textures, geometry, etc.)
minecraft:runtime_identifier[編集 | ソースを編集]
The "minecraft:runtime_identifier allows you to set what vanilla Minecraft entity's hard coded behaviors you want to set on your mob. For example, chicken laying eggs are currently a hard coded behavior. If you want a new entity to use this behavior (without having to replace the chicken) you can set the minecraft:runtime_identifier to the minecraft:chicken
Example:
"minecraft:runtime_identifier": { "id": "minecraft:chicken" },
minecraft:spawn_egg[編集 | ソースを編集]
The "minecraft:spawn_egg allows players to determine in the entity will use a spawn egg. If the value is true, the spawn egg shows up in the Creative Inventory. If the value is set to false, then it will not show up in the Creative Inventory.
Example:
"minecraft:spawn_egg": { "value": true },
minecraft:is_summonable[編集 | ソースを編集]
" The "minecraft:is_summonable" allows players to have this entity summonable using the /summon command. If the value is true, the entity can be summoned using the /summon command. The entity name will also appear as part of the autocomplete for the command. If the value is false the entity cannot be summoned using the /summon command
"minecraft:is_summonable": { "value": true },
minecraft:is_experimental[編集 | ソースを編集]
The "minecraft:is_experimental allows players to require the "Use Experimental Gameplay" toggle to be set to true for the entity to be used. If the value is set to false the entity can be used in normal gameplay.
Example:
"minecraft:is_experimental": { "value": true }
Data Driven Spawning Documentation[編集 | ソースを編集]
This document contains a detailed walkthrough on how to Data Drive Spawning in Minecraft. As part of the effort to enable adding entities to the game from an add-on we now have the to add our entities to the spawning rules of a biome from JSON data. This document covers: – How to adjust the spawn conditions of mobs, including new mobs added to the game to spawn naturally in biomes. – How to add/remove a mob's spawn egg to the creative inventory and set the mob's spawn egg. – How to add/remove a to the /summon command.
Overview[編集 | ソースを編集]
The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world
To add spawn eggs to the creative menu and/or allow the entities in the be summonable using the /command system
Spawn Rules[編集 | ソースを編集]
Getting Started New Spawn Rules are contained within a Behavior Pack. To begin, create a new folder named "spawn_rules" in the root of the Behavior Pack that you want to add the new biome spawn rules in. In the spawn_rules folder, create a JSON file and give it a name. The JSON file needs a format, description and conditions.
Important For the October Technical Preview the format version needs to be 1.8.0-beta.1. This allows Data Driven Spawning to be used when using the Experimental Gameplay toggle.
Spawn Rules information contains description and conditions.
Description[編集 | ソースを編集]
- All Spawn Rules JSON need to have an ID (located under the description section). All IDs need to use namespacing.
Namespacing – All IDs need to be namespaced – Namespacing involves adding a "name:" prefix on the effect tag – For vanilla minecraft, we will use "minecraft:" prefix
Example Spawn Rules for the zombie
{ "format_version": "1.8.0-beta.1", "minecraft:spawn_rules": { "description": { "identifier": "minecraft:zombie", "population_control": "monster" }, "conditions": [ { "minecraft:spawns_on_surface": {}, "minecraft:brightness_filter": { "min": 0, "max": 7, "adjust_for_weather": true }, "minecraft:difficulty_filter": { "min": "easy", "max": "hard" }, "minecraft:weight": { "default": 100 }, "minecraft:herd": { "min_size": 2, "max_size": 4 }, "minecraft:permute_type": [ { "weight": 95 }, { "weight": 5, "entity_type": "minecraft:zombie_villager" } ], "minecraft:biome_filter": { "test": "has_biome_tag", "operator": "===", "value": "monster" } } ] } }
When changing an existing mob use the ID that appears in the entity JSON for that entity. When creating your own mob, make sure the mobs have the same ID in all the entity's JSON files.
Spawn Rules also needs to define the pool that is used for population control. Each pool has their own spawn limit, By setting an entity to a pool it will spawn as long as that pool hasn't reached the spawn limit.
There are 3 pools that entities can be assigned to: – "animal" – "water_animal" – "monster"
Conditions[編集 | ソースを編集]
Conditions contain different components that players can use to customize natural biome spawning.
Condition Components[編集 | ソースを編集]
minecraft:spawns_on_surface This component allows the mob to spawn on the ground. Adding the component cause it to be true, removing it cause the mob to stop spawning on the surface.
minecraft:spawns_underwater This component allows the mob to spawn underwater. Adding the component cause it to be true, removing it cause the mob to stop spawning on the surface.
minecraft:brightness_filter This component allows players to set the light level range that causes the mob to spawn.
Parameters
Type Name Default Value Description float min This is the minimum light level value that allows the mob to spawn float max This is the maximum light level value that allows the mob to spawn Bool adjust_for_weather
This determines if weather can affect the light level conditions that cause the mob to spawn (allowing hostile mobs to spawn during the day when it rains.)
minecraft:weight This component allows players to give a priority to how often that mob should spawn. Mobs with lower weight values have a higher chance to spawn than mobs with higher weight values.
Type Name Default Value Description float default This is the priority of the mob spawning
minecraft:difficulty_filter This component allows players determine what mobs spawn when certain difficulty levels are set.
Type Name Default Value Description string default This is the minimum difficulty level that a mob spawns string default This is the maximum difficulty level that a mob spawns
minecraft:herd This component allows players to determine the herd size of animals.
Type Name Default Value Description Float min_size
This is the minimum number of mobs that spawn in a herd Float max_size
This is the maximum number of mobs that spawn in a herd String event This is an event that can be triggered from spawning Float event_skip_count
This is the number of mobs spawned that before the specified event is triggered
minecraft:biome_filter This component allows the players to specify which biomes the mob spawns in.
Example
"minecraft:biome_filter": { "any_of": [ {"test": "has_biome_tag", "operator":"===", "value": "river"}, {"test": "has_biome_tag", "operator":"===", "value": "swamp"} ] }
Tags[編集 | ソースを編集]
Each biome in the game has one or more tags. These are used to determine what biomes mobs spawn in. Here is the list of Biome tags that can be used:
- monster
- animal
- ocean
- nether
- the_end
- mooshroom_island
- plains
- desert
- jungle
- taiga
- extreme_hills
- savanna
- frozen
- cold
- lukewarm
- warm
- river
- swamp
- beach
- flower_forest
- forest
- birch
- dark_oak
- hills
- mutated
- edge
- lakes
- plateau
- deep
- mesa
- ice_plains
- ice
- mountain
- shore
- stone
- roofed
- mega
Tagged Biomes[編集 | ソースを編集]
- Plains: animal, monster, plains
- Desert: monster, desert
- Mountain: animal, monster, extreme_hills
- Forest: animal, monster, forest
- Taiga: animal, monster, taiga
- Swamp: animal, monster, swamp
- River: river
- Nether: nether
- The End: the_end
- Frozen Ocean: ocean, frozen
- Frozen River: river, frozen
- Snowy Tundra: frozen, ice_plain, ice
- Snowy Mountains: frozen, ice, mountain
- Mushroom Fields: mooshroom_island
- Mushroom Fields Shore: mooshroom_island, shore
- Beach: monster, beach, warm
- Desert Hills: monster, desert, hills
- Forest Hills: animal, monster, hills
- Taiga Hills: animal, monster, taiga, hills
- Mountain Edge: animal, monster, extreme_hills, edge, mountain
- Jungle: animal, monster, jungle
- Jungle Hills: animal, monster, jungle, hills
- Jungle Edge: animal, monster, jungle, edge
- Snowy Beach: monster, beach, cold
- Stone Shore: monster, beach, stone
- Birch Forest: animal, monster, birch, forest,
- Birch Forest Hills: animal, monster, birch, forest, hills
- Dark Forest: animal, monster, forest, roofed
- Snowy Taiga: animal, monster, taiga, cold
- Snowy Taiga Hills: animal, monster, taiga, cold, hills
- Giant Tree Taiga: animal, monster, taiga, mega
- Giant Tree Taiga Hills: animal, monster, taiga, mega, hills
- Wooded Mountain: animal, monster, extreme_hills, forest, mountain
- Savanna: animal, monster, savanna
- Savanna Plateau: animal, monster, savanna
- Mesa: monster
- Mesa Plateau Stone: monster, plataeu
- Mesa Plateau: monster, mesa
- Ocean: ocean, monster
- Deep Ocean: ocean, monster, deep
- Warm Ocean: ocean, warm, monster
- Deep Warm Ocean: ocean, warm, monster, deep
- Lukewarm Ocean: ocean, lukewarm, monster
- Deep Lukewarm Ocean: ocean, lukewarm, monster, deep
- Cold Ocean: ocean, cold, monster
- Deep Cold Ocean: ocean, cold, monster, deep
- Frozen Ocean: ocean, frozen, monster
- Deep Frozen Ocean: ocean, frozen, monster, deep
- Plains M: animal, monster, plains, mutated
- Swamp M: animal, monster, swamp, mutated
- Snowy Tundra M: monster, frozen, ice_plains, mutated
- Cold Taiga M: animal, monster, taiga, cold, mutated
- Savanna M: animal, monster, savanna, mutated
- Savanna Plateau M: animal, monster, savanna, plateau, mutated
- Dark Forest M: animal, monster, roofed, forest, mutated
- Desert M: monster, desert, mutated
- Forest M: monster, flower_forest, forest, mutated
- Taiga M: animal, monster, taiga, mutated
- Jungle M: animal, monster, jungle, mutated
- Jungle Edge M: animal, monster, jungle, edge, mutated
- Mesa M: animal, monster, mesa, mutated
- Mesa Plateau M: monster, mesa, plateau, mutated
- Mesa Plateau Stone M: monster, mesa, plateau, mutated, stone
- Birch Forest M: animal, monster, forest, birch, mutated
- Birch Forest Hills M: animal, monster, forest, birch, mutated, hills
- Giant Trees Taiga M: animal, monster, mutated, mega
- Mountain M: animal, monster, extreme_hills, mutated
- Mountain + M: animal, monster, extreme_hills, mutated, forest
- Giant Tree Taiga Hills M: animal, monster, taiga, mega, hills, mutated
MoLang[編集 | ソースを編集]
Why Does MoLang Exist?[編集 | ソースを編集]
MoLang is a simple expression-based language designed for fast calculation of values at run-time. Its focus is solely to enable script-like capabilities in high-performance systems where JavaScript is not performant at scale. We need scripting capabilities in these low-level systems to support end-user modding capabilities, custom entities, their rendering, and animation.
Lexical Structure[編集 | ソースを編集]
The language structure is largely based on simple C-style syntax, focusing on handling math expressions. A script is made of either one expression for simple cases, or can be made of several where intermediate values are required or to help reduce compute time.
In all cases, the value of the last expression in a script provides the script's value. In a multi-expression script, all but the last expression must assign a value to a variable. The last expression can as well, but doesn't need to as it's value is assumed to be the used as the return value.
Values[編集 | ソースを編集]
- Value types are concretely specified, or numeric if not.
- All numerical values are floats.
- Boolean values such as actor flags are converted to a float value of either 0.0 or 1.0 for values of false or true respectively.
- For boolean tests, a float value equivalent to 0.0 is
false
, and anything not equal to 0.0 istrue
. - For array indices, floats are c-style cast to ints, and clamped at zero for negative values or wrapped by the array size for large values.
- Other supported types are textures, materials, and geometry where they make sense (such as render controllers).
- Errors generally return a value of 0.0.
Variables[編集 | ソースを編集]
There are several domains a variable may belong to:
Domain Variable Scope Example Temp The current expression Temp.foo == Math.sin(Params.AnimTime); return Temp.
foo * Temp
.foo;Entity The current entity, be it an actor, particle system, etc Entity.mySavedVar == Entity.mySavedVar + 1
Entity.Member Entity-specific values Entity.Member.GroundSpeed
Entity.Flags Entity-specific flags Entity.moo == Entity.Flags.BABY ? 4.1 : 2.3
Geometry The current render controller "geometry": "Array.geos[Entity.Flags.SHEARED]"
Material The current render controller "materials": [ { "*": "Material.default" }, { "leg*": "Material.legs" } ],
Texture The current render controller "textures": [ "Array.skins[Entity.Flags.SADDLED]" ]
Reserved Words[編集 | ソースを編集]
String Meaning <float>
Numerical constant value (
)
Parentheses for expression term evaluation control [
]
Brackets for array access Entity.Flags.<flag name>
Access to an actor's flags Math.<function>
Various math functions (see below) Params.<parameter name>
Access to environment parameters Temp.<variable name>
Store an intermediate value for the duration of the current expression Entity.<variable name>
Store a value on the attached entity for later use Geometry.<texture name>
A reference to a texture named in the entity definition Material.<texture name>
A reference to a texture named in the entity definition Texture.<texture name>
A reference to a texture named in the entity definition !
&&
||
<
<==
>==
>
===
!==
Logical operations *
/
+
-
Basic math operations <test>
?
<if true>
:
<if false>
Conditional operator this
The current value before executing the script (context sensitive) return
For complex expressions, this evaluates the following statement and stops execution of the script, returns the value computed
'all identifiers not in a scope listed above are reserved for future use'
Supported Math Functions[編集 | ソースを編集]
Name Function Math.abs(<value>)
absolute value Math.sin(<value>)
sine (in degrees) Math.cos(<value>)
cosine (in degrees) Math.exp(<value>)
e^ <value>
Math.ln(<value>)
natural log( <value>
)Math.pow(<base>, <exponent>)
<base>
^<exponent>
Math.sqrt(<value>)
square root of <value>
Math.random(<low>, <high>)
random value between <low>
and<high>
inclusiveMath.ceil(<value>)
round <value>
up to nearest integral numberMath.round(<value>)
round <value>
to nearest integral numberMath.trunc(<value>)
round <value>
towards zeroMath.floor(<value>)
round <value>
down to nearest integral numberMath.mod(<value>, <denominator>)
return the remainder of value
/denominator
Math.min(<A>, <B>)
return lowest value of <A>
or<B>
Math.max(<A>, <B>)
return highest value of <A>
or<B>
Math.clamp(<value>, <min>, <max>)
clamp <value>
to between<min>
and<max>
inclusiveMath.lerp(<start>, <end>, <0_to_1>)
lerp from <start>
to<end>
via<0_to_1>
Math.lerprotate(<start>, <end>, <0_to_1>)
lerp the shortest direction around a circle from <start>
degrees to<end>
degrees via<0_to_1>
Parameters[編集 | ソースを編集]
Name Value Params.AnimTime
Time since the current animation start Params.DeltaTime
Time since the last time this animation was updated Params.KeyFrameLerpTime
Normalized time between current key frames as [0-1] Params.LifeTime
Lifetime of the current actor Params.FrameAlpha
The render frame interpolation amount between AI frames (assuming the rendering is running at a different rate than the AI) as [0-1]
Members[編集 | ソースを編集]
Name Value Entity.Member.GroundSpeed Entity speed in meters/sec Entity.Member.IsInWater Is entity in water Entity.Member.IsInWaterOrRain Is entity in water or rain Entity.Member.TargetXRot Mob-relative X rotation to aim at current target Entity.Member.TargetYRot Mob-relative Y rotation to aim at current target Entity.Member.Variant Mob variant Entity.Member.WalkPosition A complicated value roughly equal to the distance the mob has traveled Entity.Member.WalkSpeed A complicated value roughly equal to the speed the mob is moving Entity.Member.YawSpeed The yaw rotation speed of the mob in degrees/sec
Types, Values, and Variables[編集 | ソースを編集]
In general, all expression values are floats. In render controllers, some expressions result in a texture or material depending on the context. All array index expressions are processed as floats, and cast to integers when performing the final lookup into the array. Positive array indices wrap by the size of the array. Negative array indices clamp to 0.
Simple vs Complex Expresions[編集 | ソースを編集]
A simple expression is a single statement, the value of which is returned to the system that evaluated the expression. eg:
Math.sin(Params.
AnimTime * 1
.23)
A complex expression is one with multiple statements, each ending in a ';
'. Each statement is evaluated in order. In the current implementation, the last statement requires the use of the return
keyword and defines the resulting value of the expression. eg:
Temp.myTempVar == Math.sin(Params.{{code|AnimTime * 1}}.23); Temp.myOtherTempVar == Math.cos(Params.LifeTime + 2.0); return Temp.{{code|myTempVar * Temp}}.myTempVar + Temp.myOtherTempVar;
Note that in a simple expression, ';
' is not allowed, whereas in a complex expression, each statement requires a ';
' including the last.
Domain Examples[編集 | ソースを編集]
Entity Definition Scripts[編集 | ソースを編集]
In the definition file there is a section for pre-computing values:
"scripts": { "pre_animation": [ "Entity.myConstant == (Math.cos(Params.{{code|AnimPos * 38}}.17) * Params.AnimSpeed;", "Entity.myConstant2 == Math.exp(1.5);", ] },
These are executed immediately before animation and render controllers are processed, and stored in the entity. The purpose is to pre-compute any expensive and complex values you may want to reuse in your scripts, long-living index variable updates, or generally any one-off computation per render tick.
Animation and Animation Controller files[編集 | ソースを編集]
These are always numerical operations to control which animations are playing and how to animate bones. "Entity.<variable>"
and "Entity.Flag.<entity flag>"
refers to the entity currently being rendered. They have access to everything in the language except material, texture, and geometry types.
Render Controllers[編集 | ソースを編集]
There are a few different kinds of expressions here, where context implies what is allowed. As with animations, the entity accessors refer to the current entity, however depending on the context one also has access to materials, textures, and geometries. There are two sections in a render controller:
- Array definitions (optional)
- Resource usage (required)
The array definition section allows you to create arrays of resources by resource type if you so desire. These can then be referenced in the resource usage section.
{ "controller.render.<my render controller name>": { // array definitions "arrays": { "materials": { "Array.<array name>": [ "Material.<material name>", "Array.<array name>, ... ], ... }, "textures": { "Array.<array name>": [ "Texture.<texture name>", "Array.<array name>, ...], ... }, "geometries": { "Array.<array name>": [ "Geometry.<geometry name>", "Array.<array name>", ...], ... } }, // resource usage "geometry": "<geometry expression>", "materials": [ { <string regex>: "<material expression>" }, ... ], "textures": [ "Array.<array name>[<numerical expression>]", ... ] } }
Array Expressions[編集 | ソースを編集]
For each of the three resource types (materials, textures, and geometry), you can define an array of resources. The name of the resource is the nice-name from the definition file. Using materials as an example:
"arrays": { "materials": { "Array.myArray1": [ "Material.a", "Material.b", "Material.c" ], "Array.myArray2": [ "Material.d", "Material.e" ], "Array.myArray3": [ "Array.myArray1", "Material.myArray2" ], "Array.myArray4": [ "Array.myArray2", "Material.myArray3" ], "Array.myArray5": [ "Array.myArray1", "Material.myArray1", "Material.myArray4" ], "Array.myArray6": [ "Array.myArray1", "Material.f" ], ... },
Note that all elements of an array must be of the same type. eg: a texture array must only contain textures.
An array can reference any combination of zero or more arrays (including duplicates if desired) and/or zero or more materails (again, including duplicates if you like), and you can have as many arrays as you like, each with as many elements as you like. If an array includes arrays in its members, they do not need to be the same length. When indexing into an array in the resource usage section, you use numerical expressions. If the resulting number is negative, it will use zero as the index. Any non-negative index will converted to an integer, and will wrap based on the size of the array:
index == max(0, <expression_result>) % <array_size>
Resource Expression[編集 | ソースを編集]
A resource expression must return a single resource of a specific type depending on the context. For example, in the
"geometry"
section, you must produce an expression that will result in a single geometry. Some examples:
"geometry": "Geometry.myGeo" // always use a specific geometry "geometry": "Entity.Flag.SHEARED ? Geometry.sheared : Geometry.woolly" // will pick a geo based on an entity flag "geometry": "Array.myGeometries[Params.AnimTime]" // will repeatedly cycle through an array of geometries at a rate of one per second "geometry": "Entity.Flag.SLEEPING ? Geometry.mySleepingGeo : Array.myGeos[Math.cos(Params.{{code|AnimTime * 12}}.3 + 41.9) * 10 + 0.6]" // if sleeping, use specific geo, else flip through an array based on a cosine curve, using index zero for almost half the time while the cosine curve is negative
Resource Sections[編集 | ソースを編集]
Geometry[編集 | ソースを編集]
The geometry section specifies which geometry to use when rendering. As you can specify as many render controllers as you like in the definition file, a single render controller is only concerned with how to render a single geometry. Note that a geometry can be arbitrarily complex using any number of bones and polygons.
Materials[編集 | ソースを編集]
The materials section specifies how to map what material to what bone of the geometry. A single material is mapped to a whole bone. Material expressions are evaluated in the order listed. The first part of each statement is the name of the model part to apply the material to, and the second part is the material to use. The model part name can use * for
wild-card matching of characters. For example:
"materials": [ { "*": "Material.default" }, { "TailA": "Array.hairColors[Entity.HairColor]" }, { "Mane": "Array.hairColors[Entity.HairColor]" }, { "*Saddle*": "Entity.IsLeatherSaddle ? Material.leatherSaddle : Material.ironSaddle" } ],
- This will start by applying
Material.default
to all model parts. - Next, it will set the material on a model part named
"TailA"
to the result of the expression"Array.hairColors[Entity.HairColor]"
. This will look up some previously created variable set on the entity namedHairColor
and use that to index into a material array called"Array.hairColors"
defined in this render controller. This will overwrite theMaterial.default
material set in the line above. - Third, it will look up the same material as the expression is identical, and apply it to the
"Mane"
model part. - Lastly, if will find any model part starting with, ending with, or containing
"Saddle"
(case sensitive) and change its material to eitherMaterial.leatherSaddle
orMaterial.ironSaddle
depending on the previously set entity variableEntity.IsLeatherSaddle
.
Under the hood, it writes the desired look-up expression into the model part at initialization time. For each model part, the resulting expression is evaluated at run-time each frame when it is rendered.
ファイル定義[編集 | ソースを編集]
- これらのプロパティはエンティティ定義に関するもので、コンポーネントやコンポーネントグループ、イベントより先に定義する必要がある。もし、それらより後に定義した場合イベントなどが読み込まれなくなる。
do_not_upgrade[編集 | ソースを編集]
- 定義したエンティティのバニラでの変更・修正が自動で適用されなくなる。自動でのアップデートは、ゲームのバージョンが
format_version
より新しい場合有効となる。
format_version[編集 | ソースを編集]
- エンティティファイルのバージョンを定義する。あくまで定義したファイルのバージョンを設定するだけであり、ゲームバージョンへの影響は無い。
- ここでの定義したバージョンが、プレイ中のゲームバージョンよりも低く、かつ
do_not_upgrade
を定義していない場合は、バニラでの変更・修正などが自動で追加される[1]。これらは以下のようになる。
do_not_upgrade
の追加ファイルの自動アップデート している 無効 していない 有効
- 使用例
{ "minecraft:entity": { "format_version": "1.2.0", "do_not_upgrade": {}, "component_groups": {...} ...}
エンティティ定義プロパティ[編集 | ソースを編集]
- これらのプロパティは、エンティティ定義に関するものである。
minecraft:identifier[編集 | ソースを編集]
- エンティティID となる名前を設定する。
- パラメーター
データ型 プロパティ名 デフォルト値 解説 文字列 id エンティティID として管理される文字列を設定する
minecraft:is_experimental[編集 | ソースを編集]
- エンティティを「実験的」とするか否かを設定する。この値が
true
のエンティティはワールド設定の「試験的なゲームプレイを遊ぶ」の項目を有効にしないと、エンティティが追加されない。
- パラメーター
データ型 プロパティ名 デフォルト値 解説 真理値 value false エンティティを「実験的」とするか否かを設定する
minecraft:is_summonable[編集 | ソースを編集]
- エンティティを
/summon
コマンドで召喚できるか否かを設定する。
- パラメーター
データ型 プロパティ名 デフォルト値 解説 真理値 value false エンティティを召喚できるか否かを設定する
minecraft:runtime_identifier[編集 | ソースを編集]
- エンティティに継承させるバニラのエンティティを設定する。このプロパティを追加すると、指定したエンティティの固有のコンポーネントが使用できるようになる[注釈 1]。
- パラメーター
データ型 プロパティ名 デフォルト値 解説 文字列 id エンティティに継承させるバニラのエンティティID を設定する
minecraft:spawn_egg[編集 | ソースを編集]
- クリエイティブインベントリにスポーンエッグを追加するか否かを設定する。
- パラメーター
データ型 プロパティ名 デフォルト値 解説 真理値 value false スポーンエッグを追加するか否かを設定する
Attributes[編集 | ソースを編集]
minecraft:attack[編集 | ソースを編集]
- エンティティの近接攻撃でのダメージと、攻撃時に相手に付与するステータス効果を設定する。
- パラメーター
データ型 プロパティ名 デフォルト値 解説 範囲 [最小値, 最大値]
少数値・整数値damage
近接攻撃でのダメージ量
範囲値ではなく数値で設定することもできる小数値 effect_duration
0.0 近接攻撃時に相手のエンティティに付与するステータス効果の持続時間 文字列 effect_name
近接攻撃時に相手のエンティティに付与するステータス効果
付与できるステータス効果はここを参照
minecraft:spell_effects[編集 | ソースを編集]
- Defines what mob effects to add and remove to the entity when adding this component.
- パラメーター
Type Name Default Value Description List add_effects
List of effects to add to this entity after adding this component - パラメーター
Type Name Default Value Description 文字列 effect Effect to add to this entity. Includes 'duration' in seconds, 'amplifier' level, 'ambient' if it is to be considered an ambient effect, and 'visible' if the effect should be visible
文字列 remove_effects
List of names of effects to be removed from this entity after adding this component
minecraft:strength[編集 | ソースを編集]
- Defines the entity's strength to carry items.
- パラメーター
Type Name Default Value Description 整数値 max 5 The maximum strength of this entity 整数値 value 1 The initial value of the strength
Properties[編集 | ソースを編集]
minecraft:ambient_sound_interval[編集 | ソースを編集]
- Sets the entity's delay between playing its ambient sound.
- パラメーター
Type Name Default Value Description 小数値 range 16.0 Maximum time is seconds to randomly add to the ambient sound delay time. 小数値 value 8.0 Minimum time in seconds before the entity plays its ambient sound again
minecraft:can_climb[編集 | ソースを編集]
- Allows this entity to climb up ladders.
minecraft:can_fly[編集 | ソースを編集]
- Marks the entity as being able to fly, the pathfinder won't be restricted to paths where a solid block is required underneath it.
minecraft:can_power_jump[編集 | ソースを編集]
- Allows the entity to power jump like the horse does in vanilla.
minecraft:collision_box[編集 | ソースを編集]
- Sets the width and height of the Entity's collision box.
- パラメーター
Type Name Default Value Description 小数値 height 1.0 Height of the Collision Box in Blocks 小数値 width 1.0 Width and Depth of the Collision Box in Blocks
minecraft:color[編集 | ソースを編集]
- Defines the entity's color. Only works on vanilla entities that have predefined color values (sheep, llama, shulker).
- パラメーター
Type Name Default Value Description 整数値 value 0 The Palette Color value of the entity
minecraft:color2[編集 | ソースを編集]
- Defines the entity's second texture color. Only works on vanilla entities that have a second predefined color values (tropical fish).
- パラメーター
Type Name Default Value Description 整数値 value 0 The second Palette Color value of the entity
minecraft:default_look_angle[編集 | ソースを編集]
- Sets this entity's default head rotation angle.
- パラメーター
Type Name Default Value Description 小数値 value 0.0f Angle in degrees
minecraft:equipment[編集 | ソースを編集]
- Sets the Equipment table to use for this Entity.
- パラメーター
Type Name Default Value Description 文字列 slot_drop_chance
A list of slots with the chance to drop an equipped item from that slot. 文字列 table The path to the equipment table, relative to the Behavior Pack's root
minecraft:fire_immune[編集 | ソースを編集]
- Sets that this entity doesn't take damage from fire.
minecraft:floats_in_liquid[編集 | ソースを編集]
- Sets that this entity can float in liquid blocks.
minecraft:flying_speed[編集 | ソースを編集]
- Speed in Blocks that this entity flies at.
- パラメーター
Type Name Default Value Description 小数値 value 0.02 Flying speed in blocks per tick
minecraft:foot_size[編集 | ソースを編集]
- Sets the number of blocks the entity can step without jumping.
- パラメーター
Type Name Default Value Description 小数値 value 0.5 The value of the size of the entity's step
minecraft:friction_modifier[編集 | ソースを編集]
- Defines how much does friction affect this entity.
- パラメーター
Type Name Default Value Description 小数値 value 1.0 The higher the number, the more the friction affects this entity. A value of 1.0 means regular friction, while 2.0 means twice as much
minecraft:ground_offset[編集 | ソースを編集]
- Sets the offset from the ground that the entity is actually at.
- パラメーター
Type Name Default Value Description 小数値 value 0.0 The value of the entity's offset from the terrain, in blocks
minecraft:input_ground_controlled[編集 | ソースを編集]
- When configured as a rideable entity, the entity will be controlled using WASD controls.
minecraft:is_baby[編集 | ソースを編集]
- Sets that this entity is a baby.
minecraft:is_charged[編集 | ソースを編集]
- Sets that this entity is charged.
minecraft:is_chested[編集 | ソースを編集]
- Sets that this entity is currently carrying a chest.
minecraft:is_dyeable[編集 | ソースを編集]
- Allows dyes to be used on this entity to change its color.
- パラメーター
Type Name Default Value Description 文字列 interact_text
The text that will display when interacting with this entity with a dye when playing with Touch-screen controls
minecraft:is_ignited[編集 | ソースを編集]
- Sets that this entity is currently on fire.
minecraft:is_saddled[編集 | ソースを編集]
- Sets that this entity is currently saddled.
minecraft:is_shaking[編集 | ソースを編集]
- Sets that this entity is currently shaking.
minecraft:is_sheared[編集 | ソースを編集]
- Sets that this entity is currently sheared.
minecraft:is_stackable[編集 | ソースを編集]
- Sets that this entity can be stacked.
minecraft:is_tamed[編集 | ソースを編集]
- Sets that this entity is currently tamed.
minecraft:item_controllable[編集 | ソースを編集]
- Defines what items can be used to control this entity while ridden
- パラメーター
Type Name Default Value Description List control_items
List of items that can be used to control this entity
minecraft:loot[編集 | ソースを編集]
- Sets the loot table for what items this entity drops upon death.
- パラメーター
Type Name Default Value Description 文字列 table The path to the loot table, relative to the Behavior Pack's root
minecraft:mark_variant[編集 | ソースを編集]
- Additional variant value. Can be used to further differentiate variants.
- パラメーター
Type Name Default Value Description 整数値 value 0 The ID of the variant. By convention, 0 is the ID of the base entity
minecraft:push_through[編集 | ソースを編集]
- Sets the distance through which the entity can push through.
- パラメーター
Type Name Default Value Description 小数値 value 0.0 The value of the entity's push-through, in blocks
minecraft:scale[編集 | ソースを編集]
- Sets the entity's visual size.
- パラメーター
Type Name Default Value Description 小数値 value 1.0 The value of the scale. 1.0 means the entity will appear at the scale they are defined in their model. Higher numbers make the entity bigger
minecraft:sound_volume[編集 | ソースを編集]
- Sets the entity's base volume for sound effects.
- パラメーター
Type Name Default Value Description 小数値 value 1.0 The value of the volume the entity uses for sound effects
minecraft:type_family[編集 | ソースを編集]
- Defines the families this entity belongs to.
- パラメーター
Type Name Default Value Description List family List of family names
minecraft:variant[編集 | ソースを編集]
- Used to differentiate the component group of a variant of an entity from others (e.g. ocelot, villager)
- パラメーター
Type Name Default Value Description 整数値 value 0 The ID of the variant. By convention, 0 is the ID of the base entity
minecraft:walk_animation_speed[編集 | ソースを編集]
- Sets the speed multiplier for this entity's walk animation speed.
- パラメーター
Type Name Default Value Description 小数値 value 1.0 The higher the number, the faster the animation for walking plays. A value of 1.0 means normal speed, while 2.0 means twice as fast
minecraft:wants_jockey[編集 | ソースを編集]
- Sets that this entity wants to become a jockey.
Component IDs[編集 | ソースを編集]
JSON Name ID 0 minecraft.behavior.scared 0 minecraft:addrider -1014528905 minecraft:ageable 1092934985 minecraft:ambient_sound_interval -1314051310 minecraft:angry 725411499 minecraft:attack 1651346034 minecraft:behavior.avoid_mob_type 386517767 minecraft:behavior.beg 1346418048 minecraft:behavior.break_door -1798237626 minecraft:behavior.breed 51166360 minecraft:behavior.charge_attack -1921442265 minecraft:behavior.circle_around_anchor -698025586 minecraft:behavior.controlled_by_player 1633000292 minecraft:behavior.defend_village_target 1469600895 minecraft:behavior.door_interact -286762735 minecraft:behavior.dragonchargeplayer 1808565780 minecraft:behavior.dragondeath -1541162059 minecraft:behavior.dragonflaming -865288877 minecraft:behavior.dragonholdingpattern 1066617362 minecraft:behavior.dragonlanding -152352492 minecraft:behavior.dragonscanning -1003941066 minecraft:behavior.dragonstrafeplayer -1510265153 minecraft:behavior.dragontakeoff -1912535317 minecraft:behavior.drop_item_for 1846615759 minecraft:behavior.eat_block 1972447274 minecraft:behavior.enderman_leave_block -717580550 minecraft:behavior.enderman_take_block -537294220 minecraft:behavior.find_mount 731306871 minecraft:behavior.find_underwater_treasure -1602192311 minecraft:behavior.flee_sun -617664229 minecraft:behavior.float 1758503000 minecraft:behavior.float_wander -1122048364 minecraft:behavior.follow_caravan 9936402 minecraft:behavior.follow_mob -1524701626 minecraft:behavior.follow_owner 1213259599 minecraft:behavior.follow_parent 2127040136 minecraft:behavior.go_home -1579225026 minecraft:behavior.guardian_attack -579215554 minecraft:behavior.harvest_farm_block 10843010 minecraft:behavior.hurt_by_target -1710404297 minecraft:behavior.lay_down -2074934675 minecraft:behavior.lay_egg -1207740530 minecraft:behavior.leap_at_target 256926956 minecraft:behavior.look_at_entity -1735428573 minecraft:behavior.look_at_player -1892159379 minecraft:behavior.look_at_target -885375871 minecraft:behavior.look_at_trading_player -2094605693 minecraft:behavior.make_love -1551283431 minecraft:behavior.melee_attack 1848335663 minecraft:behavior.mount_pathing 1112137677 minecraft:behavior.move_indoors 2107078532 minecraft:behavior.move_through_village 779377630 minecraft:behavior.move_to_land -943551837 minecraft:behavior.move_to_water 1886139445 minecraft:behavior.move_towards_restriction 1288087401 minecraft:behavior.move_towards_target -166537884 minecraft:behavior.nearest_attackable_target -2032255557 minecraft:behavior.ocelot_sit_on_block -1327999383 minecraft:behavior.ocelotattack 560197714 minecraft:behavior.offer_flower -885387854 minecraft:behavior.open_door -906200433 minecraft:behavior.owner_hurt_by_target 530667419 minecraft:behavior.owner_hurt_target 995655261 minecraft:behavior.panic -169886247 minecraft:behavior.peek 211304085 minecraft:behavior.pet_sleep_with_owner 1379392240 minecraft:behavior.pickup_items 644287189 minecraft:behavior.play -505601580 minecraft:behavior.player_ride_tamed 603869698 minecraft:behavior.raid_garden -1145687602 minecraft:behavior.random_breach 928528911 minecraft:behavior.random_fly -446385505 minecraft:behavior.random_look_around 1177762851 minecraft:behavior.random_sitting 1722716662 minecraft:behavior.random_stroll -1643504294 minecraft:behavior.random_swim -1465281278 minecraft:behavior.ranged_attack -2093407250 minecraft:behavior.receive_love 1156694272 minecraft:behavior.restrict_open_door 715583988 minecraft:behavior.restrict_sun -382716017 minecraft:behavior.roll 817471653 minecraft:behavior.run_around_like_crazy -1390363669 minecraft:behavior.send_event -823429137 minecraft:behavior.share_items 2045906118 minecraft:behavior.silverfish_merge_with_stone 321908121 minecraft:behavior.silverfish_wake_up_friends 484391748 minecraft:behavior.skeleton_horse_trap 530952387 minecraft:behavior.slime_attack -1315951081 minecraft:behavior.slime_float -1480876341 minecraft:behavior.slime_keep_on_jumping -1844762087 minecraft:behavior.slime_random_direction 1437515506 minecraft:behavior.snacking 875141064 minecraft:behavior.sneeze 1528584076 minecraft:behavior.squid_dive 1626998843 minecraft:behavior.squid_flee 1304043261 minecraft:behavior.squid_idle 1741234679 minecraft:behavior.squid_move_away_from_ground 892387674 minecraft:behavior.squid_out_of_water -1347598607 minecraft:behavior.stay_while_sitting 1346980478 minecraft:behavior.stomp_attack -1851446496 minecraft:behavior.stomp_turtle_egg 851839416 minecraft:behavior.summon_entity -2005850647 minecraft:behavior.swell -1473132493 minecraft:behavior.swim_wander -1576142514 minecraft:behavior.swoop_attack 770804235 minecraft:behavior.take_flower 1218648257 minecraft:behavior.tempt 422904556 minecraft:behavior.trade_with_player -2048563493 minecraft:behavior.vex_copy_owner_target -643459543 minecraft:behavior.vex_random_move -1117822165 minecraft:behavior.wither_random_attack_pos_goal -528895885 minecraft:behavior.wither_target_highest_damage -1065562072 minecraft:boostable -8316315 minecraft:breathable -707187232 minecraft:breedable -1616430100 minecraft:bribeable 0 minecraft:burns_in_daylight 1256874605 minecraft:can_climb -550459594 minecraft:can_fly 985724318 minecraft:can_power_jump -763124853 minecraft:collision_box -1277663508 minecraft:color 1069623177 minecraft:color2 0 minecraft:damage_over_time 0 minecraft:damage_sensor -82616534 minecraft:default_look_angle -815556357 minecraft:environment_sensor 687748970 minecraft:equipment 714661022 minecraft:equippable -1164142226 minecraft:explode -1683058581 minecraft:fire_immune -1071767182 minecraft:floats_in_liquid 179778474 minecraft:flying_speed -570508595 minecraft:foot_size 1133270874 minecraft:friction_modifier -714364556 minecraft:genetics -82484670 minecraft:ground_offset -1816881803 minecraft:healable -54247424 minecraft:hurt_when_wet 237531867 minecraft:identifier 0 minecraft:input_ground_controlled -646415617 minecraft:insomnia -300455606 minecraft:interact -1996861528 minecraft:inventory 1941951218 minecraft:is_baby 1853172763 minecraft:is_charged 125340337 minecraft:is_chested -817599379 minecraft:is_dyeable 1381448355 minecraft:is_experimental 0 minecraft:is_ignited 905710223 minecraft:is_saddled 1037901616 minecraft:is_shaking 523951884 minecraft:is_sheared 1154836813 minecraft:is_stackable 1184456737 minecraft:is_summonable 0 minecraft:is_tamed 1646421078 minecraft:item_controllable 1868311069 minecraft:item_hopper -447601772 minecraft:jump.dynamic 945664737 minecraft:jump.static 1064987526 minecraft:leashable 893445039 minecraft:lookat -1329707008 minecraft:loot 1775814032 minecraft:mark_variant 663621689 minecraft:movement.amphibious 0 minecraft:movement.basic 3354475 minecraft:movement.fly -1487316136 minecraft:movement.generic 0 minecraft:movement.jump 1256268727 minecraft:movement.skip -1828832272 minecraft:movement.sway 0 minecraft:nameable -595398763 minecraft:navigation.climb -1075360945 minecraft:navigation.float -842998036 minecraft:navigation.fly -1997823129 minecraft:navigation.generic 0 minecraft:navigation.swim 1908076634 minecraft:navigation.walk 1909033775 minecraft:on_death -49357854 minecraft:on_friendly_anger -1009986313 minecraft:on_hurt -1028603471 minecraft:on_hurt_by_player -599009831 minecraft:on_ignite -1911489054 minecraft:on_start_landing -555648368 minecraft:on_start_takeoff 426083399 minecraft:on_target_acquired 1063277906 minecraft:on_target_escape -1373130027 minecraft:on_wake_with_owner -1543219003 minecraft:peek -863721039 minecraft:projectile 1922456869 minecraft:push_through -138030768 minecraft:rail_movement -78235634 minecraft:rail_sensor 1273161273 minecraft:rideable 1656173828 minecraft:runtime_identifier 0 minecraft:scaffolding_climber 169799877 minecraft:scale 77854436 minecraft:scale_by_age 64881972 minecraft:shareables 1301057082 minecraft:shooter 184150118 minecraft:sittable -1376274106 minecraft:sound_volume 937951776 minecraft:spawn_egg 0 minecraft:spawn_entity 1991964333 minecraft:spell_effects 523264365 minecraft:strength 648564399 minecraft:tameable 932870003 minecraft:tamemount 1615660288 minecraft:target_nearby_sensor 1309819882 minecraft:teleport -1900891127 minecraft:tick_world -381759296 minecraft:timer 1862095863 minecraft:trade_table 50480315 minecraft:transformation -457894577 minecraft:trusting 936499892 minecraft:type_family -255011285 minecraft:variant -1789583977 minecraft:walk_animation_speed 972393614 minecraft:wants_jockey 1832515141
Components[編集 | ソースを編集]
minecraft:addrider[編集 | ソースを編集]
- Adds a rider to the entity. Requires minecraft:rideable.
- パラメーター
Type Name Default Value Description 文字列 entity_type
The entity type that will be riding this entity
minecraft:ageable[編集 | ソースを編集]
- Adds a timer for the entity to grow up. It can be accelerated by giving the entity the items it likes as defined by feedItems.
- パラメーター
Type Name Default Value Description List drop_items
List of items that the entity drops when it grows up. 小数値 duration 1200.0 Amount of time before the entity grows List feedItems List of items that can be fed to the entity. Includes 'item' for the item name and 'growth' to define how much time it grows up by 文字列 grow_up
Event to run when this entity grows up
minecraft:angry[編集 | ソースを編集]
- Defines the entity's 'angry' state using a timer.
- パラメーター
Type Name Default Value Description 真理値 broadcastAnger false If true, other entities of the same entity definition within the broadcastRange will also become angry 整数値 broadcastRange 20 Distance in blocks within which other entities of the same entity definition will become angry 文字列 calm_event
Event to run after the number of seconds specified in duration expires (when the entity stops being 'angry') 整数値 duration 25 The amount of time in seconds that the entity will be angry 整数値 duration_delta
0 Variance in seconds added to the duration [-delta, delta]
minecraft:boostable[編集 | ソースを編集]
- Defines the conditions and behavior of a rideable entity's boost
- パラメーター
Type Name Default Value Description List boost_items
List of items that can be used to boost while riding this entity. Each item has the following properties: - パラメーター
Type Name Default Value Description 整数値 damage 1 This is the damage that the item will take each time it is used 文字列 item Name of the item that can be used to boost 文字列 replaceItem The item used to boost will become this item once it is used up
整数値 duration 3 Time in seconds for the boost 小数値 speed_multiplier
1.0 Factor by which the entity's normal speed increases. E.g. 2.0 means go twice as fast
minecraft:breathable[編集 | ソースを編集]
- Defines what blocks this entity can breathe in and gives them the ability to suffocate
- パラメーター
Type Name Default Value Description List breatheBlocks List of blocks this entity can breathe in, in addition to the above 真理値 breathesAir true If true, this entity can breathe in air 真理値 breathesLava false If true, this entity can breathe in lava 真理値 breathesSolids false If true, this entity can breathe in solid blocks 真理値 breathesWater false If true, this entity can breathe in water 真理値 generatesBubbles true If true, this entity will have visible bubbles while in water 小数値 inhaleTime 0.0 Time in seconds to recover breath to maximum List nonBreatheBlocks List of blocks this entity can't breathe in, in addition to the above 整数値 suffocateTime -20 Time in seconds between suffocation damage 整数値 totalSupply 15 Time in seconds the entity can hold its breath
minecraft:breedable[編集 | ソースを編集]
- Defines the way an entity can get into the 'love' state.
- パラメーター
Type Name Default Value Description 真理値 allowSitting false If true, entities can breed while sitting 真理値 blend_attributes
true If true, the entities will blend their attributes in the offspring after they breed. For example, horses blend their health, movement, and jump_strength in their offspring. 小数値 breedCooldown 60.0 Time in seconds before the Entity can breed again List breedItems The list of items that can be used to get the entity into the 'love' state List breedsWith The list of entity definitions that this entity can breed with. - パラメーター
Type Name Default Value Description 文字列 babyType The entity definition of this entity's babies 文字列 breed_event
Event to run when this entity breeds 文字列 mateType The entity definition of this entity's mate
真理値 causes_pregnancy
false If true, the entity will become pregnant instead of spawning a baby. List environment_requirements
The list of nearby block requirements to get the entity into the 'love' state. block
- 解説
- The block types required nearby for the entity to breed.
count
- 解説
- The number of the required block types nearby for the entity to breed.
radius
- 解説
- How many blocks radius from the mob's center to search in for the required blocks. Bounded between 0 and 16.
小数値 extraBabyChance 0.0 Chance that up to 16 babies will spawn between 0.0 and 1.0, where 1.0 is 100% 真理値 inheritTamed true If true, the babies will be automatically tamed if its parents are JSON オブジェクト mutation_factor
Determines how likely the babies are to NOT inherit one of their parent's variances. Values are between 0.0 and 1.0, with a higher number meaning more likely to mutate - パラメーター
Type Name Default Value Description 小数値 color 0.0 The percentage chance of a mutation on the entity's color 小数値 extra_variant
0.0 The percentage chance of a mutation on the entity's extra variant type 小数値 variant 0.0 The percentage chance of a mutation on the entity's variant type
真理値 requireTame true If true, the entities need to be tamed first before they can breed.
minecraft:bribeable[編集 | ソースを編集]
- Defines the way an entity can get into the 'bribed' state.
- パラメーター
Type Name Default Value Description 小数値 bribe_cooldown
2.0 Time in seconds before the Entity can be bribed again List bribe_items
The list of items that can be used to bribe the entity
minecraft:burns_in_daylight[編集 | ソースを編集]
- Specifies if/how a mob burns in daylight.
minecraft:damage_over_time[編集 | ソースを編集]
- Applies defined amount of damage to the entity at specified intervals
- パラメーター
Type Name Default Value Description 整数値 damagePerHurt 1 Amount of damage caused each hurt 整数値 timeBetweenHurt 0 Time in seconds between damage
minecraft:damage_sensor[編集 | ソースを編集]
- Defines what events to call when this entity is damaged by specific entities or items. Can be either an array or a single instance.
- パラメーター
Type Name Default Value Description 文字列 cause Type of damage that triggers this set of events 真理値 deals_damage
true If true, the damage dealt to the entity will take off health from it. Set to false to make the entity ignore that damage List on_damage
List of triggers with the events to call when taking this specific kind of damage. Allows specifying filters for entity definitions and events
minecraft:environment_sensor[編集 | ソースを編集]
- Creates a trigger based on environment conditions.
- パラメーター
Type Name Default Value Description List on_environment
The list of triggers that fire when the environment conditions match the given filter criteria.
minecraft:equippable[編集 | ソースを編集]
- Defines an entity's behavior for having items equipped to it
- パラメーター
Type Name Default Value Description List slots List of slots and the item that can be equipped - パラメーター
Type Name Default Value Description List accepted_items
The list of items that can go in this slot 文字列 interact_text
Text to be displayed when the entity can be equipped with this item when playing with Touch-screen controls 文字列 item Name of the item that can be equipped for this slot 文字列 on_equip
Event to trigger when this entity is equipped with this item 文字列 on_unequip
Event to trigger when this item is removed from this entity 整数値 slot 0 The slot number of this slot
minecraft:explode[編集 | ソースを編集]
- Defines how the entity explodes.
- パラメーター
Type Name Default Value Description 真理値 breaks_blocks
true If true, the explosion will destroy blocks in the explosion radius 真理値 causesFire false If true, blocks in the explosion radius will be set on fire 真理値 destroyAffectedByGriefing false If true, whether the explosion breaks blocks is affected by the mob griefing game rule 真理値 fireAffectedByGriefing false If true, whether the explosion causes fire is affected by the mob griefing game rule Range [a, b] fuseLength [0.0, 0.0] The range for the random amount of time the fuse will be lit before exploding. A negative value means the explosion will be immediate 真理値 fuseLit false If true, the fuse is already lit when this component is added to the entity 小数値 maxResistance Infinite Blocks with less resistance than this value will be broken by the explosion 小数値 power 3.0 The radius of the explosion in blocks and the amount of damage the explosion deals
minecraft:genetics[編集 | ソースを編集]
- Defines the way a mob's genes and alleles are passed on to it's offspring, and how those traits manifest in the child. Compatible parent genes are crossed together, the alleles are handed down from the parents to the child, and any matching genetic variants fire off JSON events to modify the child and express the traits.
- パラメーター
Type Name Default Value Description List genes The list of genes that this entity has and will cross with a partner during breeding. - パラメーター
Type Name Default Value Description 整数値 allele_range
The range of positive integer allele values for this gene. Spawned mobs will have a random number in this range assigned to them. - パラメーター
Type Name Default Value Description 整数値 range_max
0 Upper bound of the allele values for this gene. 整数値 range_min
0 Lower bound of the allele values for this gene.
List genetic_variants
The list of genetic variants for this gene. These check for particular allele combinations and fire events when all of them are satisfied. - パラメーター
Type Name Default Value Description 文字列 birth_event
Event to run when this mob is created and matches the above allele conditions. 整数値 both_allele
-1 If this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with both. Can also be a range of integers. 整数値 either_allele
-1 If this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with either. Can also be a range of integers. 整数値 hidden_allele
-1 If this value is non-negative, compare the mob's hidden allele with this value for a match. Can also be a range of integers. 整数値 main_allele
-1 If this value is non-negative, compare the mob's main allele with this value for a match. Can also be a range of integers.
文字列 name The name of the gene.
小数値 mutation_rate
0.03125 Chance that an allele will be replaced with a random one instead of the parent's allele during birth.
minecraft:healable[編集 | ソースを編集]
- Defines the interactions with this entity for healing it.
- パラメーター
Type Name Default Value Description フィルター filters The list of conditions for this trigger 真理値 force_use
false Determines if item can be used regardless of entity being full health List items The list of items that can be used to heal this entity - パラメーター
Type Name Default Value Description フィルター filters The filters to test before applying any healing for the item 小数値 heal_amount
1.0 The amount of health this entity gains when fed this item 文字列 item Name of the item this entity likes and can be used to heal this entity
minecraft:hurt_when_wet[編集 | ソースを編集]
- Specifies if an actor is hurt when wet.
minecraft:insomnia[編集 | ソースを編集]
- Adds a timer since last rested to see if phantoms should spawn.
- パラメーター
Type Name Default Value Description 小数値 days_until_insomnia
3.0 Number of days the mob has to stay up until the insomnia effect begins.
minecraft:interact[編集 | ソースを編集]
- Defines interactions with this entity.
- パラメーター
Type Name Default Value Description JSON オブジェクト add_items
Loot table with items to add to the player's inventory upon successful interaction - パラメーター
Type Name Default Value Description 文字列 table File path, relative to the Behavior Pack's path, to the loot table file
小数値 cooldown 0.0 Time in seconds before this entity can be interacted with again 整数値 hurt_item
0 The amount of damage the item will take when used to interact with this entity. A value of 0 means the item won't lose durability 文字列 interact_text
Text to show when the player is able to interact in this way with this entity when playing with Touch-screen controls 文字列 on_interact
Event to fire when the interaction occurs JSON オブジェクト particle_on_start
Particle effect that will be triggered at the start of the interaction particle_offset_towards_interactor
- 解説
- Whether or not the particle will appear closer to who performed the interaction
particle_type
- 解説
- The type of particle that will be spawned
particle_y_offset
- 解説
- Will offset the particle this amount in the y direction
文字列 play_sounds
List of sounds to play when the interaction occurs 文字列 spawn_entities
List of entities to spawn when the interaction occurs JSON オブジェクト spawn_items
Loot table with items to drop on the ground upon successful interaction - パラメーター
Type Name Default Value Description 文字列 table File path, relative to the Behavior Pack's path, to the loot table file
真理値 swing false If true, the player will do the 'swing' animation when interacting with this entity 文字列 transform_to_item
The item used will transform to this item upon successful interaction. Format: itemName:auxValue 真理値 use_item
false If true, the interaction will use an item
minecraft:inventory[編集 | ソースを編集]
- Defines this entity's inventory properties.
- パラメーター
Type Name Default Value Description 整数値 additional_slots_per_strength
0 Number of slots that this entity can gain per extra strength 真理値 can_be_siphoned_from
false If true, the contents of this inventory can be removed by a hopper 文字列 container_type
none Type of container this entity has. Can be horse, minecart_chest, minecart_hopper, inventory, container or hopper 整数値 inventory_size
5 Number of slots the container has 真理値 private false If true, only the entity can access the inventory 真理値 restrict_to_owner
false If true, the entity's inventory can only be accessed by its owner or itself
minecraft:item_hopper[編集 | ソースを編集]
- Determines that this entity is an item hopper
minecraft:jump.dynamic[編集 | ソースを編集]
- Defines a dynamic type jump control that will change jump properties based on the speed modifier of the mob.
minecraft:jump.static[編集 | ソースを編集]
- Gives the entity the ability to jump.
- パラメーター
Type Name Default Value Description 小数値 jump_power
0.42 The initial vertical velocity for the jump
minecraft:leashable[編集 | ソースを編集]
- Allows this entity to be leashed and Defines the conditions and events for this entity when is leashed.
- パラメーター
Type Name Default Value Description 小数値 hard_distance
6.0 Distance in blocks at which the leash stiffens, restricting movement 小数値 max_distance
10.0 Distance in blocks at which the leash breaks 文字列 on_leash
Event to call when this entity is leashed 文字列 on_unleash
Event to call when this entity is unleashed 小数値 soft_distance
4.0 Distance in blocks at which the 'spring' effect starts acting to keep this entity close to the entity that leashed it
minecraft:lookat[編集 | ソースを編集]
- Defines the behavior when another entity looks at this entity.
- パラメーター
Type Name Default Value Description 文字列 filters player Defines the entities that can trigger this component Range [a, b] look_cooldown
[0.0, 0.0] The range for the random amount of time during which the entity is 'cooling down' and won't get angered or look for a target 文字列 look_event
Event to run when the entities specified in filters look at this entity 真理値 mAllowInvulnerable false If true, invulnerable entities (e.g. Players in creative mode) are considered valid targets 小数値 searchRadius 10.0 Maximum distance this entity will look for another entity looking at it 真理値 setTarget true If true, this entity will set the attack target as the entity that looked at it
minecraft:movement.amphibious[編集 | ソースを編集]
- This move control allows the mob to swim in water and walk on land.
- パラメーター
Type Name Default Value Description 小数値 max_turn
30.0 The maximum number in degrees the mob can turn per tick.
minecraft:movement.basic[編集 | ソースを編集]
- This component accents the movement of an entity.
- パラメーター
Type Name Default Value Description 小数値 max_turn
30.0 The maximum number in degrees the mob can turn per tick.
minecraft:movement.fly[編集 | ソースを編集]
- This move control causes the mob to fly.
- パラメーター
Type Name Default Value Description 小数値 max_turn
30.0 The maximum number in degrees the mob can turn per tick.
minecraft:movement.generic[編集 | ソースを編集]
- This move control allows a mob to fly, swim, climb, etc.
- パラメーター
Type Name Default Value Description 小数値 max_turn
30.0 The maximum number in degrees the mob can turn per tick.
minecraft:movement.jump[編集 | ソースを編集]
- Move control that causes the mob to jump as it moves with a specified delay between jumps.
- パラメーター
Type Name Default Value Description Range [a, b] jump_delay
[0.0, 0.0] Delay after landing when using the slime move control. 小数値 max_turn
30.0 The maximum number in degrees the mob can turn per tick.
minecraft:movement.skip[編集 | ソースを編集]
- This move control causes the mob to hop as it moves.
- パラメーター
Type Name Default Value Description 小数値 max_turn
30.0 The maximum number in degrees the mob can turn per tick.
minecraft:movement.sway[編集 | ソースを編集]
- This move control causes the mob to sway side to side giving the impression it is swimming.
- パラメーター
Type Name Default Value Description 小数値 max_turn
30.0 The maximum number in degrees the mob can turn per tick.
minecraft:nameable[編集 | ソースを編集]
- Allows this entity to be named (e.g. using a name tag)
- パラメーター
Type Name Default Value Description 真理値 allowNameTagRenaming true If true, this entity can be renamed with name tags 真理値 alwaysShow false If true, the name will always be shown 文字列 default_trigger
Trigger to run when the entity gets named JSON オブジェクト name_actions
Describes the special names for this entity and the events to call when the entity acquires those names - パラメーター
Type Name Default Value Description 文字列 name_filter
List of special names that will cause the events defined in 'on_named' to fire 文字列 on_named
Event to be called when this entity acquires the name specified in 'name_filter'
[編集 | ソースを編集]
- Allows this entity to generate paths that include vertical walls like the vanilla Spiders do.
- パラメーター
Type Name Default Value Description 真理値 avoid_portals
false Tells the pathfinder to avoid portals (like nether portals) when finding a path 真理値 avoid_sun
false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths 真理値 avoid_water
false Tells the pathfinder to avoid water when creating a path 真理値 can_open_doors
false Tells the pathfinder that it can path through a closed door assuming the AI will open the door 真理値 can_pass_doors
true Whether a path can be created through a door 真理値 can_path_over_water
false Tells the pathfinder whether or not it can travel on the surface of the water 真理値 can_sink
true Tells the pathfinder whether or not it will be pulled down by gravity while in water
[編集 | ソースを編集]
- Allows this entity to generate paths by flying around the air like the regular Ghast.
- パラメーター
Type Name Default Value Description 真理値 avoid_portals
false Tells the pathfinder to avoid portals (like nether portals) when finding a path 真理値 avoid_sun
false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths 真理値 avoid_water
false Tells the pathfinder to avoid water when creating a path 真理値 can_open_doors
false Tells the pathfinder that it can path through a closed door assuming the AI will open the door 真理値 can_pass_doors
true Whether a path can be created through a door 真理値 can_path_over_water
false Tells the pathfinder whether or not it can travel on the surface of the water 真理値 can_sink
true Tells the pathfinder whether or not it will be pulled down by gravity while in water
[編集 | ソースを編集]
- Allows this entity to generate paths in the air like the vanilla Parrots do.
- パラメーター
Type Name Default Value Description 真理値 avoid_portals
false Tells the pathfinder to avoid portals (like nether portals) when finding a path 真理値 avoid_sun
false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths 真理値 avoid_water
false Tells the pathfinder to avoid water when creating a path 真理値 can_open_doors
false Tells the pathfinder that it can path through a closed door assuming the AI will open the door 真理値 can_pass_doors
true Whether a path can be created through a door 真理値 can_path_over_water
false Tells the pathfinder whether or not it can travel on the surface of the water 真理値 can_sink
true Tells the pathfinder whether or not it will be pulled down by gravity while in water
[編集 | ソースを編集]
- Allows this entity to generate paths by walking, swimming, flying and/or climbing around and jumping up and down a block.
- パラメーター
Type Name Default Value Description 真理値 avoid_portals
false Tells the pathfinder to avoid portals (like nether portals) when finding a path 真理値 avoid_sun
false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths 真理値 avoid_water
false Tells the pathfinder to avoid water when creating a path 真理値 can_open_doors
false Tells the pathfinder that it can path through a closed door assuming the AI will open the door 真理値 can_pass_doors
true Whether a path can be created through a door 真理値 can_path_over_water
false Tells the pathfinder whether or not it can travel on the surface of the water 真理値 can_sink
true Tells the pathfinder whether or not it will be pulled down by gravity while in water
[編集 | ソースを編集]
- Allows this entity to generate paths that include water.
- パラメーター
Type Name Default Value Description 真理値 avoid_portals
false Tells the pathfinder to avoid portals (like nether portals) when finding a path 真理値 avoid_sun
false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths 真理値 avoid_water
false Tells the pathfinder to avoid water when creating a path 真理値 can_open_doors
false Tells the pathfinder that it can path through a closed door assuming the AI will open the door 真理値 can_pass_doors
true Whether a path can be created through a door 真理値 can_path_over_water
false Tells the pathfinder whether or not it can travel on the surface of the water 真理値 can_sink
true Tells the pathfinder whether or not it will be pulled down by gravity while in water
[編集 | ソースを編集]
- Allows this entity to generate paths by walking around and jumping up and down a block like regular mobs.
- パラメーター
Type Name Default Value Description 真理値 avoid_portals
false Tells the pathfinder to avoid portals (like nether portals) when finding a path 真理値 avoid_sun
false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths 真理値 avoid_water
false Tells the pathfinder to avoid water when creating a path 真理値 can_open_doors
false Tells the pathfinder that it can path through a closed door assuming the AI will open the door 真理値 can_pass_doors
true Whether a path can be created through a door 真理値 can_path_over_water
false Tells the pathfinder whether or not it can travel on the surface of the water 真理値 can_sink
true Tells the pathfinder whether or not it will be pulled down by gravity while in water
minecraft:peek[編集 | ソースを編集]
- Defines the entity's 'peek' behavior, defining the events that should be called during it
- パラメーター
Type Name Default Value Description 文字列 on_close
Event to call when the entity is done peeking 文字列 on_open
Event to call when the entity starts peeking 文字列 on_target_open
Event to call when the entity's target entity starts peeking
minecraft:projectile[編集 | ソースを編集]
- Allows the entity to be a thrown entity.
- パラメーター
Type Name Default Value Description 小数値 angleoffset 0.0 Determines the angle at which the projectile is thrown 真理値 catchFire false If true, the entity hit will be set on fire 真理値 critParticleOnHurt false If true, the projectile will produce additional particles when a critical hit happens 真理値 destroyOnHurt false If true, this entity will be destroyed when hit 文字列 filter Entity Definitions defined here can't be hurt by the projectile 真理値 fireAffectedByGriefing false If true, whether the projectile causes fire is affected by the mob griefing game rule 小数値 gravity 0.05 The gravity applied to this entity when thrown. The higher the value, the faster the entity falls 文字列 hitSound The sound that plays when the projectile hits something 真理値 homing false If true, the projectile homes in to the nearest entity 小数値 inertia 0.99 The fraction of the projectile's speed maintained every frame while traveling in air 真理値 isdangerous false If true, the projectile will be treated as dangerous to the players 真理値 knockback true If true, the projectile will knock back the entity it hits 真理値 lightning false If true, the entity hit will be struck by lightning 小数値 liquid_inertia
0.6 The fraction of the projectile's speed maintained every frame while traveling in water 真理値 multipletargets true If true, the projectile can hit multiple entities per flight Vector [a, b, c] offset [0.0, 0.5, 0.0] The offset from the entity's anchor where the projectile will spawn 小数値 onFireTime 5.0 Time in seconds that the entity hit will be on fire for 文字列 particle iconcrack Particle to use upon collision 整数値 potionEffect -1 Defines the effect the arrow will apply to the entity it hits 小数値 power 1.3 Determines the velocity of the projectile 真理値 reflectOnHurt false If true, this entity will be reflected back when hit 真理値 semirandomdiffdamage false If true, damage will be randomized based on damage and speed 文字列 shootSound The sound that plays when the projectile is shot 真理値 shoottarget true If true, the projectile will be shot towards the target of the entity firing it 真理値 shouldbounce false If true, the projectile will bounce upon hit 真理値 splashPotion false If true, the projectile will be treated like a splash potion 小数値 splashRange 4.0 Radius in blocks of the 'splash' effect 小数値 uncertaintyBase 0.0 The base accuracy. Accuracy is determined by the formula uncertaintyBase – difficultyLevel * uncertaintyMultiplier
小数値 uncertaintyMultiplier 0.0 Determines how much difficulty affects accuracy. Accuracy is determined by the formula uncertaintyBase – difficultyLevel * uncertaintyMultiplier
minecraft:rail_movement[編集 | ソースを編集]
- Defines the entity's movement on the rails. An entity with this component is only allowed to move on the rail.
- パラメーター
Type Name Default Value Description 小数値 max_speed
0.4 Maximum speed that this entity will move at when on the rail
minecraft:rail_sensor[編集 | ソースを編集]
- Defines the behavior of the entity when the rail gets activated or deactivated.
- パラメーター
Type Name Default Value Description 真理値 check_block_types
false If true, on tick this entity will trigger its on_deactivate behavior 真理値 eject_on_activate
true If true, this entity will eject all of its riders when it passes over an activated rail 真理値 eject_on_deactivate
false If true, this entity will eject all of its riders when it passes over a deactivated rail 文字列 on_activate
Event to call when the rail is activated 文字列 on_deactivate
Event to call when the rail is deactivated 真理値 tick_command_block_on_activate
true If true, command blocks will start ticking when passing over an activated rail 真理値 tick_command_block_on_deactivate
false If false, command blocks will stop ticking when passing over a deactivated rail
minecraft:rideable[編集 | ソースを編集]
- Determines whether this entity can be ridden. Allows specifying the different seat positions and quantity.
- パラメーター
Type Name Default Value Description 整数値 controlling_seat
0 The seat that designates the driver of the entity 真理値 crouching_skip_interact
true If true, this entity can't be interacted with if the entity interacting with it is crouching List family_types
List of entities that can ride this entity 文字列 interact_text
The text to display when the player can interact with the entity when playing with Touch-screen controls 真理値 pull_in_entities
false If true, this entity will pull in entities that are in the correct family_types into any available seats 真理値 rider_can_interact
false If true, this entity will be picked when looked at by the rider 整数値 seat_count
1 The number of entities that can ride this entity at the same time List seats The list of positions and number of riders for each position for entities riding this entity - パラメーター
Type Name Default Value Description 小数値 lock_rider_rotation
181.0 Angle in degrees that a rider is allowed to rotate while riding this entity. Omit this property for no limit 整数値 max_rider_count
0 Defines the maximum number of riders that can be riding this entity for this seat to be valid 整数値 min_rider_count
0 Defines the minimum number of riders that need to be riding this entity before this seat can be used Vector [a, b, c] position [0.0, 0.0, 0.0] Position of this seat relative to this entity's position 小数値 rotate_rider_by
0.0 Offset to rotate riders by
minecraft:scaffolding_climber[編集 | ソースを編集]
- Allows the player to detect and manuever on the scaffolding block.
minecraft:scale_by_age[編集 | ソースを編集]
- Defines the entity's size interpolation based on the entity's age.
- パラメーター
Type Name Default Value Description 小数値 end_scale
1.0 Ending scale of the entity when it's fully grown 小数値 start_scale
1.0 Initial scale of the newborn entity
[編集 | ソースを編集]
- Defines a list of items the mob wants to share. Each item must have the following parameters:
- パラメーター
Type Name Default Value Description List items List of items that the entity wants to share craft_into
- 解説
- Defines the item this entity wants to craft with the item defined above. Should be an item name
item
- 解説
- The name of the item
surplus_amount
- 解説
- Number of this item considered extra that the entity wants to share
want_amount
- 解説
- Number of this item this entity wants to share
minecraft:shooter[編集 | ソースを編集]
- Defines the entity's ranged attack behavior.
- パラメーター
Type Name Default Value Description 整数値 auxVal -1 ID of the Potion effect to be applied on hit 文字列 def Entity definition to use as projectile for the ranged attack. The entity definition must have the projectile component to be able to be shot as a projectile
minecraft:sittable[編集 | ソースを編集]
- Defines the entity's 'sit' state.
- パラメーター
Type Name Default Value Description 文字列 sit_event
Event to run when the entity enters the 'sit' state 文字列 stand_event
Event to run when the entity exits the 'sit' state
minecraft:spawn_entity[編集 | ソースを編集]
- Adds a timer after which this entity will spawn another entity or item (similar to vanilla's chicken's egg-laying behavior).
- パラメーター
Type Name Default Value Description 整数値 max_wait_time
600 Maximum amount of time to randomly wait in seconds before another entity is spawned 整数値 min_wait_time
300 Minimum amount of time to randomly wait in seconds before another entity is spawned 文字列 spawn_entity
Identifier of the entity to spawn. Leave empty to spawn the item defined above instead 文字列 spawn_event
minecraft:entity_born Event to call when the entity is spawned 文字列 spawn_item
egg Name of the item to spawn 文字列 spawn_method
born Method to use to spawn the entity 文字列 spawn_sound
plop Name of the sound effect to play when the entity is spawned
minecraft:tameable[編集 | ソースを編集]
- Defines the rules for a mob to be tamed by the player.
- パラメーター
Type Name Default Value Description 小数値 probability 1.0 The chance of taming the entity with each item use between 0.0 and 1.0, where 1.0 is 100% List tameItems The list of items that can be used to tame this entity 文字列 tame_event
Event to run when this entity becomes tamed
minecraft:tamemount[編集 | ソースを編集]
- Allows the Entity to be tamed by mounting it.
- パラメーター
Type Name Default Value Description 整数値 attemptTemperMod 5 The amount the entity's temper will increase when mounted JSON オブジェクト autoRejectItems The list of items that, if carried while interacting with the entity, will anger it - パラメーター
Type Name Default Value Description 文字列 item Name of the item this entity dislikes and will cause it to get angry if used while untamed
JSON オブジェクト feedItems The list of items that can be used to increase the entity's temper and speed up the taming process - パラメーター
Type Name Default Value Description 文字列 item Name of the item this entity likes and can be used to increase this entity's temper 小数値 temperMod 0.0 The amount of temper this entity gains when fed this item
文字列 feed_text
The text that shows in the feeding interact button 整数値 maxTemper 100 The maximum value for the entity's random starting temper 整数値 minTemper 0 The minimum value for the entity's random starting temper 文字列 ride_text
The text that shows in the riding interact button 文字列 tame_event
Event that triggers when the entity becomes tamed
minecraft:target_nearby_sensor[編集 | ソースを編集]
- Defines the entity's range within which it can see or sense other entities to target them.
- パラメーター
Type Name Default Value Description 小数値 inside_range
1.0 Maximum distance in blocks that another entity will be considered in the 'inside' range 文字列 on_inside_range
Event to call when an entity gets in the inside range. Can specify 'event' for the name of the event and 'target' for the target of the event 文字列 on_outside_range
Event to call when an entity gets in the outside range. Can specify 'event' for the name of the event and 'target' for the target of the event 小数値 outside_range
5.0 Maximum distance in blocks that another entity will be considered in the 'outside' range
minecraft:teleport[編集 | ソースを編集]
- Defines an entity's teleporting behavior.
- パラメーター
Type Name Default Value Description 小数値 darkTeleportChance 0.01 Modifies the chance that the entity will teleport if the entity is in darkness 小数値 lightTeleportChance 0.01 Modifies the chance that the entity will teleport if the entity is in daylight 小数値 maxRandomTeleportTime 20.0 Maximum amount of time in seconds between random teleports 小数値 minRandomTeleportTime 0.0 Minimum amount of time in seconds between random teleports Vector [a, b, c] randomTeleportCube [32.0, 16.0, 32.0] Entity will teleport to a random position within the area defined by this cube 真理値 randomTeleports true If true, the entity will teleport randomly 小数値 targetDistance 16.0 Maximum distance the entity will teleport when chasing a target 小数値 target_teleport_chance
1.0 The chance that the entity will teleport between 0.0 and 1.0. 1.0 means 100%
minecraft:tick_world[編集 | ソースを編集]
- Defines if the entity ticks the world and the radius around it to tick.
- パラメーター
Type Name Default Value Description 小数値 distance_to_players
128 The distance at which the closest player has to be before this entity despawns. This option will be ignored if never_despawn is true. Min: 128 blocks. 真理値 never_despawn
true If true, this entity will not despawn even if players are far away. If false, distance_to_players will be used to determine when to despawn. Positive Integer radius 2 The area around the entity to tick. Default: 2. Allowed range: 2-6.
minecraft:timer[編集 | ソースを編集]
- Adds a timer after which an event will fire.
- パラメーター
Type Name Default Value Description 真理値 looping true If true, the timer will restart every time after it fires 真理値 randomInterval true If true, the amount of time on the timer will be random between the min and max values specified in time Range [a, b] time [0.0, 0.0] Amount of time in seconds for the timer. Can be specified as a number or a pair of numbers (min and max) 文字列 time_down_event
Event to fire when the time on the timer runs out
minecraft:trade_table[編集 | ソースを編集]
- Defines this entity's ability to trade with players.
- パラメーター
Type Name Default Value Description 文字列 display_name
Name to be displayed while trading with this entity 文字列 table File path relative to the resource pack root for this entity's trades
minecraft:transformation[編集 | ソースを編集]
- Defines an entity's transformation from the current definition into another
- パラメーター
Type Name Default Value Description JSON オブジェクト add List of components to add to the entity after the transformation - パラメーター
Type Name Default Value Description List component_groups
Names of component groups to add
文字列 begin_transform_sound
Sound to play when the transformation starts JSON オブジェクト delay Defines the properties of the delay for the transformation - パラメーター
Type Name Default Value Description 小数値 block_assist_chance
0.0 Chance that the entity will look for nearby blocks that can speed up the transformation. Value must be between 0.0 and 1.0 小数値 block_chance
0.0 Chance that, once a block is found, will help speed up the transformation 整数値 block_max
0 Maximum number of blocks the entity will look for to aid in the transformation. If not defined or set to 0, it will be set to the block radius 整数値 block_radius
0 Distance in Blocks that the entity will search for blocks that can help the transformation List block_types
List of blocks that can help the transformation of this entity 真理値 keep_owner
If this entity is owned by another entity, it should remain owned after transformation. 小数値 value 0.0 Time in seconds before the entity transforms
真理値 drop_equipment
Cause the entity to drop all equipment upon transformation 文字列 into Entity Definition that this entity will transform into 文字列 transformation_sound
Sound to play when the entity is done transforming
minecraft:trusting[編集 | ソースを編集]
- Defines the rules for a mob to trust players.
- パラメーター
Type Name Default Value Description 小数値 probability 1.0 The chance of the entity trusting with each item use between 0.0 and 1.0, where 1.0 is 100% 文字列 trust_event
Event to run when this entity becomes trusting List trust_items
The list of items that can be used to get the entity to trust players
AI Goals[編集 | ソースを編集]
minecraft.behavior.scared[編集 | ソースを編集]
- Allows the a mob to become scared when the weather outside is thundering
- パラメーター
Type Name Default Value Description 整数値 sound_interval
0 The interval in which a sound will play when active in a 1/delay chance to kick off
minecraft:behavior.avoid_mob_type[編集 | ソースを編集]
- Allows this entity to avoid certain mob types.
- パラメーター
Type Name Default Value Description JSON オブジェクト entity_types
List of entity types this mob avoids. - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
真理値 ignore_visibility
false If true, visbility between this entity and the mob type will not be checked. 小数値 max_dist
0.0 Maximum distance to look for an entity 小数値 max_flee
0.5 Distance in blocks within the mob considers it should stop fleeing. 小数値 probability_per_strength
1.0 Determines how likely it is that this entity will stop avoiding another entity based on that entity's strength 小数値 sprint_speed_multiplier
1.0 Multiplier for running speed. 1.0 means keep the regular speed, while higher numbers make the running speed faster 小数値 walk_speed_multiplier
1.0 Multiplier for walking speed. 1.0 means keep the regular speed, while higher numbers make the walking speed faster
minecraft:behavior.beg[編集 | ソースを編集]
- Allows this mob to look at and follow the player that holds food they like.
- パラメーター
Type Name Default Value Description List items List of items that this mob likes 小数値 look_distance
8.0 Distance in blocks the mob will beg from Range [a, b] look_time
[2, 4] The range of time in seconds this mob will stare at the player holding a food they like, begging for it
minecraft:behavior.break_door[編集 | ソースを編集]
- Allows this mob to break doors.
minecraft:behavior.breed[編集 | ソースを編集]
- Allows this mob to breed with other mobs.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.charge_attack[編集 | ソースを編集]
- Allows the mob to attack its target by running at it.
minecraft:behavior.circle_around_anchor[編集 | ソースを編集]
- Allows the mob to move in a circle around a point or a target.
- パラメーター
Type Name Default Value Description 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot Range [a, b] height_above_target_range
[0.0, 0.0] When the mob finds a target, the range of height in blocks above the target to start the anchor point. 整数値 height_change_chance
350 A random value to determine when to change the height of the mob from the anchor point. This has a 1/value chance every tick to do so. Range [a, b] height_offset_range
[0.0, 0.0] The range of height in blocks offset the mob can have from it's anchor point. 整数値 radius_change_chance
250 A random value to determine when to increase the size of the radius up to the maximum. This has a 1/value chance every tick to do so. Range [a, b] radius_range
[5.0, 15.0] Range of radius in blocks of the circle to move around. 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.controlled_by_player[編集 | ソースを編集]
- Allows the mob to be controlled by the player.
minecraft:behavior.defend_village_target[編集 | ソースを編集]
- Allows the mob to stay in the village and fight mobs hostile to the villagers.
- パラメーター
Type Name Default Value Description JSON オブジェクト entity_types
List of entity types this mob considers a threat to the village - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
minecraft:behavior.door_interact[編集 | ソースを編集]
- Allows the mob to open and close doors.
minecraft:behavior.dragonchargeplayer[編集 | ソースを編集]
- Allows the dragon to attack a player by flying fast at them. The player is chosen by the dragonscanning goal. Can only be used by the Ender Dragon.
minecraft:behavior.dragondeath[編集 | ソースを編集]
- Allows the dragon to go out with glory. This controls the Ender Dragon's death animation and can't be used by other mobs.
minecraft:behavior.dragonflaming[編集 | ソースを編集]
- Allows the dragon to use its flame breath attack. Can only be used by the Ender Dragon.
minecraft:behavior.dragonholdingpattern[編集 | ソースを編集]
- Allows the Dragon to fly around in a circle around the center podium. Can only be used by the Ender Dragon.
minecraft:behavior.dragonlanding[編集 | ソースを編集]
- Allows the Dragon to stop flying and transition into perching mode. Can only be used by the Ender Dragon.
minecraft:behavior.dragonscanning[編集 | ソースを編集]
- Allows the dragon to look around for a player to attack while in perch mode. Can only be used by the Ender Dragon.
minecraft:behavior.dragonstrafeplayer[編集 | ソースを編集]
- Allows the dragon to fly around looking for a player and shoot fireballs at them. Can only be used by the Ender Dragon.
minecraft:behavior.dragontakeoff[編集 | ソースを編集]
- Allows the dragon to leave perch mode and go back to flying around. Can only be used by the Ender Dragon.
minecraft:behavior.drop_item_for[編集 | ソースを編集]
- Allows the mob to move near a target and drop an item.
- パラメーター
Type Name Default Value Description 小数値 drop_item_chance
[1.0] The probability that the mob will drop an item. JSON オブジェクト entity_types
List of entity types this mob will drop items for. - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 文字列 loot_table
Loot table to select items from. 小数値 max_dist
0.0 Maximum distance in blocks this mob will look for entities to drop an item for. 小数値 offering_distance
[1.0] The distance in blocks the mob will try to be away from the entity when it drops the item. 文字列 on_drop_attempt
Event to run when this mob attempts to drop an item. 整数値 search_height
1 Height in blocks from the target the mob can be. 整数値 search_range
0 The distance in blocks from the target the mob can be. 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal Range [a, b] time_of_day_range
[0.0, 1.0] The valid times of day that this goal can be used. For reference: noon is 0.0, sunset is 0.25, midnight is 0.5, and sunrise is 0.75, and back to noon for 1.0.
minecraft:behavior.eat_block[編集 | ソースを編集]
- Allows the mob to eat a block (for example, sheep eating grass).
- パラメーター
Type Name Default Value Description Trigger on_eat
Trigger to fire when the mob eats a block of grass
minecraft:behavior.enderman_leave_block[編集 | ソースを編集]
- Allows the enderman to drop a block they are carrying. Can only be used by Endermen.
minecraft:behavior.enderman_take_block[編集 | ソースを編集]
- Allows the enderman to take a block and carry it around. Can only be used by Endermen.
minecraft:behavior.find_mount[編集 | ソースを編集]
- Allows the mob to look around for another mob to ride atop it.
- パラメーター
Type Name Default Value Description 真理値 avoid_water
false If true, the mob will not go into water blocks when going towards a mount 小数値 mount_distance
-1.0 This is the distance the mob needs to be, in blocks, from the desired mount to mount it. If the value is below 0, the mob will use its default attack distance 整数値 start_delay
0 Time the mob will wait before starting to move towards the mount 真理値 target_needed
false If true, the mob will only look for a mount if it has a target 小数値 within_radius
0.0 Distance in blocks within which the mob will look for a mount
minecraft:behavior.find_underwater_treasure[編集 | ソースを編集]
- Allows the mob to move towards the nearest underwater ruin or shipwreck.
- パラメーター
Type Name Default Value Description 整数値 search_range
0 The range that the mob will search for a treasure chest within a ruin or shipwreck to move towards. 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 小数値 stop_distance
2.0 The distance the mob will move before stopping.
minecraft:behavior.flee_sun[編集 | ソースを編集]
- Allows the mob to run away from direct sunlight and seek shade.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.float[編集 | ソースを編集]
- Allows the mob to stay afloat while swimming.
minecraft:behavior.float_wander[編集 | ソースを編集]
- Allows the mob to float around like the Ghast.
- パラメーター
Type Name Default Value Description Range [a, b] float_duration
[0.0, 0.0] Range of time in seconds the mob will float around before landing and choosing to do something else 真理値 must_reach
false If true, the point has to be reachable to be a valid target 真理値 random_reselect
false If true, the mob will randomly pick a new point while moving to the previously selected one 整数値 xz_dist
10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 整数値 y_dist
7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1 小数値 y_offset
0.0 Height in blocks to add to the selected target position
minecraft:behavior.follow_caravan[編集 | ソースを編集]
- Allows the mob to follow mobs that are in a caravan.
- パラメーター
Type Name Default Value Description 整数値 entity_count
1 Number of entities that can be in the caravan JSON オブジェクト entity_types
List of entity types that this mob can follow in a caravan - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.follow_mob[編集 | ソースを編集]
- Allows the mob to follow other mobs.
- パラメーター
Type Name Default Value Description 整数値 search_range
0 The distance in blocks it will look for a mob to follow 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 小数値 stop_distance
2.0 The distance in blocks this mob stops from the mob it is following
minecraft:behavior.follow_owner[編集 | ソースを編集]
- Allows the mob to follow the player that owns them.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 小数値 start_distance
10.0 The distance in blocks that the owner can be away from this mob before it starts following it 小数値 stop_distance
2.0 The distance in blocks this mob will stop from its owner while following it
minecraft:behavior.follow_parent[編集 | ソースを編集]
- Allows the mob to follow their parent around.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.go_home[編集 | ソースを編集]
- Allows the mob to move back to the position they were spawned.
- パラメーター
Type Name Default Value Description 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 整数値 interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal 文字列 on_home
Event to run when this mob gets home. 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.guardian_attack[編集 | ソースを編集]
- Allows the guardian to use its laser beam attack. Can only be used by Guardians and Elder Guardians.
minecraft:behavior.harvest_farm_block[編集 | ソースを編集]
- Allows the villager to harvest nearby farms. Can only be used by Villagers.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.hurt_by_target[編集 | ソースを編集]
- Allows the mob to target another mob that hurts them.
- パラメーター
Type Name Default Value Description 真理値 alert_same_type
false If true, nearby mobs of the same type will be alerted about the damage JSON オブジェクト entity_types
List of entity types that this mob can target when hurt by them - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
真理値 hurt_owner
false If true, the mob will hurt its owner and other mobs with the same owner as itself
minecraft:behavior.lay_down[編集 | ソースを編集]
- Allows mobs to lay down at times
- パラメーター
Type Name Default Value Description 整数値 interval 120 A random value to determine at what intervals something can occur. This has a 1/interval chance to choose this goal 整数値 random_stop_interval
120 a random value in which the goal can use to pull out of the behavior. This is a 1/interval chance to play the sound
minecraft:behavior.lay_egg[編集 | ソースを編集]
- Allows the mob to lay an egg block on a sand block if the mob is pregnant.
- パラメーター
Type Name Default Value Description 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 文字列 on_lay
Event to run when this mob lays the egg. 整数値 search_count
10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick 整数値 search_height
1 Height in blocks the mob will look for sand block to move towards 整数値 search_range
0 The distance in blocks it will look for a sand block to move towards 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.leap_at_target[編集 | ソースを編集]
- Allows monsters to jump at and attack their target. Can only be used by hostile mobs.
- パラメーター
Type Name Default Value Description 真理値 must_be_on_ground
true If true, the mob will only jump at its target if its on the ground. Setting it to false will allow it to jump even if its already in the air 小数値 yd 0.0 The height in blocks the mob jumps when leaping at its target
minecraft:behavior.look_at_entity[編集 | ソースを編集]
- Allows the mob to look at nearby entities.
- パラメーター
Type Name Default Value Description 整数値 angle_of_view_horizontal
360 The angle in degrees that the mob can see in the Y-axis (up-down) 整数値 angle_of_view_vertical
360 The angle in degrees that the mob can see in the X-axis (left-right) フィルター filters Filter to determine the conditions for this mob to look at the entity 小数値 look_distance
8.0 The distance in blocks from which the entity will look at Range [a, b] look_time
[2, 4] Time range to look at the entity 小数値 probability 0.02 The probability of looking at the target. A value of 1.00 is 100%
minecraft:behavior.look_at_player[編集 | ソースを編集]
- Allows the mob to look at the player when the player is nearby.
- パラメーター
Type Name Default Value Description 整数値 angle_of_view_horizontal
360 The angle in degrees that the mob can see in the Y-axis (up-down) 整数値 angle_of_view_vertical
360 The angle in degrees that the mob can see in the X-axis (left-right) 小数値 look_distance
8.0 The distance in blocks from which the entity will look at Range [a, b] look_time
[2, 4] Time range to look at the entity 小数値 probability 0.02 The probability of looking at the target. A value of 1.00 is 100%
minecraft:behavior.look_at_target[編集 | ソースを編集]
- Allows the mob to look at the entity they are targetting.
- パラメーター
Type Name Default Value Description 整数値 angle_of_view_horizontal
360 The angle in degrees that the mob can see in the Y-axis (up-down) 整数値 angle_of_view_vertical
360 The angle in degrees that the mob can see in the X-axis (left-right) 小数値 look_distance
8.0 The distance in blocks from which the entity will look at Range [a, b] look_time
[2, 4] Time range to look at the entity 小数値 probability 0.02 The probability of looking at the target. A value of 1.00 is 100%
minecraft:behavior.look_at_trading_player[編集 | ソースを編集]
- Allows the mob to look at the player they are trading with.
- パラメーター
Type Name Default Value Description 整数値 angle_of_view_horizontal
360 The angle in degrees that the mob can see in the Y-axis (up-down) 整数値 angle_of_view_vertical
360 The angle in degrees that the mob can see in the X-axis (left-right) 小数値 look_distance
8.0 The distance in blocks from which the entity will look at Range [a, b] look_time
[2, 4] Time range to look at the entity 小数値 probability 0.02 The probability of looking at the target. A value of 1.00 is 100%
minecraft:behavior.make_love[編集 | ソースを編集]
- Allows the villager to look for a mate to spawn other villagers with. Can only be used by Villagers.
minecraft:behavior.melee_attack[編集 | ソースを編集]
- Allows the mob to use close combat melee attacks.
- パラメーター
Type Name Default Value Description 真理値 attack_once
false If true, this mob will attack only one time. 文字列 attack_types
Defines the entity types this mob will attack 小数値 melee_fov
90.0 The allowable FOV the actor will use to determine if it can make a valid melee attack 整数値 random_stop_interval
0 Defines the probability the mob will stop fighting. A value of 0 disables randomly stopping, while a value of 1 defines a 50% chance 小数値 reach_multiplier
2.0 Multiplier for how far outside its box the mob can reach its target (this can be used to simulate a mob with longer arms by making this bigger) 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 真理値 track_target
false If true, this mob will chase after the target as long as it's a valid target
minecraft:behavior.mount_pathing[編集 | ソースを編集]
- Allows the mob to move around on its own while mounted seeking a target to attack.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 小数値 target_dist
0.0 The distance at which this mob wants to be away from its target 真理値 track_target
false If true, this mob will chase after the target as long as it's a valid target
minecraft:behavior.move_indoors[編集 | ソースを編集]
- Can only be used by Villagers. Allows them to seek shelter indoors.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.move_through_village[編集 | ソースを編集]
- Can only be used by Villagers. Allows the villagers to create paths around the village.
- パラメーター
Type Name Default Value Description 真理値 only_at_night
false If true, the mob will only move through the village during night time 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.move_to_land[編集 | ソースを編集]
- Allows the mob to move back onto land when in water.
- パラメーター
Type Name Default Value Description 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 整数値 search_count
10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick 整数値 search_height
1 Height in blocks the mob will look for land to move towards 整数値 search_range
0 The distance in blocks it will look for land to move towards 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.move_to_water[編集 | ソースを編集]
- Allows the mob to move back into water when on land.
- パラメーター
Type Name Default Value Description 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 整数値 search_count
10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick 整数値 search_height
1 Height in blocks the mob will look for water to move towards 整数値 search_range
0 The distance in blocks it will look for water to move towards 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.move_towards_restriction[編集 | ソースを編集]
- Allows Guardians, Iron Golems and Villagers to move within their pre-defined area that the mob should be restricted to. Other mobs don't have a restriction defined.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.move_towards_target[編集 | ソースを編集]
- Allows mob to move towards its current target.
- パラメーター
Type Name Default Value Description 小数値 within_radius
0.0 Defines the radius in blocks that the mob tries to be from the target. A value of 0 means it tries to occupy the same block as the target
minecraft:behavior.nearest_attackable_target[編集 | ソースを編集]
- Allows the mob to check for and pursue the nearest valid target.
- パラメーター
Type Name Default Value Description 整数値 attack_interval
0 Time in seconds between attacks JSON オブジェクト entity_types
List of entity types that this mob considers valid targets - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
真理値 must_reach
false If true, only entities that this mob can path to can be selected as targets 真理値 must_see
false If true, only entities in this mob's viewing range can be selected as targets 小数値 must_see_forget_duration
3.0 Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more 小数値 persist_time
0.0f Time in seconds for a valid target to stay targeted when it becomes and invalid target. 真理値 reselect_targets
false If true, the target will change to the current closest entity whenever a different entity is closer 整数値 scan_interval
10 How many ticks to wait between scanning for a target. 小数値 target_search_height
-1.0f Height in blocks to search for a target mob. -1.0f means the height does not matter. 小数値 within_radius
0.0 Distance in blocks that the target can be within to launch an attack
minecraft:behavior.ocelot_sit_on_block[編集 | ソースを編集]
- Allows to mob to be able to sit in place like the ocelot.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.ocelotattack[編集 | ソースを編集]
- Can only be used by the Ocelot. Allows it to perform the sneak and pounce attack.
- パラメーター
Type Name Default Value Description 小数値 sneak_speed_multiplier
1.0 Multiplier for the sneaking speed. 1.0 means the ocelot will move at the speed it normally sneaks 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed of this mob while using this attack 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed while using this attack
minecraft:behavior.offer_flower[編集 | ソースを編集]
- Allows the mob to offer the player a flower like the Iron Golem does.
minecraft:behavior.open_door[編集 | ソースを編集]
- Allows the mob to open doors. Requires the mob to be able to path through doors, otherwise the mob won't even want to try opening them.
- パラメーター
Type Name Default Value Description 真理値 close_door_after
true If true, the mob will close the door after opening it and going through it
minecraft:behavior.owner_hurt_by_target[編集 | ソースを編集]
- Allows the mob to target another mob that hurts their owner.
- パラメーター
Type Name Default Value Description JSON オブジェクト entity_types
List of entity types that this mob can target if they hurt their owner - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
minecraft:behavior.owner_hurt_target[編集 | ソースを編集]
- Allows the mob to target a mob that is hurt by their owner.
- パラメーター
Type Name Default Value Description JSON オブジェクト entity_types
List of entity types that this entity can target if the potential target is hurt by this mob's owner - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
minecraft:behavior.panic[編集 | ソースを編集]
- Allows the mob to enter the panic state, which makes it run around and away from the damage source that made it enter this state.
- パラメーター
Type Name Default Value Description 真理値 force false If true, this mob will not stop panicking until it can't move anymore or the goal is removed from it 真理値 prefer_water
false If true, the mob will prefer water over land 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.peek[編集 | ソースを編集]
- Allows the mob to peek out. This is what the shulker uses to look out of its shell.
minecraft:behavior.pet_sleep_with_owner[編集 | ソースを編集]
- Allows the pet mob to move onto a bed with it's owner while sleeping.
- パラメーター
Type Name Default Value Description 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 整数値 search_height
1 Height in blocks from the owner the pet can be to sleep with owner. 整数値 search_range
0 The distance in blocks from the owner the pet can be to sleep with owner. 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.pickup_items[編集 | ソースを編集]
- Allows the mob to pick up items on the ground.
- パラメーター
Type Name Default Value Description 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 小数値 max_dist
0.0 Maximum distance this mob will look for items to pick up 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 真理値 track_target
false If true, this mob will chase after the target as long as it's a valid target
minecraft:behavior.play[編集 | ソースを編集]
- Allows the mob to play with other baby villagers. This can only be used by Villagers.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.player_ride_tamed[編集 | ソースを編集]
- Allows the mob to be ridden by the player after being tamed.
minecraft:behavior.raid_garden[編集 | ソースを編集]
- Allows the mob to eat crops out of farms until they are full.
- パラメーター
Type Name Default Value Description List blocks Blocks that the mob is looking for to eat 整数値 eat_delay
2 Time in seconds between each time it eats 整数値 full_delay
100 Amount of time in seconds before this mob wants to eat again 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 整数値 max_to_eat
6 Maximum number of things this entity wants to eat 整数値 search_range
0 Distance in blocks the mob will look for crops to eat 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.random_breach[編集 | ソースを編集]
- Allows the mob to randomly break surface of the water.
- パラメーター
Type Name Default Value Description 小数値 cooldown_time
0.0 Time in seconds the mob has to wait before using the goal again 整数値 interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 整数値 xz_dist
10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 整数値 y_dist
7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
minecraft:behavior.random_fly[編集 | ソースを編集]
- Allows a mob to randomly fly around.
- パラメーター
Type Name Default Value Description 真理値 can_land_on_trees
true If true, the mob can stop flying and land on a tree instead of the ground 整数値 xz_dist
10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 整数値 y_dist
7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
minecraft:behavior.random_look_around[編集 | ソースを編集]
- Allows the mob to randomly look around.
- パラメーター
Type Name Default Value Description Range [a, b] look_time
[2, 4] The range of time in seconds the mob will stay looking in a random direction before looking elsewhere
minecraft:behavior.random_sitting[編集 | ソースを編集]
- Allows the mob to randomly sit for a duration.
- パラメーター
Type Name Default Value Description 小数値 cooldown 100 The cooldown time in seconds before the mob may sit again 小数値 min_sit_time
10 The minimum amount of time in seconds before the mob can stand back up 小数値 start_chance
0.1 This is the chance that the mob will start sitting, from 0 to 1 小数値 stop_chance
0.3 This is the chance that the mob will stop sitting, from 0 to 1
minecraft:behavior.random_stroll[編集 | ソースを編集]
- Allows a mob to randomly stroll around.
- パラメーター
Type Name Default Value Description 整数値 interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 整数値 xz_dist
10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 整数値 y_dist
7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
minecraft:behavior.random_swim[編集 | ソースを編集]
- Allows an entity to randomly move through water
- パラメーター
Type Name Default Value Description 整数値 interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 整数値 xz_dist
10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1 整数値 y_dist
7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
minecraft:behavior.ranged_attack[編集 | ソースを編集]
- Allows the mob to use ranged attacks like shooting arrows.
- パラメーター
Type Name Default Value Description 整数値 attack_interval_max
0 Maximum amount of time in seconds the entity will wait after an attack before launching another 整数値 attack_interval_min
0 Minimum amount of time in seconds the entity will wait after an attack before launching another 小数値 attack_radius
0.0 Maxmimum distance the target can be for this mob to fire. If the target is further away, this mob will move first before firing 小数値 burst_interval
0.0 Amount of time in seconds between each individual shot when firing multiple shots per attack 整数値 burst_shots
1 Number of shots fired every time the mob uses a charged attack 小数値 charge_charged_trigger
0.0 The minimum amount of time in ticks the mob has to charge before firing a charged attack 小数値 charge_shoot_trigger
0.0 The minimum amount of time in ticks for the mob to start charging a charged shot. Must be greater than 0 to enable burst shots 小数値 ranged_fov
90.0 The allowable FOV the actor will use to determine if it can make a valid ranged attack 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.receive_love[編集 | ソースを編集]
- Allows the villager to stop so another villager can breed with it. Can only be used by a Villager.
minecraft:behavior.restrict_open_door[編集 | ソースを編集]
- Allows the mob to stay indoors during night time.
minecraft:behavior.restrict_sun[編集 | ソースを編集]
- Allows the mob to automatically start avoiding the sun when its a clear day out.
minecraft:behavior.roll[編集 | ソースを編集]
- This allows the mob to roll forward.
- パラメーター
Type Name Default Value Description 小数値 probability [1.0] The probability that the mob will use the goal.
minecraft:behavior.run_around_like_crazy[編集 | ソースを編集]
- Allows the mob to run around aimlessly.
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.send_event[編集 | ソースを編集]
- Allows the mob to send an event to another mob.
- パラメーター
Type Name Default Value Description 小数値 cast_duration
Total delay of the steps Time in seconds for the entire event sending process List sequence List of events to send - パラメーター of each event
Type Name Default Value Description 小数値 base_delay
0.0 Amount of time in seconds before starting this step 文字列 event The event to send to the entity 文字列 sound_event
The sound event to play when this step happens
[編集 | ソースを編集]
- Allows the mob to give items it has to others.
- パラメーター
Type Name Default Value Description JSON オブジェクト entity_types
List of entities this mob will share items with - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 小数値 max_dist
0.0 Maximum distance in blocks this mob will look for entities to share items with 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.silverfish_merge_with_stone[編集 | ソースを編集]
- Allows the mob to go into stone blocks like Silverfish do. Currently it can only be used by Silverfish.
minecraft:behavior.silverfish_wake_up_friends[編集 | ソースを編集]
- Allows the mob to alert mobs in nearby blocks to come out. Currently it can only be used by Silverfish.
minecraft:behavior.skeleton_horse_trap[編集 | ソースを編集]
- Allows Equine mobs to be Horse Traps and be triggered like them, spawning a lightning bolt and a bunch of horses when a player is nearby. Can only be used by Horses, Mules, Donkeys and Skeleton Horses.
- パラメーター
Type Name Default Value Description 小数値 duration 1.0 Amount of time in seconds the trap exists. After this amount of time is elapsed, the trap is removed from the world if it hasn't been activated 小数値 within_radius
0.0 Distance in blocks that the player has to be within to trigger the horse trap
minecraft:behavior.slime_attack[編集 | ソースを編集]
- Can only be used by Slimes and Magma Cubes. Allows the mob to use a melee attack like the slime's.
minecraft:behavior.slime_float[編集 | ソースを編集]
- Can only be used by Slimes and Magma Cubes. Controls their ability to float in water / lava.
minecraft:behavior.slime_keep_on_jumping[編集 | ソースを編集]
- Can only be used by Slimes and Magma Cubes. Allows the mob to continuously jump around like a slime.
minecraft:behavior.slime_random_direction[編集 | ソースを編集]
- Can only be used by Slimes and Magma Cubes. Allows the mob to move in random directions like a slime.
minecraft:behavior.snacking[編集 | ソースを編集]
- Allows the mob to take a load off and snack on food that it found nearby.
- パラメーター
Type Name Default Value Description List items Items that we are interested in snacking on 小数値 snacking_cooldown
7.5 The cooldown time in seconds before the mob is able to snack again 小数値 snacking_cooldown_min
0.5f The minimum time in seconds before the mob is able to snack again 小数値 snacking_stop_chance
0.0017 This is the chance that the mob will stop snacking, from 0 to 1
minecraft:behavior.sneeze[編集 | ソースを編集]
- Allows the mob to stop and sneeze possibly startling nearby mobs and dropping an item.
- パラメーター
Type Name Default Value Description 小数値 cooldown_time
0.0 Time in seconds the mob has to wait before using the goal again 小数値 drop_item_chance
1.0 The probability that the mob will drop an item when it sneezes. JSON オブジェクト entity_types
List of entity types this mob will startle (cause to jump) when it sneezes. - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
文字列 loot_table
Loot table to select dropped items from. 文字列 prepare_sound
Sound to play when the sneeze is about to happen. 小数値 prepare_time
1.0 The time in seconds that the mob takes to prepare to sneeze (while the prepare_sound is playing). 小数値 probability 0.02 The probability of sneezing. A value of 1.00 is 100% 文字列 sound Sound to play when the sneeze occurs. 小数値 within_radius
0.0 Distance in blocks that mobs will be startled.
minecraft:behavior.squid_dive[編集 | ソースを編集]
- Allows the squid to dive down in water. Can only be used by the Squid.
minecraft:behavior.squid_flee[編集 | ソースを編集]
- Allows the squid to swim away. Can only be used by the Squid.
minecraft:behavior.squid_idle[編集 | ソースを編集]
- Allows the squid to swim in place idly. Can only be used by the Squid.
minecraft:behavior.squid_move_away_from_ground[編集 | ソースを編集]
- Allows the squid to move away from ground blocks and back to water. Can only be used by the Squid.
minecraft:behavior.squid_out_of_water[編集 | ソースを編集]
- Allows the squid to stick to the ground when outside water. Can only be used by the Squid.
minecraft:behavior.stay_while_sitting[編集 | ソースを編集]
- Allows the mob to stay put while it is in a sitting state instead of doing something else.
minecraft:behavior.stomp_attack[編集 | ソースを編集]
- Allows the mob to use the polar bear's melee attack.
- パラメーター
Type Name Default Value Description 真理値 attack_once
false If true, this mob will attack only one time. 文字列 attack_types
Defines the entity types this mob will attack 整数値 random_stop_interval
0 Defines the probability the mob will stop fighting. A value of 0 disables randomly stopping, while a value of 1 defines a 50% chance 小数値 reach_multiplier
2.0 Multiplier for how far outside its box the mob can reach its target (this can be used to simulate a mob with longer arms by making this bigger) 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 真理値 track_target
false If true, this mob will chase after the target as long as it's a valid target
minecraft:behavior.stomp_turtle_egg[編集 | ソースを編集]
- Allows this mob to stomp turtle eggs
- パラメーター
Type Name Default Value Description 小数値 goal_radius
0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot 整数値 interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal 整数値 search_count
10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick 整数値 search_height
1 Height in blocks the mob will look for turtle eggs to move towards 整数値 search_range
0 The distance in blocks it will look for turtle eggs to move towards 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.summon_entity[編集 | ソースを編集]
- Allows the mob to attack the player by summoning other entities.
- パラメーター
Type Name Default Value Description List summon_choices
List of spells for the mob to use to summon entities. Each spell has the following parameters: - パラメーター of each spell
Type Name Default Value Description 小数値 cast_duration
Total delay of the steps Time in seconds the spell casting will take 小数値 cooldown_time
0.0 Time in seconds the mob has to wait before using the spell again 真理値 do_casting
true If true, the mob will do the casting animations and render spell particles フィルター filters 小数値 max_activation_range
-1.0 Upper bound of the activation distance in blocks for this spell 小数値 min_activation_range
1.0 Lower bound of the activation distance in blocks for this spell 整数値 particle_color
0 The color of the particles for this spell List sequence List of steps for the spell. Each step has the following parameters: - パラメーター of each step
Type Name Default Value Description 小数値 base_delay
0.0 Amount of time in seconds to wait before this step starts 小数値 delay_per_summon
0.0 Amount of time in seconds before each entity is summoned in this step 小数値 entity_lifespan
-1.0 Amount of time in seconds that the spawned entity will be alive for. A value of -1.0 means it will remain alive for as long as it can 文字列 entity_type
The entity type of the entities we will spawn in this step 整数値 num_entities_spawned
1 Number of entities that will be spawned in this step 文字列 shape line The base shape of this step. Valid values are circle and line 小数値 size 1.0 The base size of the entity 文字列 sound_event
The sound event to play for this step 整数値 summon_cap
0 Maximum number of summoned entities at any given time 小数値 summon_cap_radius
0.0 文字列 target self The target of the spell. This is where the spell will start (line will start here, circle will be centered here)
文字列 start_sound_event
The sound event to play when using this spell 小数値 weight 0.0 The weight of this spell. Controls how likely the mob is to choose this spell when casting one
minecraft:behavior.swell[編集 | ソースを編集]
- Allows the creeper to swell up when a player is nearby. It can only be used by Creepers.
- パラメーター
Type Name Default Value Description 小数値 start_distance
10.0 This mob starts swelling when a target is at least this many blocks away 小数値 stop_distance
2.0 This mob stops swelling when a target has moved away at least this many blocks
minecraft:behavior.swim_wander[編集 | ソースを編集]
- Has the fish swim around when they can't pathfind
- パラメーター
Type Name Default Value Description 小数値 speed_multiplier
10 speed of the entity
minecraft:behavior.swoop_attack[編集 | ソースを編集]
- Allows the mob to move to attack a target. The goal ends if it has a horizontal collision or gets hit. Built to be used with flying mobs.
- パラメーター
Type Name Default Value Description Range [a, b] delay_range
[10.0, 20.0] Range of time in seconds between uses of this goal. 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal
minecraft:behavior.take_flower[編集 | ソースを編集]
- Can only be used by Villagers. Allows the mob to accept flowers from Iron Golems.
minecraft:behavior.tempt[編集 | ソースを編集]
- Allows the mob to be tempted by food they like.
- パラメーター
Type Name Default Value Description 真理値 can_get_scared
false If true, the mob can stop being tempted if the player moves too fast while close to this mob List items List of items this mob is tempted by 小数値 speed_multiplier
1.0 Movement speed multiplier of the mob when using this AI Goal 小数値 within_radius
0.0 Distance in blocks this mob can get tempted by a player holding an item they like
minecraft:behavior.trade_with_player[編集 | ソースを編集]
- Allows the player to trade with this mob.
minecraft:behavior.vex_copy_owner_target[編集 | ソースを編集]
- Allows the mob to target the same entity its owner is targeting.
- パラメーター
Type Name Default Value Description JSON オブジェクト entity_types
List of entities this mob can copy the owner from - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
minecraft:behavior.vex_random_move[編集 | ソースを編集]
- Allows the mob to move around randomly like the Vex.
minecraft:behavior.wither_random_attack_pos_goal[編集 | ソースを編集]
- Allows the wither to launch random attacks. Can only be used by the Wither Boss.
minecraft:behavior.wither_target_highest_damage[編集 | ソースを編集]
- Allows the wither to focus its attacks on whichever mob has dealt the most damage to it.
- パラメーター
Type Name Default Value Description JSON オブジェクト entity_types
List of entity types the wither takes into account to find who dealt the most damage to it - パラメーター
Type Name Default Value Description フィルター filters Conditions that make this entry in the list valid 小数値 max_dist
16 Maximum distance this mob can be away to be a valid choice 真理値 must_see
false If true, the mob has to be visible to be a valid choice 小数値 sprint_speed_multiplier
1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged 小数値 walk_speed_multiplier
1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Filters[編集 | ソースを編集]
- Filters allow data objects to specify test critera which allows their use.
- For example, a model that includes a filter will only be used when the filter criteria is true.
- A typical filter consists of four paramters:
- name: the name of the test to apply.
- domain: the domain the test should be performed in. An armor slot, for example. This parameter is only used by a few tests.
- operator: the comparison to apply with the value, such as 'equal' or 'greater'.
- value: the value being compared with the test.
- A typical filter looks like the following:
- { "test" : "moon_intensity", "subject" : "self", "operator" : "greater", "value" : "0.5" }
- Which results in the calling entity (self) calculating the moon_intensity at its location and returning true if the result is greater than 0.5.
- Tests can be combined into groups using the collections 'all_of' and 'any_of'.
- All tests in an 'all_of' group must pass in order for the group to pass.
- One or more tests in an 'any_of' group must pass in order for the group to pass.
- Example:
- "all_of" : [
- { "test" : "moon_intensity", "subject" : "self", "operator" : "greater", "value" : "0.5" },
- { "test" : "in_water", "subject" : "target", "operator" : "equal", "value" : "true" }
- ]
- This filter group will pass only when the moon_intensity is greater than 0.5 AND the caller's target entity is standing in water.
clock_time[編集 | ソースを編集]
- Compares the current time with a float value in the range (0.0, 1.0).
0.0== Noon 0.25== Sunset 0.5== Midnight 0.75== Sunrise
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
小数値 value (Required) A floating point value.
- 使用例
- 非短縮形
- { "test": "clock_time", "subject": "self", "operator": "equals", "value": "0.00" }
- 短縮形(デフォルト)
- { "test": "clock_time", "value": "0.00" }
has_ability[編集 | ソースを編集]
- Returns true when the subject entity has the named ability.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The Ability type to test 設定 解説 flySpeed flying instabuild invulnerable lightning mayfly mute noclip walkSpeed worldbuilder
- 使用例
- 非短縮形
- { "test": "has_ability", "subject": "self", "operator": "equals", "value": "instabuild" }
- 短縮形(デフォルト)
- { "test": "has_ability", "value": "instabuild" }
has_biome_tag[編集 | ソースを編集]
- Tests whether the biome the subject is in has the specified tag.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The tag to look for
- 使用例
- 非短縮形
- { "test": "has_biome_tag", "subject": "self", "operator": "equals", "value": " " }
- 短縮形(デフォルト)
- { "test": "has_biome_tag", "value": " " }
has_component[編集 | ソースを編集]
- Returns true when the subject entity contains the named component.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The component name to look for
- 使用例
- 非短縮形
- { "test": "has_component", "subject": "self", "operator": "equals", "value": "minecraft:explode" }
- 短縮形(デフォルト)
- { "test": "has_component", "value": "minecraft:explode" }
has_damage[編集 | ソースを編集]
- Returns true when the subject entity receives the named damage type.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The Damage type to test 設定 解説 anvil attack block_explosion
contact drowning entity_explosion
fall falling_block
fatal Any damage which kills the subject fire fire_tick
fly_into_wall
lava magic none override piston projectile starve suffocation suicide thorns void wither
- 使用例
- 非短縮形
- { "test": "has_damage", "subject": "self", "operator": "equals", "value": "fatal" }
- 短縮形(デフォルト)
- { "test": "has_damage", "value": "fatal" }
has_equipment[編集 | ソースを編集]
- Tests for the presence of a named item in the designated slot of the subject entity.
- パラメーター
種類 名前 デフォルト 解説 文字列 domain any (Optional) The equipment location to test 設定 解説 any armor feet hand head leg torso
文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The item name to look for
- 使用例
- 非短縮形
- { "test": "has_equipment", "subject": "self", "domain": "any", "operator": "equals", "value": "dirt" }
- 短縮形(デフォルト)
- { "test": "has_equipment", "value": "dirt" }
in_caravan[編集 | ソースを編集]
- Returns true if the subject entity is in a caravan.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "in_caravan", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "in_caravan" }
in_clouds[編集 | ソースを編集]
- Returns true when the subject entity is in the clouds.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "in_clouds", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "in_clouds" }
in_lava[編集 | ソースを編集]
- Returns true when the subject entity is in lava.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "in_lava", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "in_lava" }
in_water[編集 | ソースを編集]
- Returns true when the subject entity is in water.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "in_water", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "in_water" }
in_water_or_rain[編集 | ソースを編集]
- Returns true when the subject entity is in water or rain.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "in_water_or_rain", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "in_water_or_rain" }
is_altitude[編集 | ソースを編集]
- Tests the current altitude against a provided value. 0== bedrock elevation.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
整数値 value (Required) The altitude value to compare with
- 使用例
- 非短縮形
- { "test": "is_altitude", "subject": "self", "operator": "equals", "value": "0" }
- 短縮形(デフォルト)
- { "test": "is_altitude", "value": "0" }
is_biome[編集 | ソースを編集]
- Tests whether the Subject is currently in the named biome.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The Biome type to test 設定 解説 beach desert extreme_hills
flat forest ice jungle mesa mushroom_island
ocean plain river savanna stone_beach
swamp taiga the_end
the_nether
- 使用例
- 非短縮形
- { "test": "is_biome", "subject": "self", "operator": "equals", "value": "beach" }
- 短縮形(デフォルト)
- { "test": "is_biome", "value": "beach" }
is_brightness[編集 | ソースを編集]
- Tests the current brightness against a provided value in the range (0.0f, 1.0f).
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
小数値 value (Required) The brightness value to compare with.
- 使用例
- 非短縮形
- { "test": "is_brightness", "subject": "self", "operator": "equals", "value": "0.50" }
- 短縮形(デフォルト)
- { "test": "is_brightness", "value": "0.50" }
is_climbing[編集 | ソースを編集]
- Returns true if the subject entity is climbing.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_climbing", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_climbing" }
is_color[編集 | ソースを編集]
- Returns true if the subject entity is the named color.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The Palette Color to test 設定 解説 black blue brown cyan gray green light_blue
light_green
magenta orange pink purple red silver white yellow
- 使用例
- 非短縮形
- { "test": "is_color", "subject": "self", "operator": "equals", "value": "white" }
- 短縮形(デフォルト)
- { "test": "is_color", "value": "white" }
is_daytime[編集 | ソースを編集]
- Returns true during the daylight hours.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_daytime", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_daytime" }
is_difficulty[編集 | ソースを編集]
- Tests the current difficulty level of the game.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The game's difficulty level to test 設定 解説 easy hard normal peaceful
- 使用例
- 非短縮形
- { "test": "is_difficulty", "subject": "self", "operator": "equals", "value": "normal" }
- 短縮形(デフォルト)
- { "test": "is_difficulty", "value": "normal" }
is_family[編集 | ソースを編集]
- Returns true when the subject entity is a member of the named family.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The Family name to look for
- 使用例
- 非短縮形
- { "test": "is_family", "subject": "self", "operator": "equals", "value": "player" }
- 短縮形(デフォルト)
- { "test": "is_family", "value": "player" }
is_game_rule[編集 | ソースを編集]
- Tests whether a named game rule is active.
- パラメーター
種類 名前 デフォルト 解説 文字列 domain (Required) The Game Rule to test. 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_game_rule", "subject": "self", "domain": "domobspawning", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_game_rule", "domain": "domobspawning" }
is_humid[編集 | ソースを編集]
- Tests whether the Subject is in an area with humidity
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_humid", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_humid" }
is_immobile[編集 | ソースを編集]
- Returns true if the subject entity is immobile. An entity is immobile if it lacks AI goals, has just changed dimensions or if it is a mob and has no health.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_immobile", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_immobile" }
is_moving[編集 | ソースを編集]
- Returns true if the subject entity is moving.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_moving", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_moving" }
is_owner[編集 | ソースを編集]
- Returns true if the subject entity is the owner of the calling entity.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_owner", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_owner" }
is_riding[編集 | ソースを編集]
- Returns true if the subject entity is riding on another entity.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_riding", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_riding" }
is_sneaking[編集 | ソースを編集]
- Returns true if the subject entity is sneaking.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_sneaking", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_sneaking" }
is_snow_covered[編集 | ソースを編集]
- Tests whether the Subject is in an area with snow cover
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_snow_covered", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_snow_covered" }
is_target[編集 | ソースを編集]
- Returns true if the subject entity is the target of the calling entity.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_target", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_target" }
is_temperature_type[編集 | ソースを編集]
- Tests whether the current temperature is a given type.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
文字列 value (Required) The Biome temperature catagory to test 設定 解説 cold mild ocean warm
- 使用例
- 非短縮形
- { "test": "is_temperature_type", "subject": "self", "operator": "equals", "value": "cold" }
- 短縮形(デフォルト)
- { "test": "is_temperature_type", "value": "cold" }
is_temperature_value[編集 | ソースを編集]
- Tests the current temperature against a provided value in the range (0.0, 1.0) where 0.0f is the coldest temp and 1.0f is the hottest.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
小数値 value (Required) The Biome temperature value to compare with.
- 使用例
- 非短縮形
- { "test": "is_temperature_value", "subject": "self", "operator": "equals", "value": "0.50" }
- 短縮形(デフォルト)
- { "test": "is_temperature_value", "value": "0.50" }
is_underground[編集 | ソースを編集]
- Returns true when the subject entity is underground. An entity is considered underground if there are non-solid blocks above it.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_underground", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_underground" }
is_underwater[編集 | ソースを編集]
- Returns true when the subject entity is under water. An entity is considered underwater if it is completely submerged in water blocks.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "is_underwater", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "is_underwater" }
is_variant[編集 | ソースを編集]
- Returns true if the subject entity is the variant number provided.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
整数値 value (Required) An integer value.
- 使用例
- 非短縮形
- { "test": "is_variant", "subject": "self", "operator": "equals", "value": "0" }
- 短縮形(デフォルト)
- { "test": "is_variant", "value": "0" }
moon_intensity[編集 | ソースを編集]
- Compares the current moon intensity with a float value in the range (0.0, 1.0)
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
小数値 value (Required) A floating point value.
- 使用例
- 非短縮形
- { "test": "moon_intensity", "subject": "self", "operator": "equals", "value": "0.00" }
- 短縮形(デフォルト)
- { "test": "moon_intensity", "value": "0.00" }
moon_phase[編集 | ソースを編集]
- Compares the current moon phase with an integer value in the range (0, 7).
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
整数値 value (Required) An integer value.
- 使用例
- 非短縮形
- { "test": "moon_phase", "subject": "self", "operator": "equals", "value": "0" }
- 短縮形(デフォルト)
- { "test": "moon_phase", "value": "0" }
on_ground[編集 | ソースを編集]
- Returns true when the subject entity is on ground.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "on_ground", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "on_ground" }
on_ladder[編集 | ソースを編集]
- Returns true when the subject entity is on a ladder.
- パラメーター
種類 名前 デフォルト 解説 文字列 operator equals (Optional) The comparison to apply with 'value'. 設定 解説 !== Test for inequality. < Test for less-than the value. <== Test for less-than or equal to the value. <> Test for inequality. == Test for equality. === Test for equality. > Test for greater-than the value. >== Test for greater-than or equal to the value. equals Test for equality. not Test for inequality.
文字列 subject self (Optional) The subject of this filter test. 設定 解説 other The other member of an interaction, not the caller. parent The caller's current parent. player The player involved with the interaction. self The entity or object calling the test target The caller's current target.
真理値 value true (Optional) true or false.
- 使用例
- 非短縮形
- { "test": "on_ladder", "subject": "self", "operator": "equals", "value": "true" }
- 短縮形(デフォルト)
- { "test": "on_ladder" }
Triggers[編集 | ソースを編集]
minecraft:on_death[編集 | ソースを編集]
- Only usable by the Ender Dragon. Adds a trigger to call on this entity's death.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_friendly_anger[編集 | ソースを編集]
- Adds a trigger that will run when a nearby entity of the same type as this entity becomes Angry.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_hurt[編集 | ソースを編集]
- Adds a trigger to call when this entity takes damage.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_hurt_by_player[編集 | ソースを編集]
- Adds a trigger to call when this entity is attacked by the player.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_ignite[編集 | ソースを編集]
- Adds a trigger to call when this entity is set on fire.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_start_landing[編集 | ソースを編集]
- Only usable by the Ender Dragon. Adds a trigger to call when this entity lands.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_start_takeoff[編集 | ソースを編集]
- Only usable by the Ender Dragon. Adds a trigger to call when this entity starts flying.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_target_acquired[編集 | ソースを編集]
- Adds a trigger to call when this entity finds a target.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_target_escape[編集 | ソースを編集]
- Adds a trigger to call when this entity loses the target it currently has.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
minecraft:on_wake_with_owner[編集 | ソースを編集]
- Adds a trigger to call when this pet's owner awakes after sleeping with the pet.
- パラメーター
Type Name Default Value Description 文字列 event The event to run when the conditions for this trigger are met フィルター filters The list of conditions for this trigger 文字列 target self The target of the event
Built-in Events[編集 | ソースを編集]
Name Description minecraft:entity_born Event called on an entity that is spawned through two entities breeding. minecraft:entity_spawned Event called on an entity that is placed in the level. minecraft:entity_transformed Event called on an entity that transforms into another entity. minecraft:on_prime Event called on an entity whose fuse is lit and is ready to explode.
Entities[編集 | ソースを編集]
Identifier Full ID Short ID agent 312 56 area_effect_cloud
95 95 armor_stand
317 61 arrow 12582992 80 balloon 107 107 bat 33043 19 blaze 2859 43 boat 90 90 cat 21323 75 cave_spider
265000 40 chalkboard 78 78 chest_minecart
524386 98 chicken 4874 10 cod 9072 112 command_block_minecart
524388 100 cow 4875 11 creeper 2849 33 dolphin 8991 31 donkey 2118424 24 dragon_fireball
4194383 79 drowned 199534 110 egg 4194386 82 elder_guardian
2866 50 ender_crystal
71 71 ender_dragon
2869 53 ender_pearl
4194391 87 enderman 2854 38 endermite 265015 55 evocation_fang
4194407 103 evocation_illager
2920 104 eye_of_ender_signal
70 70 falling_block
66 66 fireball 4194389 85 fireworks_rocket
72 72 fishing_hook
77 77 ghast 2857 41 guardian 2865 49 hopper_minecart
524384 96 horse 2118423 23 husk 199471 47 ice_bomb
4194410 106 iron_golem
788 20 item 64 64 leash_knot
88 88 lightning_bolt
93 93 lingering_potion
4194405 101 llama 4893 29 llama_spit
4194406 102 magma_cube
2858 42 minecart 524372 84 mooshroom 4880 16 moving_block
67 67 mule 2118425 25 npc 307 51 ocelot 21270 22 painting 83 83 panda 4977 113 parrot 21278 30 phantom 68410 58 pig 4876 12 player 319 63 polar_bear
4892 28 pufferfish 9068 108 rabbit 4882 18 salmon 9069 109 sheep 4877 13 shulker 2870 54 shulker_bullet
4194380 76 silverfish 264999 39 skeleton 1116962 34 skeleton_horse
2186010 26 slime 2853 37 small_fireball
4194398 94 snow_golem
789 21 snowball 4194385 81 spider 264995 35 splash_potion
4194390 86 squid 8977 17 stray 1116974 46 thrown_trident
12582985 73 tnt 65 65 tnt_minecart
524385 97 tripod_camera
318 62 tropicalfish 9071 111 turtle 4938 74 vex 2921 105 villager 783 15 vindicator 2873 57 witch 2861 45 wither 68404 52 wither_skeleton
1116976 48 wither_skull
4194393 89 wither_skull_dangerous
4194395 91 wolf 21262 14 xp_bottle
4194372 68 xp_orb
69 69 zombie 199456 32 zombie_horse
2186011 27 zombie_pigman
68388 36 zombie_villager
199468 44
Blocks[編集 | ソースを編集]
Name minecraft:acacia_button minecraft:acacia_door minecraft:acacia_fence_gate minecraft:acacia_pressure_plate minecraft:acacia_stairs minecraft:acacia_trapdoor minecraft:activator_rail minecraft:air minecraft:anvil minecraft:bamboo minecraft:bamboo_sapling minecraft:barrier minecraft:beacon minecraft:bed minecraft:bedrock minecraft:beetroot minecraft:birch_button minecraft:birch_door minecraft:birch_fence_gate minecraft:birch_pressure_plate minecraft:birch_stairs minecraft:birch_trapdoor minecraft:black_glazed_terracotta minecraft:blue_glazed_terracotta minecraft:blue_ice minecraft:bone_block minecraft:bookshelf minecraft:brewing_stand minecraft:brick_block minecraft:brick_stairs minecraft:brown_glazed_terracotta minecraft:brown_mushroom minecraft:brown_mushroom_block minecraft:bubble_column minecraft:cactus minecraft:cake minecraft:carpet minecraft:carrots minecraft:carved_pumpkin minecraft:cauldron minecraft:chain_command_block minecraft:chemical_heat minecraft:chemistry_table minecraft:chest minecraft:chorus_flower minecraft:chorus_plant minecraft:clay minecraft:coal_block minecraft:coal_ore minecraft:cobblestone minecraft:cobblestone_wall minecraft:cocoa minecraft:colored_torch_bp minecraft:colored_torch_rg minecraft:command_block minecraft:concrete minecraft:concretePowder minecraft:conduit minecraft:coral minecraft:coral_block minecraft:coral_fan minecraft:coral_fan_dead minecraft:coral_fan_hang minecraft:coral_fan_hang2 minecraft:coral_fan_hang3 minecraft:crafting_table minecraft:cyan_glazed_terracotta minecraft:dark_oak_button minecraft:dark_oak_door minecraft:dark_oak_fence_gate minecraft:dark_oak_pressure_plate minecraft:dark_oak_stairs minecraft:dark_oak_trapdoor minecraft:dark_prismarine_stairs minecraft:daylight_detector minecraft:daylight_detector_inverted minecraft:deadbush minecraft:detector_rail minecraft:diamond_block minecraft:diamond_ore minecraft:dirt minecraft:dispenser minecraft:double_plant minecraft:double_stone_slab minecraft:double_stone_slab2 minecraft:double_wooden_slab minecraft:dragon_egg minecraft:dried_kelp_block minecraft:dropper minecraft:element_0 minecraft:element_1 minecraft:element_10 minecraft:element_100 minecraft:element_101 minecraft:element_102 minecraft:element_103 minecraft:element_104 minecraft:element_105 minecraft:element_106 minecraft:element_107 minecraft:element_108 minecraft:element_109 minecraft:element_11 minecraft:element_110 minecraft:element_111 minecraft:element_112 minecraft:element_113 minecraft:element_114 minecraft:element_115 minecraft:element_116 minecraft:element_117 minecraft:element_118 minecraft:element_12 minecraft:element_13 minecraft:element_14 minecraft:element_15 minecraft:element_16 minecraft:element_17 minecraft:element_18 minecraft:element_19 minecraft:element_2 minecraft:element_20 minecraft:element_21 minecraft:element_22 minecraft:element_23 minecraft:element_24 minecraft:element_25 minecraft:element_26 minecraft:element_27 minecraft:element_28 minecraft:element_29 minecraft:element_3 minecraft:element_30 minecraft:element_31 minecraft:element_32 minecraft:element_33 minecraft:element_34 minecraft:element_35 minecraft:element_36 minecraft:element_37 minecraft:element_38 minecraft:element_39 minecraft:element_4 minecraft:element_40 minecraft:element_41 minecraft:element_42 minecraft:element_43 minecraft:element_44 minecraft:element_45 minecraft:element_46 minecraft:element_47 minecraft:element_48 minecraft:element_49 minecraft:element_5 minecraft:element_50 minecraft:element_51 minecraft:element_52 minecraft:element_53 minecraft:element_54 minecraft:element_55 minecraft:element_56 minecraft:element_57 minecraft:element_58 minecraft:element_59 minecraft:element_6 minecraft:element_60 minecraft:element_61 minecraft:element_62 minecraft:element_63 minecraft:element_64 minecraft:element_65 minecraft:element_66 minecraft:element_67 minecraft:element_68 minecraft:element_69 minecraft:element_7 minecraft:element_70 minecraft:element_71 minecraft:element_72 minecraft:element_73 minecraft:element_74 minecraft:element_75 minecraft:element_76 minecraft:element_77 minecraft:element_78 minecraft:element_79 minecraft:element_8 minecraft:element_80 minecraft:element_81 minecraft:element_82 minecraft:element_83 minecraft:element_84 minecraft:element_85 minecraft:element_86 minecraft:element_87 minecraft:element_88 minecraft:element_89 minecraft:element_9 minecraft:element_90 minecraft:element_91 minecraft:element_92 minecraft:element_93 minecraft:element_94 minecraft:element_95 minecraft:element_96 minecraft:element_97 minecraft:element_98 minecraft:element_99 minecraft:emerald_block minecraft:emerald_ore minecraft:enchanting_table minecraft:end_bricks minecraft:end_gateway minecraft:end_portal minecraft:end_portal_frame minecraft:end_rod minecraft:end_stone minecraft:ender_chest minecraft:farmland minecraft:fence minecraft:fence_gate minecraft:fire minecraft:flower_pot minecraft:flowing_lava minecraft:flowing_water minecraft:frame minecraft:frosted_ice minecraft:furnace minecraft:glass minecraft:glass_pane minecraft:glowingobsidian minecraft:glowstone minecraft:gold_block minecraft:gold_ore minecraft:golden_rail minecraft:grass minecraft:grass_path minecraft:gravel minecraft:gray_glazed_terracotta minecraft:green_glazed_terracotta minecraft:hard_glass minecraft:hard_glass_pane minecraft:hard_stained_glass minecraft:hard_stained_glass_pane minecraft:hardened_clay minecraft:hay_block minecraft:heavy_weighted_pressure_plate minecraft:hopper minecraft:ice minecraft:info_update minecraft:info_update2 minecraft:invisibleBedrock minecraft:iron_bars minecraft:iron_block minecraft:iron_door minecraft:iron_ore minecraft:iron_trapdoor minecraft:jukebox minecraft:jungle_button minecraft:jungle_door minecraft:jungle_fence_gate minecraft:jungle_pressure_plate minecraft:jungle_stairs minecraft:jungle_trapdoor minecraft:kelp minecraft:ladder minecraft:lapis_block minecraft:lapis_ore minecraft:lava minecraft:leaves minecraft:leaves2 minecraft:lever minecraft:light_blue_glazed_terracotta minecraft:light_weighted_pressure_plate minecraft:lime_glazed_terracotta minecraft:lit_furnace minecraft:lit_pumpkin minecraft:lit_redstone_lamp minecraft:lit_redstone_ore minecraft:log minecraft:log2 minecraft:magenta_glazed_terracotta minecraft:magma minecraft:melon_block minecraft:melon_stem minecraft:mob_spawner minecraft:monster_egg minecraft:mossy_cobblestone minecraft:movingBlock minecraft:mycelium minecraft:nether_brick minecraft:nether_brick_fence minecraft:nether_brick_stairs minecraft:nether_wart minecraft:nether_wart_block minecraft:netherrack minecraft:netherreactor minecraft:noteblock minecraft:oak_stairs minecraft:observer minecraft:obsidian minecraft:orange_glazed_terracotta minecraft:packed_ice minecraft:pink_glazed_terracotta minecraft:piston minecraft:pistonArmCollision minecraft:planks minecraft:podzol minecraft:portal minecraft:potatoes minecraft:powered_comparator minecraft:powered_repeater minecraft:prismarine minecraft:prismarine_bricks_stairs minecraft:prismarine_stairs minecraft:pumpkin minecraft:pumpkin_stem minecraft:purple_glazed_terracotta minecraft:purpur_block minecraft:purpur_stairs minecraft:quartz_block minecraft:quartz_ore minecraft:quartz_stairs minecraft:rail minecraft:red_flower minecraft:red_glazed_terracotta minecraft:red_mushroom minecraft:red_mushroom_block minecraft:red_nether_brick minecraft:red_sandstone minecraft:red_sandstone_stairs minecraft:redstone_block minecraft:redstone_lamp minecraft:redstone_ore minecraft:redstone_torch minecraft:redstone_wire minecraft:reeds minecraft:repeating_command_block minecraft:reserved6 minecraft:sand minecraft:sandstone minecraft:sandstone_stairs minecraft:sapling minecraft:scaffolding minecraft:seaLantern minecraft:sea_pickle minecraft:seagrass minecraft:shulker_box minecraft:silver_glazed_terracotta minecraft:skull minecraft:slime minecraft:snow minecraft:snow_layer minecraft:soul_sand minecraft:sponge minecraft:spruce_button minecraft:spruce_door minecraft:spruce_fence_gate minecraft:spruce_pressure_plate minecraft:spruce_stairs minecraft:spruce_trapdoor minecraft:stained_glass minecraft:stained_glass_pane minecraft:stained_hardened_clay minecraft:standing_banner minecraft:standing_sign minecraft:sticky_piston minecraft:stone minecraft:stone_brick_stairs minecraft:stone_button minecraft:stone_pressure_plate minecraft:stone_slab minecraft:stone_slab2 minecraft:stone_stairs minecraft:stonebrick minecraft:stonecutter minecraft:stripped_acacia_log minecraft:stripped_birch_log minecraft:stripped_dark_oak_log minecraft:stripped_jungle_log minecraft:stripped_oak_log minecraft:stripped_spruce_log minecraft:structure_block minecraft:tallgrass minecraft:tnt minecraft:torch minecraft:trapdoor minecraft:trapped_chest minecraft:tripWire minecraft:tripwire_hook minecraft:turtle_egg minecraft:underwater_torch minecraft:undyed_shulker_box minecraft:unlit_redstone_torch minecraft:unpowered_comparator minecraft:unpowered_repeater minecraft:vine minecraft:wall_banner minecraft:wall_sign minecraft:water minecraft:waterlily minecraft:web minecraft:wheat minecraft:white_glazed_terracotta minecraft:wooden_button minecraft:wooden_door minecraft:wooden_pressure_plate minecraft:wooden_slab minecraft:wool minecraft:yellow_flower minecraft:yellow_glazed_terracotta
ステータス効果[編集 | ソースを編集]
ID 名前 Aux値 absorption 衝撃吸収 22 blindness 盲目 15 conduit_power コンジットパワー 26 fatal_resistance 毒(体力が 1 でもダメージを受ける) 25 fire_resistance 火炎耐性 12 haste 採掘速度上昇 3 health_boost 体力増強 21 hunger 空腹 17 instant_damage 即時ダメージ 7 instant_health 即時回復 6 invisibiltiy 透明化 14 jump_boost 跳躍力上昇 8 levitation 浮遊 24 mining_fatigue 採掘速度低下 4 nausea 吐き気 9 night_vision 暗視 16 poison 毒 19 regeneration 再生能力 10 resistance 耐性 11 saturation 腹持ち 23 slow_falling 落下速度低下 27 slowness 移動速度低下 2 speed 移動速度上昇 1 strength 攻撃力上昇 5 water_breathing 水中呼吸 13 weakness 弱体化 18 wither 衰弱 20
Geometry[編集 | ソースを編集]
Blocks[編集 | ソースを編集]
- パラメーター
Type Name Default Value Description List elements List of elements that make up the geometry of this block boxes
- 解説
- List of cubes that make up the geometry of this element
faces
- 解説
- List of the 6 faces of the box. If specified, there MUST be 6 faces (front, back, left side, right side, top, bottom)
material
- 解説
- The material of this face if different from the box's
rotation
- 解説
- UV Rotation of this face. Only acceptable values are 0, 90 and 270 degrees. This allows reusing a texture and just rotating it for different faces
uv
- 解説
- Texture coordinates of this face, given as min x, min y, max x, max y withg values between 0.0 and 1.0
material
- 解説
- The material of this box if different from the element's
origin
- 解説
- The position of the center of the box relative to the geometry
size
- 解説
- Scale of the box in the x, y and z coordinates. A typical block is of scale 1, 1, 1
material
- 解説
- The material of this element if different from the block's
name
- 解説
- Name of the element
parent
- 解説
- Name of the parent element of this element. Pivot and box positions are made relative to the parent element's pivot
pivot
- 解説
- Position in model space of the pivot point of the element. This is used as the "center" position of the element, as well as the point around which to rotate
rotation
- 解説
- The rotation of this element about its pivot
文字列 format_version
0.0.0.0 Version of the block geometry being used. This is used to determine if backwards compatibility is needed List materials #0 List of materials used by this model 文字列 parent Parent model of this model
- ↑ 例: バニラでは
minecraft:attack
を持つエンティティが、カスタムファイルでそのコンポーネントを持っていない場合など
引用エラー: 「注釈」という名前のグループの <ref>
タグがありますが、対応する <references group="注釈"/>
タグが見つからない、または閉じる </ref>
タグがありません