Skip to content

Commit

Permalink
fix(advancements): remove experimental advancements, fix advancements…
Browse files Browse the repository at this point in the history
… format
  • Loading branch information
Franco227 committed Jul 11, 2024
1 parent 8a83c0c commit 2c513bc
Show file tree
Hide file tree
Showing 125 changed files with 8,924 additions and 140 deletions.
24 changes: 24 additions & 0 deletions Data_Pack/data/minecraft/advancements/advancement_skillpoints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import json
import glob
import os

dir_path = os.path.dirname(os.path.realpath(__file__))

if os.name == 'posix':
path = dir_path + "/*/*.json"
else:
path = dir_path + "\*\*.json"

for advancement in glob.glob(path):

with open(advancement, 'r') as file:
data = json.load(file)
if "display" in data and "announce_to_chat" in data["display"] and data["display"]["announce_to_chat"] is False:
continue
elif "rewards" not in data:
data["rewards"] = {"function": "roguecraft:skillpoints/advancement"}
else:
data["rewards"]["function"] = "roguecraft:skillpoints/advancement"

with open(advancement, 'w') as file:
json.dump(data, file, indent=2)
18 changes: 0 additions & 18 deletions Data_Pack/data/minecraft/advancements/advancment_skillpoints.py

This file was deleted.

1,033 changes: 1,032 additions & 1 deletion Data_Pack/data/minecraft/advancements/adventure/adventuring_time.json

Large diffs are not rendered by default.

36 changes: 35 additions & 1 deletion Data_Pack/data/minecraft/advancements/adventure/arbalistic.json
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
{"parent": "minecraft:adventure/ol_betsy", "criteria": {"arbalistic": {"conditions": {"unique_entity_types": 5}, "trigger": "minecraft:killed_by_crossbow"}}, "display": {"description": {"translate": "advancements.adventure.arbalistic.description"}, "frame": "challenge", "hidden": true, "icon": {"count": 1, "id": "minecraft:crossbow"}, "title": {"translate": "advancements.adventure.arbalistic.title"}}, "requirements": [["arbalistic"]], "rewards": {"function": "roguecraft:skillpoints/advancement"}, "sends_telemetry_event": true}
{
"parent": "minecraft:adventure/ol_betsy",
"criteria": {
"arbalistic": {
"conditions": {
"unique_entity_types": 5
},
"trigger": "minecraft:killed_by_crossbow"
}
},
"display": {
"description": {
"translate": "advancements.adventure.arbalistic.description"
},
"frame": "challenge",
"hidden": true,
"icon": {
"count": 1,
"id": "minecraft:crossbow"
},
"title": {
"translate": "advancements.adventure.arbalistic.title"
}
},
"requirements": [
[
"arbalistic"
]
],
"rewards": {
"experience": 85,
"function": "roguecraft:skillpoints/advancement"
},
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
{"parent": "minecraft:adventure/root", "criteria": {"avoid_vibration": {"trigger": "minecraft:avoid_vibration"}}, "display": {"description": {"translate": "advancements.adventure.avoid_vibration.description"}, "icon": {"count": 1, "id": "minecraft:sculk_sensor"}, "title": {"translate": "advancements.adventure.avoid_vibration.title"}}, "requirements": [["avoid_vibration"]], "sends_telemetry_event": true, "rewards": {"function": "roguecraft:skillpoints/advancement"}}
{
"parent": "minecraft:adventure/root",
"criteria": {
"avoid_vibration": {
"trigger": "minecraft:avoid_vibration"
}
},
"display": {
"description": {
"translate": "advancements.adventure.avoid_vibration.description"
},
"icon": {
"count": 1,
"id": "minecraft:sculk_sensor"
},
"title": {
"translate": "advancements.adventure.avoid_vibration.title"
}
},
"requirements": [
[
"avoid_vibration"
]
],
"sends_telemetry_event": true,
"rewards": {
"function": "roguecraft:skillpoints/advancement"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
{"parent": "minecraft:adventure/root", "criteria": {"brush_armadillo": {"conditions": {"entity": [{"condition": "minecraft:entity_properties", "entity": "this", "predicate": {"type": "minecraft:armadillo"}}], "item": {"items": "minecraft:brush"}}, "trigger": "minecraft:player_interacted_with_entity"}}, "display": {"description": {"translate": "advancements.adventure.brush_armadillo.description"}, "icon": {"count": 1, "id": "minecraft:armadillo_scute"}, "title": {"translate": "advancements.adventure.brush_armadillo.title"}}, "requirements": [["brush_armadillo"]], "sends_telemetry_event": true, "rewards": {"function": "roguecraft:skillpoints/advancement"}}
{
"parent": "minecraft:adventure/root",
"criteria": {
"brush_armadillo": {
"conditions": {
"entity": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"type": "minecraft:armadillo"
}
}
],
"item": {
"items": "minecraft:brush"
}
},
"trigger": "minecraft:player_interacted_with_entity"
}
},
"display": {
"description": {
"translate": "advancements.adventure.brush_armadillo.description"
},
"icon": {
"count": 1,
"id": "minecraft:armadillo_scute"
},
"title": {
"translate": "advancements.adventure.brush_armadillo.title"
}
},
"requirements": [
[
"brush_armadillo"
]
],
"sends_telemetry_event": true,
"rewards": {
"function": "roguecraft:skillpoints/advancement"
}
}
48 changes: 47 additions & 1 deletion Data_Pack/data/minecraft/advancements/adventure/bullseye.json
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
{"parent": "minecraft:adventure/shoot_arrow", "criteria": {"bullseye": {"conditions": {"projectile": [{"condition": "minecraft:entity_properties", "entity": "this", "predicate": {"distance": {"horizontal": {"min": 30.0}}}}], "signal_strength": 15}, "trigger": "minecraft:target_hit"}}, "display": {"description": {"translate": "advancements.adventure.bullseye.description"}, "frame": "challenge", "icon": {"count": 1, "id": "minecraft:target"}, "title": {"translate": "advancements.adventure.bullseye.title"}}, "requirements": [["bullseye"]], "rewards": {"function": "roguecraft:skillpoints/advancement"}, "sends_telemetry_event": true}
{
"parent": "minecraft:adventure/shoot_arrow",
"criteria": {
"bullseye": {
"conditions": {
"projectile": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"distance": {
"horizontal": {
"min": 30.0
}
}
}
}
],
"signal_strength": 15
},
"trigger": "minecraft:target_hit"
}
},
"display": {
"description": {
"translate": "advancements.adventure.bullseye.description"
},
"frame": "challenge",
"icon": {
"count": 1,
"id": "minecraft:target"
},
"title": {
"translate": "advancements.adventure.bullseye.title"
}
},
"requirements": [
[
"bullseye"
]
],
"rewards": {
"experience": 50,
"function": "roguecraft:skillpoints/advancement"
},
"sends_telemetry_event": true
}
Original file line number Diff line number Diff line change
@@ -1 +1,54 @@
{"parent": "minecraft:adventure/salvage_sherd", "criteria": {"pot_crafted_using_only_sherds": {"conditions": {"ingredients": [{"items": "#minecraft:decorated_pot_sherds"}, {"items": "#minecraft:decorated_pot_sherds"}, {"items": "#minecraft:decorated_pot_sherds"}, {"items": "#minecraft:decorated_pot_sherds"}], "recipe_id": "minecraft:decorated_pot"}, "trigger": "minecraft:recipe_crafted"}}, "display": {"description": {"translate": "advancements.adventure.craft_decorated_pot_using_only_sherds.description"}, "icon": {"components": {"minecraft:pot_decorations": ["minecraft:brick", "minecraft:heart_pottery_sherd", "minecraft:brick", "minecraft:explorer_pottery_sherd"]}, "count": 1, "id": "minecraft:decorated_pot"}, "title": {"translate": "advancements.adventure.craft_decorated_pot_using_only_sherds.title"}}, "requirements": [["pot_crafted_using_only_sherds"]], "sends_telemetry_event": true, "rewards": {"function": "roguecraft:skillpoints/advancement"}}
{
"parent": "minecraft:adventure/salvage_sherd",
"criteria": {
"pot_crafted_using_only_sherds": {
"conditions": {
"ingredients": [
{
"items": "#minecraft:decorated_pot_sherds"
},
{
"items": "#minecraft:decorated_pot_sherds"
},
{
"items": "#minecraft:decorated_pot_sherds"
},
{
"items": "#minecraft:decorated_pot_sherds"
}
],
"recipe_id": "minecraft:decorated_pot"
},
"trigger": "minecraft:recipe_crafted"
}
},
"display": {
"description": {
"translate": "advancements.adventure.craft_decorated_pot_using_only_sherds.description"
},
"icon": {
"components": {
"minecraft:pot_decorations": [
"minecraft:brick",
"minecraft:heart_pottery_sherd",
"minecraft:brick",
"minecraft:explorer_pottery_sherd"
]
},
"count": 1,
"id": "minecraft:decorated_pot"
},
"title": {
"translate": "advancements.adventure.craft_decorated_pot_using_only_sherds.title"
}
},
"requirements": [
[
"pot_crafted_using_only_sherds"
]
],
"sends_telemetry_event": true,
"rewards": {
"function": "roguecraft:skillpoints/advancement"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
{"parent": "minecraft:adventure/root", "criteria": {"fall_from_world_height": {"conditions": {"distance": {"y": {"min": 379.0}}, "player": [{"condition": "minecraft:entity_properties", "entity": "this", "predicate": {"location": {"position": {"y": {"max": -59.0}}}}}], "start_position": {"position": {"y": {"min": 319.0}}}}, "trigger": "minecraft:fall_from_height"}}, "display": {"description": {"translate": "advancements.adventure.fall_from_world_height.description"}, "icon": {"count": 1, "id": "minecraft:water_bucket"}, "title": {"translate": "advancements.adventure.fall_from_world_height.title"}}, "requirements": [["fall_from_world_height"]], "sends_telemetry_event": true, "rewards": {"function": "roguecraft:skillpoints/advancement"}}
{
"parent": "minecraft:adventure/root",
"criteria": {
"fall_from_world_height": {
"conditions": {
"distance": {
"y": {
"min": 379.0
}
},
"player": [
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"location": {
"position": {
"y": {
"max": -59.0
}
}
}
}
}
],
"start_position": {
"position": {
"y": {
"min": 319.0
}
}
}
},
"trigger": "minecraft:fall_from_height"
}
},
"display": {
"description": {
"translate": "advancements.adventure.fall_from_world_height.description"
},
"icon": {
"count": 1,
"id": "minecraft:water_bucket"
},
"title": {
"translate": "advancements.adventure.fall_from_world_height.title"
}
},
"requirements": [
[
"fall_from_world_height"
]
],
"sends_telemetry_event": true,
"rewards": {
"function": "roguecraft:skillpoints/advancement"
}
}
Loading

0 comments on commit 2c513bc

Please sign in to comment.