Tags
Creators
Details
0.6.0-preview.3+1.21.5
Compatibility
Changes
This preview introduces entity spawn rules and unifies the spawn-related fields in item behaviour components that involve placing entities.
For a few more details regarding the split and future you can look at the roadmap to 1.21!
Changes
Item Behaviour Components
minecraft:bucket
- Replaced the
entityfield with an entity spawner instead of just the entity type.
So if you had this:
{
"minecraft:bucket": {
"entity": "minecraft:pufferfish",
"modification": {
"type": "minecraft:place_fluid",
"fluid": "minecraft:water",
"place_sound": "minecraft:item.bucket.empty_fish",
"transforms_into": "minecraft:bucket"
}
}
}
You now have to use this:
{
"minecraft:bucket": {
"entity": {
"entity": "minecraft:pufferfish"
},
"modification": {
"type": "minecraft:place_fluid",
"fluid": "minecraft:water",
"place_sound": "minecraft:item.bucket.empty_fish",
"transforms_into": "minecraft:bucket"
}
}
}
minecraft:entity
- Merged the
entityandallow_item_datafields into a singleentityfield by using an entity spawner. - Added
allow_spawner_modification.- Its value is an optional boolean defaulting to
false. - Determines whether the item can modify a Spawner's entity type.
- Its value is an optional boolean defaulting to
So if you had this:
{
"minecraft:entity": {
"allow_item_data": true,
"entity": "minecraft:pig",
"passes": [
"block",
"fluid"
]
}
}
You now have to use this:
{
"minecraft:entity": {
"allow_spawner_modification": true,
"entity": {
"allow_item_data": true,
"entity": "minecraft:pig"
},
"passes": [
"block",
"fluid"
]
}
}
minecraft:projectile
- Expanded the
entityfield by adding optional spawn rules, an optional spawn sound and whether to allow item data or not.
minecraft:spawn_egg
- Is no longer required for Spawner entity type modification.
- This field has instead been moved to the
minecraft:entityitem behaviour component.
- This field has instead been moved to the
- The behaviour component is still used for spawning children when used on the specified entity type.
So if you had this:
{
"minecraft:entity": {
"allow_item_data": true,
"entity": "minecraft:pig",
"passes": [
"block",
"fluid"
]
},
"minecraft:spawn_egg": {}
}
You now have to use this:
{
"minecraft:entity": {
"allow_spawner_modification": true,
"entity": {
"allow_item_data": true,
"entity": "minecraft:pig"
},
"passes": [
"block",
"fluid"
]
},
"minecraft:spawn_egg": {}
}
Entity Spawners
- Spawns an entity using the specified rules.
- Fields:
entity: An entity type. The entity type to spawn.- If
allow_item_datais set totrue, the entity type may additionally be determined via theminecraft:entity_datadata component from the used item stack, which takes precedence over theentityfield.
- If
spawn_rules: An optional list of spawn rules. The spawn rules to apply in the specified order.components: An optional set of components. The components to apply to the spawned entity.spawn_sound: An optional sound event. The sound to play when the entity is spawned.allow_item_data: An optional boolean defaulting tofalse. Whether to allow item data from theminecraft:entity_datadata component from the used item stack.
Entity Spawn Rules
- Determines whether to place the entity or not and if so, its position and rotation.
- Rules are applied when the condition passes or when no condition is specified.
- Common fields:
condition: An optional predicate. Determines whether to apply the rule or not.
minecraft:align_yaw
- Aligns the entity's yaw based on the placer's own yaw using the specified amount of steps.
- Fields:
step: An integer ranging from 2 to 360. The amount of steps.- For example, a value of 8 rounds to the nearest 45 degree as
360 / 8 = 45.
- For example, a value of 8 rounds to the nearest 45 degree as
Example:
{
"type": "minecraft:align_yaw",
"steps": 8
}
minecraft:discard
- Discards the entity entirely.
- Has no additional fields.
Example:
{
"type": "minecraft:discard",
"condition": {
"condition": "minecraft:side_check",
"sides": [
"down"
]
}
}
minecraft:fits_in_volume
- Checks whether the specified hitbox or otherwise entity's default hitbox fits in the specified volume.
- The hitbox to check for is centred around the entity spawner's current spawn position.
- Fields:
blocks: An optional boolean. Defaults totrue. Whether to check if the entity fits inside the surrounding blocks.entities: An optional boolean. Defaults totrue. Whether to check if the entity fits inside the surrounding entities.volume: An optional list of three doubles. The volume to use instead of the entity's hitbox.
Example:
{
"type": "minecraft:fits_in_volume",
"blocks": false,
"volume": [
1.0,
2.0,
1.0
]
}
minecraft:offset_spawn_position
- Offsets the entity's spawn position by the specified amount.
- Fields:
offset: A list of three doubles. The position offset.
{
"type": "minecraft:offset_spawn_position",
"offset": [
0.0,
0.0625,
0.0
]
}
Fixes
- Fixed the world modification type registry name.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:ZclAAHfk:XrFfecbR"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:ZclAAHfk:XrFfecbR"
}

