Skip to content

Commit 8a8d2ef

Browse files
authored
runcows misc 1.21.9 commits (#1165)
* Add copper weapons and armor to SR * Add copper golem to Reeling Rods * Disassembler copper tools and armor - untested overlay because beet is still broken * Update base tag lists * Add copper horse armor to Standard Crafting - overlay may be broken due to beet not being fully updated * Add mannequin to Reeling Rods steal_equipment
1 parent e4669fc commit 8a8d2ef

File tree

18 files changed

+244
-10
lines changed

18 files changed

+244
-10
lines changed

base/data/gm4/tags/block/no_collision.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"minecraft:cave_vines_plant",
2828
"minecraft:cherry_sapling",
2929
"minecraft:cobweb",
30+
{"id": "minecraft:copper_torch", "required": false},
3031
"minecraft:crimson_fungus",
3132
"minecraft:crimson_roots",
3233
"minecraft:dark_oak_sapling",

base/data/gm4/tags/block/waterloggable.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
{
22
"values": [
3-
"#minecraft:rails",
3+
"#minecraft:all_signs",
4+
"minecraft:amethyst_cluster",
5+
{"id": "#minecraft:bars", "required": false},
46
"#minecraft:campfires",
57
"#minecraft:candles",
8+
{"id": "#minecraft:chains", "required": false},
9+
{"id": "#minecraft:copper_chests", "required": false},
10+
{"id": "#minecraft:copper_golem_statues", "required": false},
11+
"#minecraft:corals",
612
"#minecraft:fences",
13+
{"id": "#minecraft:lanterns", "required": false},
714
"#minecraft:leaves",
8-
"#minecraft:all_signs",
15+
{"id": "#minecraft:lightning_rods", "required": false},
16+
"#minecraft:rails",
917
"#minecraft:slabs",
1018
"#minecraft:stairs",
1119
"#minecraft:trapdoors",
12-
"#minecraft:corals",
1320
"#minecraft:wall_corals",
1421
"#minecraft:wall_signs",
1522
"#minecraft:walls",
16-
"minecraft:amethyst_cluster",
23+
{"id": "#minecraft:wooden_shelves", "required": false},
1724
"minecraft:big_dripleaf",
1825
"minecraft:big_dripleaf_stem",
1926
"minecraft:black_stained_glass_pane",
2027
"minecraft:blue_stained_glass_pane",
2128
"minecraft:brown_stained_glass_pane",
2229
"minecraft:calibrated_sculk_sensor",
2330
{ "id": "minecraft:chain", "required": false },
24-
{ "id": "minecraft:iron_chain", "required": false },
2531
"minecraft:chest",
2632
"minecraft:conduit",
2733
"minecraft:cyan_stained_glass_pane",

base/data/gm4/tags/entity_type/passive.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
"minecraft:cat",
99
"minecraft:chicken",
1010
"minecraft:cod",
11+
{"id": "minecraft:copper_golem", "required": false},
1112
"minecraft:cow",
1213
"minecraft:donkey",
1314
"minecraft:frog",
1415
"minecraft:glow_squid",
16+
{"id": "minecraft:happy_ghast", "required": false},
1517
"minecraft:horse",
1618
"minecraft:mooshroom",
1719
"minecraft:mule",

gm4_disassemblers/beet.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ version: 2.5.X
44

55
data_pack:
66
load: .
7+
overlays:
8+
- formats:
9+
min_inclusive: 88
10+
max_inclusive: 88
11+
min_format: 88
12+
max_format: 88
13+
directory: since_88
714

815
resource_pack:
916
load: .

gm4_disassemblers/generate_disassembly.py

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
from typing import Any
55

66
ITEMS = {
7+
"copper_sword": 191,
8+
"copper_pickaxe": 191,
9+
"copper_axe": 191,
10+
"copper_shovel": 191,
11+
"copper_hoe": 191,
12+
"copper_helmet": 122,
13+
"copper_chestplate": 177,
14+
"copper_leggings": 166,
15+
"copper_boots": 144,
16+
717
"diamond_sword": 1562,
818
"diamond_pickaxe": 1562,
919
"diamond_axe": 1562,
@@ -51,10 +61,12 @@
5161
def beet_default(ctx: Context):
5262
"""Creates a loot table for dropping the 9 result items when disassembling an item."""
5363
vanilla = ctx.inject(Vanilla)
54-
vanilla.minecraft_version = '1.21.5'
64+
vanilla.minecraft_version = '1.21.9'
5565
recipes = vanilla.data.recipes
5666

5767
for item, durability in ITEMS.items():
68+
output_pack = ctx.data.overlays["since_88"] if "copper" in item else ctx.data
69+
5870
recipe = recipes[f"minecraft:{item}"].data
5971
ingredients: list[tuple[str, int]] = []
6072
if recipe["type"] == "minecraft:crafting_shaped":
@@ -117,13 +129,14 @@ def beet_default(ctx: Context):
117129
}]
118130
})
119131

120-
ctx.data[f"{ctx.project_id}:disassembleables/{item}"] = LootTable({
132+
output_pack[f"{ctx.project_id}:disassembleables/{item}"] = LootTable({
121133
"__comment": "Generated by generate_disassembly.py",
122134
"type": "minecraft:generic",
123135
"pools": pools
124136
})
125137

126-
caller: Any = {
138+
# base pack
139+
caller: dict[str, Any] = {
127140
"__comment": "Generated by generate_disassembly.py",
128141
"type": "minecraft:fishing",
129142
"pools": [{
@@ -132,6 +145,8 @@ def beet_default(ctx: Context):
132145
}]
133146
}
134147
for item in ITEMS:
148+
if "copper" in item:
149+
continue
135150
caller["pools"][0]["entries"][0]["children"].append({
136151
"type": "minecraft:loot_table",
137152
"value": f'gm4_disassemblers:disassembleables/{item}',
@@ -150,3 +165,32 @@ def beet_default(ctx: Context):
150165
})
151166

152167
ctx.data[f"{ctx.project_id}:caller"] = LootTable(caller)
168+
169+
# since 88 overlay
170+
caller_88: dict[str, Any] = {
171+
"__comment": "Generated by generate_disassembly.py",
172+
"type": "minecraft:fishing",
173+
"pools": [{
174+
"rolls": 1,
175+
"entries": [{"type":"minecraft:alternatives","children":[]}]
176+
}]
177+
}
178+
for item in ITEMS:
179+
caller_88["pools"][0]["entries"][0]["children"].append({
180+
"type": "minecraft:loot_table",
181+
"value": f'gm4_disassemblers:disassembleables/{item}',
182+
"conditions": [{
183+
"condition": "match_tool",
184+
"predicate": {
185+
"items": [f"minecraft:{item}"]
186+
}
187+
}]
188+
})
189+
if item.startswith("diamond_"):
190+
caller_88["pools"][0]["entries"][0]["children"][-1]["conditions"].append({
191+
"condition": "value_check",
192+
"range": 1,
193+
"value": {"type":"score","target":{"type":"fixed","name":"disassemble_diamonds"},"score":"gm4_disassembler"}
194+
})
195+
196+
ctx.data.overlays["since_88"][f"{ctx.project_id}:caller"] = LootTable(caller_88)

gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/leashable.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"minecraft:camel",
1212
"minecraft:cat",
1313
"minecraft:chicken",
14+
{"id": "minecraft:copper_golem", "required": false},
1415
"minecraft:cow",
1516
"minecraft:dolphin",
1617
"minecraft:donkey",

gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_equipment.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"minecraft:bogged",
55
"minecraft:drowned",
66
"minecraft:husk",
7+
{"id": "minecraft:mannequin", "required": false},
78
"minecraft:piglin",
89
"minecraft:piglin_brute",
910
"minecraft:player",

gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_hand.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"values": [
33
"minecraft:allay",
4+
{"id": "minecraft:copper_golem", "required": false},
45
"minecraft:fox",
56
"minecraft:illusioner",
67
"minecraft:panda",

gm4_standard_crafting/beet.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ version: 1.6.X
44

55
data_pack:
66
load: .
7+
overlays:
8+
- formats:
9+
min_inclusive: 88
10+
max_inclusive: 88
11+
min_format: 88
12+
max_format: 88
13+
directory: since_88
714

815
pipeline:
916
- generate_recipes

gm4_standard_crafting/data/gm4_standard_crafting/guidebook/standard_crafting.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@
409409
[
410410
{
411411
"translate": "text.gm4.guidebook.standard_crafting.horse_armor",
412-
"fallback": "Diamond, iron, and golden armor can be crafted"
412+
"fallback": "Diamond, iron, copper, and golden armor can be crafted"
413413
},
414414
"\n",
415415
{

0 commit comments

Comments
 (0)