Skip to content

Commit

Permalink
Take advantage of loadables to reduce code for modifier module loader…
Browse files Browse the repository at this point in the history
…s, variables, and predicates

IdParser is now a loadable for the relevant resource location variant
IntRange is now a loadable for IntRange, it had a weird loading more of itself behavior going already
In addition to those two, added loadables for: SlotType, LevelingValue, RandomLevelingValue, ModifierEntry, SlotType, IToolStat, INumericToolStat, TagKey<Modifier>, MaterialVariantId, plus various enums

As part of this change, variable formulas now store "percent" as a field inside as it made it made it require less context shenanigans for parsing. Since we always want it for the tooltip anyways, does not hurt to place in that interface. They also are far simplier in other ways, notably all the loading logic was moved to a loadable.
  • Loading branch information
KnightMiner committed Mar 22, 2024
1 parent d63ad00 commit 63fa801
Show file tree
Hide file tree
Showing 129 changed files with 1,034 additions and 2,350 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Expand Up @@ -17,8 +17,8 @@ forge_range=[43.3.0,)
parchment_version=2022.11.27

# Build Dependencies
mantle_version=1.10.13
mantle_range=[1.10.13,)
mantle_version=1.10.16
mantle_range=[1.10,)

# Optional compat
jei_version=11.6.+
Expand Down
Expand Up @@ -18,6 +18,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:blazing_bone"
}
]
Expand All @@ -44,6 +45,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:bone"
}
]
Expand All @@ -70,6 +72,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:copper"
}
]
Expand All @@ -96,6 +99,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:darkthread"
}
]
Expand All @@ -122,6 +126,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:ender_pearl"
}
]
Expand All @@ -148,6 +153,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:glass"
}
]
Expand All @@ -174,6 +180,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:gold"
}
]
Expand All @@ -200,6 +207,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:iron"
}
]
Expand All @@ -226,6 +234,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:necrotic_bone"
}
]
Expand All @@ -252,6 +261,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:pig_iron"
}
]
Expand All @@ -278,6 +288,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:rose_gold"
}
]
Expand All @@ -304,6 +315,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:rotten_flesh"
}
]
Expand All @@ -330,6 +342,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:string"
}
]
Expand All @@ -356,6 +369,7 @@
},
{
"type": "tconstruct:has_material",
"index": 0,
"material": "tconstruct:venombone"
}
]
Expand Down
@@ -1,8 +1,11 @@
{
"type": "mantle:fill_item",
"filled": {
"count": 1,
"item": "minecraft:lingering_potion",
"nbt": "{Potion:\"minecraft:water\"}"
"nbt": {
"Potion": "minecraft:water"
}
},
"fluid": {
"amount": 500,
Expand Down
@@ -1,8 +1,11 @@
{
"type": "mantle:fill_item",
"filled": {
"count": 1,
"item": "minecraft:splash_potion",
"nbt": "{Potion:\"minecraft:water\"}"
"nbt": {
"Potion": "minecraft:water"
}
},
"fluid": {
"amount": 500,
Expand Down
@@ -1,8 +1,11 @@
{
"type": "mantle:fill_item",
"filled": {
"count": 1,
"item": "minecraft:potion",
"nbt": "{Potion:\"minecraft:water\"}"
"nbt": {
"Potion": "minecraft:water"
}
},
"fluid": {
"amount": 500,
Expand Down
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:blazing_bone\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:blazing_bone"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:bone\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:bone"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:copper\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:copper"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:darkthread\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:darkthread"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:ender_pearl\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:ender_pearl"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:glass\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:glass"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:gold\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:gold"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:iron\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:iron"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:necrotic_bone\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:necrotic_bone"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:pig_iron\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:pig_iron"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:rose_gold\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:rose_gold"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:rotten_flesh\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:rotten_flesh"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:string\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:string"
]
}
}
}
Expand Up @@ -10,7 +10,14 @@
"tag": "tconstruct:ender_slime"
},
"result": {
"count": 1,
"item": "tconstruct:slime_helmet",
"nbt": "{Damage:0,tic_broken:0b,tic_materials:[\"tconstruct:venombone\"]}"
"nbt": {
"Damage": 0,
"tic_broken": 0,
"tic_materials": [
"tconstruct:venombone"
]
}
}
}

0 comments on commit 63fa801

Please sign in to comment.