-
Notifications
You must be signed in to change notification settings - Fork 0
Aquarium Modifier Condition
Aquarium Modifier Conditions determine when an Aquarium Modifier is active. Inactive Aquarium Modifiers do not provide any bonuses and do not count toward mandatory categories.
The following data is required for all modifier conditions.
-
type
(namespaced ID)- The registry ID of the Modifier Condition
Many modifier conditions require a number or a range of numbers. This is referred to as Min Max Bounds. They can be defined using a single number or using a minimum and/or maximum.
-
min
(number) Optional- The minimum number, inclusive. When not specified, allows all numbers less than
max
.
- The minimum number, inclusive. When not specified, allows all numbers less than
-
max
(number) Optional- The maximum number, inclusive. When not specified, allows all numbers greater than
min
.
- The maximum number, inclusive. When not specified, allows all numbers greater than
The following Min Max Bounds accepts exactly 24
.
"value": 24
The following Min Max Bounds accepts any number from 1
to 10
(inclusive).
"value": {
"min": 1,
"max": 10
}
The following Min Max Bounds accepts 5
or greater.
"value": {
"min": 5
}
The following Min Max Bounds accepts any number.
"value": {}
This condition always passes.
{
"type": "axolootl:true"
}
This condition never passes.
{
"type": "axolootl:false"
}
This condition passes when at least one specified aquarium modifier (excluding this one) is present in the tank.
-
modifier
(Aquarium Modifier Holder Set) Required- One or more Aquarium Modifiers to check if they exist in the tank.
-
active
(true|false) Optional- Whether to only count modifiers that are currently active. Defaults to false.
The following modifier condition passes when there is at least one axolootl:bubbler
modifier in the aquarium.
{
"type": "axolootl:exists",
"modifier": "axolootl:bubbler",
"active": false
}
This condition passes when there is a specific number of the specified aquarium modifier(s) (excluding this one) in the tank. When there are too few or too many matching modifiers, all of them become inactive. To allow up to a certain number of aquarium modifiers, use the Count Capped Modifier Condition.
-
modifier
(Aquarium Modifier Holder Set) Required- One or more Aquarium Modifiers to check if they exist in the tank.
-
count
(number|Min Max Bounds) Required- The number or range of Aquarium Modifiers to allow.
-
active
(true|false) Optional- Whether to only count modifiers that are currently active. Defaults to false.
The following modifier condition passes when there are between 1 and 5 (inclusive) axolootl:pump
or axolootl:powered_pump
active modifiers in the aquarium.
{
"type": "axolootl:count",
"modifier": [
"axolootl:pump",
"axolootl:powered_pump"
],
"count": {
"min": 1,
"max": 5
},
"active": true
}
This condition passes for the first few aquarium modifier(s) (excluding this one) in the tank. When there are too many matching modifiers, the specified number of modifiers remain active while all others become inactive.
-
modifier
(Aquarium Modifier Holder Set) Required- One or more Aquarium Modifiers to check if they exist in the tank.
-
count
(number) Required- The maximum number of Aquarium Modifiers to allow, inclusive.
-
active
(true|false) Optional- Whether to only count modifiers that are currently active. Defaults to false.
The following modifier condition passes for the first 10 modifiers in the axolootl:coral_cluster
tag.
{
"type": "axolootl:count_capped",
"modifier": "#axolootl:coral_cluster",
"count": 10
}
This condition passes when its internal condition does not pass.
-
child
(Modifier Condition) Required- The modifier conditions to test.
The following modifier condition passes when there are not exactly 10 axolootl:coral_cluster
modifiers.
{
"type": "axolootl:not",
"child": {
"type": "axolootl:count",
"modifier": "axolootl:coral_cluster",
"count": 10
}
}
This condition passes when all of its internal conditions pass.
-
children
(Modifier Condition|Modifier Condition List) Required- One or more modifier conditions to test.
The following modifier condition passes when the axolootl:pump
modifier exists and a random number generator passes with a 50%
chance.
{
"type": "axolootl:and",
"children": [
{
"type": "axolootl:exists",
"modifier": "axolootl:pump"
},
{
"type": "axolootl:chance",
"chance": 0.5
}
]
}
This condition passes when one or more of its internal conditions pass.
-
children
(Modifier Condition|Modifier Condition List) Required- One or more modifier conditions to test.
The following modifier condition passes when either a the block has 10
or more Forge Energy or there is exactly one axolootl:kelp
modifier.
{
"type": "axolootl:or",
"children": [
{
"type": "axolootl:energy",
"energy": 10
},
{
"type": "axolootl:count",
"modifier": "axolootl:kelp",
"count": 1
}
]
}
This condition passes when there are a specified number of a specified axolootl variant inside the aquarium.
-
variant
(Axolootl Variant Holder Set) Optional- The Axolootl Variant(s) to count. If not specified, all axolootl variants are counted.
-
count
(number|Min Max Bounds) Required- The number or range of the specified axolootl variant to allow.
The following modifier condition passes when there are at least 3 axolootl:stone
axolootls in the aquarium.
{
"type": "axolootl:axolootl_count",
"variant": "axolootl:stone",
"count": {
"min": 3
}
}
This condition passes when a specified aquarium modifier is within a specified number of blocks from the modifier. The distance is measured according to Taxicab distance AKA Manhattan distance. This means, for example, a diagonally adjacent block would have a distance of 2.
-
modifier
(Aquarium Modifier Holder Set) Required- One or more Aquarium Modifiers to test.
-
distance
(number|Min Max Bounds) Required- The distance or range to test for the specified aquarium modifier(s)
-
offset
(XYZ) Optional- An amount to offset from the modifier position, useful for multiblocks. Defaults to
[0, 0, 0]
.
- An amount to offset from the modifier position, useful for multiblocks. Defaults to
The following modifier condition passes when there is an axolootl:nursery
modifier no more than 5 blocks from the modifier.
{
"type": "axolootl:distance",
"modifier": "axolootl:nursery",
"distance": {
"max": 5
}
}
This condition passes when the game time (calculated by 24000 * day count + day time
) is within some range and period, similar to the Time Check Predicate used in loot tables.
-
period
(number) Optional- The amount to modulo reduce the game time before comparing it to the
range
.
- The amount to modulo reduce the game time before comparing it to the
-
range
(number|Min Max Bounds)- A number or range of time values to allow.
The following modifier condition passes when the game time is between 0
and 6000
every 24000
ticks (in other words, it passes during the first half of the day and fails at other times)
{
"type": "axolootl:time",
"period": 24000,
"range": {
"min": 0,
"max": 6000
}
}
This condition passes when the weather at the block position matches some value, similar to the Weather Check Predicate used in loot tables. When neither raining
nor thundering
are defined, the condition never passes.
-
raining
(true|false) Optional- When
true
, the condition passes if it is raining or thundering. Whenfalse
, the condition passes only if it is not raining. When omitted, raining is ignored.
- When
-
thundering
(true|false) Optional- When
true
, the condition passes if it is thundering. Whenfalse
, the condition passes only if it is not thundering. When omitted, thundering is ignored.
- When
The following modifier condition passes when it is raining and not thundering.
{
"type": "axolootl:weather",
"raining": true,
"thundering": false
}
This condition passes when a random number is generated that is below a specified number.
-
chance
(number) Required
The following modifier condition passes 42%
of the time.
{
"type": "axolootl:chance",
"chance": 0.42
}
This condition passes when the block state at the modifier position matches some predicate.
-
predicate
(Block Predicate) Required- The Block Predicate to test at the modifier position.
The following modifier condition passes when the block at the modifier position is a lit smoker.
{
"type": "axolootl:block",
"predicate": {
"type": "axolootl:matching_state",
"blocks": "minecraft:smoker",
"state": {
"lit": true
}
}
}
This condition passes when the block at the modifier position contains at least the specified amount of Forge Energy.
-
energy
(number) Required- The minimum amount of energy (inclusive) to require.
The following modifier condition passes when the block at the modifier position has at least 10
Forge Energy units stored.
{
"type": "axolootl:energy",
"energy": 10
}
This condition passes when the block at the modifier position matches certain conditions, similar to the Location Check Predicate used in loot tables.
A single number or a range of numbers. When not defined as a single number and neither min
nor max
are specified, all numbers are allowed.
-
min
(number) Optional- The minimum number, inclusive. When not specified, allows all numbers less than
max
.
- The minimum number, inclusive. When not specified, allows all numbers less than
-
max
(number) Optional- The maximum number, inclusive. When not specified, allows all numbers greater than
min
.
- The maximum number, inclusive. When not specified, allows all numbers greater than
Contains X, Y, and Z bounds to test.
-
x
(number|Min Max Bounds) Optional- The x position to allow. When not specified, x position is ignored.
-
y
(number|Min Max Bounds) Optional- The y position to allow. When not specified, y position is ignored.
-
z
(number|Min Max Bounds) Optional- The z position to allow. When not specified, z position is ignored.
Contains a fluid and fluid properties to test.
-
fluid
(namespaced ID) Optional- The fluid ID.
-
tag
(namespaced ID) Optional- The fluid tag.
-
state
(map of Block State Property to value) Optional- The block state properties to test. Only exact values are supported (
min
andmax
are not currently supported)
- The block state properties to test. Only exact values are supported (
-
position
(Position) Optional- The world-space coordinates to allow the modifier to be active. When not specified, the position is ignored.
-
offset
(XYZ) Optional- The offset to apply before testing the modifier position. Defaults to
[0, 0, 0]
.
- The offset to apply before testing the modifier position. Defaults to
-
biome
(Biome Holder Set) Optional- One or more Biomes to allow the modifier to be active. When not specified, the biome is ignored.
-
structure
(Structure Holder Set) Optional- One or more Structures to allow the modifier to be active. When not specified, structures are ignored.
-
dimension
(Dimension Holder Set) Optional- One or more Dimensions to allow the modifier to be active. When not specified, the dimension is ignored.
-
smokey
(true|false) Optional- When
true
, passes if the block has smoke. Whenfalse
, passes if the block does not have smoke. When omitted, smoke is ignored.
- When
-
light
(number|Min Max Bounds) Optional- The light level to test at the modifier position. When omitted, light levels are ignored.
-
fluid
(Fluid Predicate) Optional- The fluid at the modifier position. When omitted, fluids are ignored.
-
block
(Block Predicate) Optional- The block predicate to test at the modifier position. Defaults to
true
.
- The block predicate to test at the modifier position. Defaults to
The following modifier condition passes when the modifier is between y=0
and y=256
(inclusive) in an ocean or deep ocean biome. The modifier position must have a light level of 4
or higher.
{
"type": "axolootl:location",
"position": {
"y": {
"min": 0.0,
"max": 256.0
}
},
"biome": [
"minecraft:ocean",
"minecraft:deep_ocean"
],
"light": {
"min": 4
}
}