-
Notifications
You must be signed in to change notification settings - Fork 0
Filters
Filters are a way to go through different objects (entities, tile entities, etc) and determine if that object satisfies certain attributes.
Filters are typically stored as a JSON object, as shown in the examples below.
Matches all objects.
Value - None
Ex:
{
"type": "All"
}
Checks based on the (short) Class name.
Value - String (Eg: EntityPig)
Ex:
{
"type": "Class",
"value": "EntityPig"
}
Checks based on the dimension
Value - Array of dimension IDs
Ex:
{
"type": "Dimension"
"value": [0, 1]
}
Checks based on the Java hashcode
Value - Integer
Checks its its a class/superclass
Value - String, full class name (Eg: net.minecraft.entity.item.EntityItem)
Ex:
{
"type": "Instance"
"value": "net.minecraft.entity.item.EntityItem"
}
Checks the full class name
Value - String, Full Class name (Eg: net.minecraft.passive.EntityPig)
Ex:
{
"type": "LClass"
"value": "net.minecraft.passive.EntityPig"
}
Checks based on names
Value - String (Eg: Zombie)
Ex:
{
"type": "Name"
"value": "Zombie"
}
Checks based on the entity position
Value - Object holding x1, y1, z1 and optionally x2, y2, z2
Ex:
{
"type": "Pos"
"value": {
"x1": 0,
"y1": 0,
"z1": 0,
"x2": 50,
"y2": 50,
"z2": 50
}
}
Checks based on chunk coordinates
Value - Object holding x1, z1 and optionally x2, z2
Ex:
{
"type": ""
"value": {
"x1": -1,
"z1": -1,
"x2": 1,
"z2": 1
}
}
Checks multiple filters together in an all-or-nothing manner
Value - An array of other filters. (I heard you like filters in your filters...)
Ex:
{
"type": "Multi"
"value": [
{
"type": "Name",
"value": "Zombie"
},
{
"type": "Dimension",
"value": [0]
}
]
}