Fixing min/max of location based advancements to account for negative values.

master
Ben Maurer 2022-08-03 02:12:31 +00:00
parent 6e9d1289f3
commit da06c87516
4 changed files with 154 additions and 89 deletions

View File

@ -19,7 +19,7 @@
"entity": "this",
"predicate": {
"location": {
"dimension": "minecraft:overworld",
"dimension": "minecraft:the_end",
"position": {
"x": {
"min": 1000000.0
@ -52,7 +52,7 @@
"entity": "this",
"predicate": {
"location": {
"dimension": "minecraft:overworld",
"dimension": "minecraft:the_end",
"position": {
"z": {
"min": 1000000.0
@ -85,10 +85,10 @@
"entity": "this",
"predicate": {
"location": {
"dimension": "minecraft:overworld",
"dimension": "minecraft:the_end",
"position": {
"x": {
"min": -1000000.0
"max": -1000000.0
}
}
}
@ -118,10 +118,10 @@
"entity": "this",
"predicate": {
"location": {
"dimension": "minecraft:overworld",
"dimension": "minecraft:the_end",
"position": {
"x": {
"min": -1000000.0
"max": -1000000.0
}
}
}

View File

@ -88,7 +88,7 @@
"dimension": "minecraft:the_end",
"position": {
"x": {
"min": -100000.0
"max": -100000.0
}
}
}
@ -121,7 +121,7 @@
"dimension": "minecraft:the_end",
"position": {
"x": {
"min": -100000.0
"max": -100000.0
}
}
}

View File

@ -1,58 +1,146 @@
{
"display": {
"icon": {
"item": "minecraft:spawner"
},
"title": "Feeling Caged In",
"description": "Find all four limits of the overworld cage. Don't worry, its a nice, big cage.",
"frame": "challenge",
"announce_to_chat": true
},
"parent": "canopy:root",
"criteria": {
"x+": {
"trigger": "minecraft:location",
"conditions": {
"dimension": "minecraft:overworld",
"position": {
"x": {
"min": 31990
}
}
}
},
"x-": {
"trigger": "minecraft:location",
"conditions": {
"dimension": "minecraft:overworld",
"position": {
"x": {
"max": -31990
}
}
}
},
"z+": {
"trigger": "minecraft:location",
"conditions": {
"dimension": "minecraft:overworld",
"position": {
"z": {
"min": 31990
}
}
}
},
"z-": {
"trigger": "minecraft:location",
"conditions": {
"dimension": "minecraft:overworld",
"position": {
"z": {
"max": -31990
}
}
}
}
}
}
{
"display": {
"icon": {
"item": "minecraft:spawner"
},
"title": "Feeling Caged In",
"description": "Find all four limits of the overworld cage. Don't worry, its a nice, big cage.",
"frame": "challenge",
"announce_to_chat": true
},
"parent": "canopy:root",
"criteria": {
"outer_pos_x": {
"trigger": "minecraft:location",
"conditions": {
"player": [{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"location": {
"dimension": "minecraft:overworld",
"position": {
"x": {
"min": 31990.0
}
}
}
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type_specific": {
"type": "player",
"gamemode": "spectator"
}
}
}
}
]
}
},
"outer_pos_z": {
"trigger": "minecraft:location",
"conditions": {
"player": [{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"location": {
"dimension": "minecraft:overworld",
"position": {
"z": {
"min": 31990.0
}
}
}
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type_specific": {
"type": "player",
"gamemode": "spectator"
}
}
}
}
]
}
},
"outer_neg_x": {
"trigger": "minecraft:location",
"conditions": {
"player": [{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"location": {
"dimension": "minecraft:overworld",
"position": {
"x": {
"max": -31990.0
}
}
}
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type_specific": {
"type": "player",
"gamemode": "spectator"
}
}
}
}
]
}
},
"outer_neg_z": {
"trigger": "minecraft:location",
"conditions": {
"player": [{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"location": {
"dimension": "minecraft:overworld",
"position": {
"x": {
"max": -31990.0
}
}
}
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type_specific": {
"type": "player",
"gamemode": "spectator"
}
}
}
}
]
}
}
}
}

View File

@ -1,23 +0,0 @@
{
"display": {
"icon": {
"item": "minecraft:netherite_block"
},
"title": "What Is Wrong With You...",
"description": "Build a full beacon out of netherite blocks.",
"frame": "challenge",
"announce_to_chat": true
},
"parent": "canopy:root",
"criteria": {
"have_netherite": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [{
"item": "minecraft:netherite_block",
"count": 244
}]
}
}
}
}