-
-
Notifications
You must be signed in to change notification settings - Fork 1
RMF Predicates
Predicates that are used by the pack for checking data and conditions, for running other functions later.
Warning
"Aw, I was eating that..."
This page hasn't been finished yet! If it looks weird, that's because it's not done!!!
Checks if the entity is a Wolf. Used in the rmf:bg/use_dog_food advancement.
Added in v1.5.2 as Minecraft changed the way SEVERAL advancements worked, breaking a majority of them (for the greater good!).
rmf:entity/is_wolf
{
"type": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"minecraft:entity_type": "minecraft:wolf"
}
}
Checks if the player is holding an item in their offhand that can be baked in a Baking Pan. Used in the Baking Pan's functions.
Looks for both custom item data as well as the actual item tag (rmf:baking_pan_cookable).
rmf:baking_pan_cookable
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.offhand": {
"items": "#rmf:baking_pan_cookable"
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.offhand": {
"predicates": {
"minecraft:custom_data": {
"item_tags": [
{
"rmf": "baking_pan_cookable"
}
]
}
}
}
}
}
}
]
}
Checks if the player is holding an item in their offhand that can be fried or baked in either a Frying Pan or a Baking Pan. Used in the Creative Pan's functions.
Does what you would think it would do. Searches for the rmf:creative_pan_cookable item tag as well as the custom data tags for frying and baking.
rmf:creative_pan_cookable
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.offhand": {
"items": "#rmf:creative_pan_cookable"
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.offhand": {
"predicates": {
"minecraft:custom_data": {
"item_tags": [
{
"rmf": "frying_pan_cookable"
}
]
}
}
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.offhand": {
"predicates": {
"minecraft:custom_data": {
"item_tags": [
{
"rmf": "baking_pan_cookable"
}
]
}
}
}
}
}
}
]
}
Checks if the player's mainhand is empty. Duh.
Used for checking if the player can run the Get Item Data function, or if they're trying to break a Cactus with their bare hands.
rmf:empty_mainhand
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.mainhand": {
"items": "minecraft:air"
}
}
}
}
You're not gonna believe what this checks for...
Used for checking if the player can crate an item in an Item Crate, and if they are trying to empty the contents of a Shaker Cup or Mixing Bowl.
rmf:empty_offhand
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.offhand": {
"items": "minecraft:air"
}
}
}
}
Checks if the player is holding an item in their offhand that can be fried in the Frying Pan. Used for frying-related functions.
Searches for both the item tag version of itself as well as for the custom data tag version.
rmf:frying_pan_cookable
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.offhand": {
"items": "#rmf:frying_pan_cookable"
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"weapon.offhand": {
"predicates": {
"minecraft:custom_data": {
"item_tags": [
{
"rmf": "frying_pan_cookable"
}
]
}
}
}
}
}
}
]
}
Checks if the player has a Glass Bottle in either their hotbar or inventory.
Used in various functions for the Shaker Cup.
rmf:has_glass_bottle
{
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"inventory.*": {
"items": "minecraft:glass_bottle"
}
}
}
},
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"hotbar.*": {
"items": "minecraft:glass_bottle"
}
}
}
}
]
}