diff --git a/build.gradle b/build.gradle index 62e0497e..26f46199 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,10 @@ plugins { - id 'fabric-loom' version '0.5-SNAPSHOT' + id 'fabric-loom' version '0.8-SNAPSHOT' id 'maven-publish' } -sourceCompatibility = JavaVersion.VERSION_1_8 -targetCompatibility = JavaVersion.VERSION_1_8 +sourceCompatibility = JavaVersion.VERSION_16 +targetCompatibility = JavaVersion.VERSION_16 archivesBaseName = project.archives_base_name version = project.mod_version + "-" + project.minecraft_version @@ -22,12 +22,12 @@ repositories { dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modCompile "net.fabricmc:fabric-loader:${project.loader_version}" - modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + modCompileOnly "net.fabricmc:fabric-loader:${project.loader_version}" + modCompileOnly "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modCompile "io.github.prospector:modmenu:${project.mod_menu_version}" + modCompileOnly "io.github.prospector:modmenu:${project.mod_menu_version}" - modCompile ("com.github.Draylar:reach-entity-attributes:1.0.2") { + modCompileOnly ("com.github.Draylar:reach-entity-attributes:1.0.2") { exclude group: "net.fabricmc.fabric-api" } diff --git a/gradle.properties b/gradle.properties index fddd9044..f8306cdd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,17 +2,17 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties -minecraft_version=1.16.4 -yarn_mappings=1.16.4+build.7 -loader_version=0.10.8 +minecraft_version=1.17.1 +yarn_mappings=1.17.1+build.46 +loader_version=0.11.6 # Mod Properties mod_version=1.2.2-beta -maven_group=draylar +maven_group=io.github.Andrew6rant archives_base_name=tiered # Dependencies -fabric_version=0.32.5+1.16 +fabric_version=0.39.2+1.17 cardinal_version=2.7.4 reach_entity_attributes_version=1.0.1 mod_menu_version=1.14+ \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1b16c34a..0f80bbf5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/out/production/tiered.main/assets/tiered/icon.png b/out/production/tiered.main/assets/tiered/icon.png new file mode 100644 index 00000000..b38147ff Binary files /dev/null and b/out/production/tiered.main/assets/tiered/icon.png differ diff --git a/out/production/tiered.main/assets/tiered/lang/en_us.json b/out/production/tiered.main/assets/tiered/lang/en_us.json new file mode 100644 index 00000000..afc3d818 --- /dev/null +++ b/out/production/tiered.main/assets/tiered/lang/en_us.json @@ -0,0 +1,29 @@ +{ + "generic.dig_speed": "Dig Speed", + "generic.crit_chance": "Crit Chance", + + "tiered:common.label": "Common", + "tiered:rare.label": "Rare", + "tiered:epic.label": "Epic", + "tiered:legendary.label": "Legendary", + + "tiered:dented.label": "Dented", + "tiered:fortified.label": "Fortified", + "tiered:heavy.label": "Heavy", + "tiered:reinforced.label": "Reinforced", + "tiered:resilient.label": "Resilient", + "tiered:unchained.label": "Unchained", + + "tiered:extended.label": "Extended", + + "tiered:lucky.label": "Lucky", + + "tiered:hasteful.label": "Hasteful", + "tiered:swift.label": "Swift", + + "tiered:berserk.label": "Berserk", + "tiered:critical.label": "Critical", + "tiered:dull.label": "Dull", + "tiered:keen.label": "Keen", + "tiered:sharp.label": "Sharp" +} \ No newline at end of file diff --git a/out/production/tiered.main/assets/tiered/lang/tr_tr.json b/out/production/tiered.main/assets/tiered/lang/tr_tr.json new file mode 100644 index 00000000..e9da7f7d --- /dev/null +++ b/out/production/tiered.main/assets/tiered/lang/tr_tr.json @@ -0,0 +1,29 @@ +{ + "generic.dig_speed": "Kazma hızı", + "generic.crit_chance": "Kritikal şansı", + + "tiered:common.label": "Yaygın", + "tiered:rare.label": "Nadir", + "tiered:epic.label": "Epik", + "tiered:legendary.label": "Efsanevi", + + "tiered:dented.label": "Girintili", + "tiered:fortified.label": "Takviye edilmiş", + "tiered:heavy.label": "Ağır", + "tiered:reinforced.label": "Takviyeli", + "tiered:resilient.label": "Esnek", + "tiered:unchained.label": "Zincirsiz", + + "tiered:extended.label": "Genişletilmiş", + + "tiered:lucky.label": "Şanslı", + + "tiered:hasteful.label": "Aceleci", + "tiered:swift.label": "Hızlı", + + "tiered:berserk.label": "Çılgın", + "tiered:critical.label": "Kritikal", + "tiered:dull.label": "Donuk", + "tiered:keen.label": "Şahane", + "tiered:sharp.label": "Keskin" +} diff --git a/out/production/tiered.main/data/fabric/tags/items/boots.json b/out/production/tiered.main/data/fabric/tags/items/boots.json new file mode 100644 index 00000000..23cc7263 --- /dev/null +++ b/out/production/tiered.main/data/fabric/tags/items/boots.json @@ -0,0 +1,11 @@ +{ + "replace": false, + "values": [ + "minecraft:leather_boots", + "minecraft:chainmail_boots", + "minecraft:iron_boots", + "minecraft:golden_boots", + "minecraft:diamond_boots", + "minecraft:netherite_boots" + ] +} diff --git a/out/production/tiered.main/data/fabric/tags/items/chestplates.json b/out/production/tiered.main/data/fabric/tags/items/chestplates.json new file mode 100644 index 00000000..1ab8bdbc --- /dev/null +++ b/out/production/tiered.main/data/fabric/tags/items/chestplates.json @@ -0,0 +1,11 @@ +{ + "replace": false, + "values": [ + "minecraft:leather_chestplate", + "minecraft:chainmail_chestplate", + "minecraft:iron_chestplate", + "minecraft:golden_chestplate", + "minecraft:diamond_chestplate", + "minecraft:netherite_chestplate" + ] +} diff --git a/out/production/tiered.main/data/fabric/tags/items/helmets.json b/out/production/tiered.main/data/fabric/tags/items/helmets.json new file mode 100644 index 00000000..f73245b4 --- /dev/null +++ b/out/production/tiered.main/data/fabric/tags/items/helmets.json @@ -0,0 +1,12 @@ +{ + "replace": false, + "values": [ + "minecraft:leather_helmet", + "minecraft:chainmail_helmet", + "minecraft:iron_helmet", + "minecraft:golden_helmet", + "minecraft:diamond_helmet", + "minecraft:turtle_helmet", + "minecraft:netherite_helmet" + ] +} diff --git a/out/production/tiered.main/data/fabric/tags/items/leggings.json b/out/production/tiered.main/data/fabric/tags/items/leggings.json new file mode 100644 index 00000000..9012b251 --- /dev/null +++ b/out/production/tiered.main/data/fabric/tags/items/leggings.json @@ -0,0 +1,11 @@ +{ + "replace": false, + "values": [ + "minecraft:leather_leggings", + "minecraft:chainmail_leggings", + "minecraft:iron_leggings", + "minecraft:golden_leggings", + "minecraft:diamond_leggings", + "minecraft:netherite_leggings" + ] +} diff --git a/out/production/tiered.main/data/fabric/tags/items/shields.json b/out/production/tiered.main/data/fabric/tags/items/shields.json new file mode 100644 index 00000000..4e0d8847 --- /dev/null +++ b/out/production/tiered.main/data/fabric/tags/items/shields.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "minecraft:shield" + ] +} diff --git a/out/production/tiered.main/data/tiered/item_attributes/all/common.json b/out/production/tiered.main/data/tiered/item_attributes/all/common.json new file mode 100644 index 00000000..08d9cc7e --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all/common.json @@ -0,0 +1,52 @@ +{ + "id": "tiered:common", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + }, + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:shovels" + }, + { + "tag": "fabric:pickaxes" + }, + { + "tag": "fabric:hoes" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "gray" + }, + "attributes": [ + { + "type": "generic.max_health", + "modifier": { + "name": "tiered:common", + "operation": "ADDITION", + "amount": 2 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all/epic.json b/out/production/tiered.main/data/tiered/item_attributes/all/epic.json new file mode 100644 index 00000000..6d9f5916 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all/epic.json @@ -0,0 +1,82 @@ +{ + "id": "tiered:epic", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + }, + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:shovels" + }, + { + "tag": "fabric:pickaxes" + }, + { + "tag": "fabric:hoes" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "dark_purple" + }, + "attributes": [ + { + "type": "generic.max_health", + "modifier": { + "name": "tiered:epic", + "operation": "ADDITION", + "amount": 6 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + }, + { + "type": "generic.armor", + "modifier": { + "name": "tiered:epic", + "operation": "ADDITION", + "amount": 2 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + }, + { + "type": "generic.armor_toughness", + "modifier": { + "name": "tiered:legendary", + "operation": "ADDITION", + "amount": 1 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all/legendary.json b/out/production/tiered.main/data/tiered/item_attributes/all/legendary.json new file mode 100644 index 00000000..7fbb385f --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all/legendary.json @@ -0,0 +1,97 @@ +{ + "id": "tiered:legendary", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + }, + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:shovels" + }, + { + "tag": "fabric:pickaxes" + }, + { + "tag": "fabric:hoes" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "gold" + }, + "attributes": [ + { + "type": "generic.max_health", + "modifier": { + "name": "tiered:legendary", + "operation": "ADDITION", + "amount": 10 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + }, + { + "type": "generic.armor", + "modifier": { + "name": "tiered:legendary", + "operation": "ADDITION", + "amount": 4 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + }, + { + "type": "generic.luck", + "modifier": { + "name": "tiered:legendary", + "operation": "ADDITION", + "amount": 0.5 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + }, + { + "type": "generic.armor_toughness", + "modifier": { + "name": "tiered:legendary", + "operation": "ADDITION", + "amount": 2 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all/rare.json b/out/production/tiered.main/data/tiered/item_attributes/all/rare.json new file mode 100644 index 00000000..d983e3f3 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all/rare.json @@ -0,0 +1,67 @@ +{ + "id": "tiered:rare", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + }, + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:shovels" + }, + { + "tag": "fabric:pickaxes" + }, + { + "tag": "fabric:hoes" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "blue" + }, + "attributes": [ + { + "type": "generic.max_health", + "modifier": { + "name": "tiered:rare", + "operation": "ADDITION", + "amount": 4 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + }, + { + "type": "generic.armor", + "modifier": { + "name": "tiered:rare", + "operation": "ADDITION", + "amount": 1 + }, + "optional_equipment_slots": [ + "MAINHAND", + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all_armor/dented.json b/out/production/tiered.main/data/tiered/item_attributes/all_armor/dented.json new file mode 100644 index 00000000..bad899c7 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all_armor/dented.json @@ -0,0 +1,36 @@ +{ + "id": "tiered:dented", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + } + ], + "style": { + "color": "dark_gray" + }, + "attributes": [ + { + "type": "generic.armor", + "modifier": { + "name": "tiered:dented", + "operation": "ADDITION", + "amount": -1 + }, + "optional_equipment_slots": [ + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all_armor/fortified.json b/out/production/tiered.main/data/tiered/item_attributes/all_armor/fortified.json new file mode 100644 index 00000000..4c2d4743 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all_armor/fortified.json @@ -0,0 +1,36 @@ +{ + "id": "tiered:fortified", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + } + ], + "style": { + "color": "dark_blue" + }, + "attributes": [ + { + "type": "generic.armor", + "modifier": { + "name": "tiered:fortified", + "operation": "MULTIPLY_TOTAL", + "amount": 0.25 + }, + "optional_equipment_slots": [ + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all_armor/heavy.json b/out/production/tiered.main/data/tiered/item_attributes/all_armor/heavy.json new file mode 100644 index 00000000..8713bfb2 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all_armor/heavy.json @@ -0,0 +1,36 @@ +{ + "id": "tiered:heavy", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + } + ], + "style": { + "color": "dark_gray" + }, + "attributes": [ + { + "type": "generic.knockback_resistance", + "modifier": { + "name": "tiered:heavy", + "operation": "MULTIPLY_TOTAL", + "amount": 0.1 + }, + "optional_equipment_slots": [ + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all_armor/reinforced.json b/out/production/tiered.main/data/tiered/item_attributes/all_armor/reinforced.json new file mode 100644 index 00000000..797fb345 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all_armor/reinforced.json @@ -0,0 +1,36 @@ +{ + "id": "tiered:reinforced", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + } + ], + "style": { + "color": "dark_gray" + }, + "attributes": [ + { + "type": "generic.armor", + "modifier": { + "name": "tiered:reinforced", + "operation": "ADDITION", + "amount": 2 + }, + "optional_equipment_slots": [ + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all_armor/resilient.json b/out/production/tiered.main/data/tiered/item_attributes/all_armor/resilient.json new file mode 100644 index 00000000..bb9f6347 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all_armor/resilient.json @@ -0,0 +1,36 @@ +{ + "id": "tiered:resilient", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + } + ], + "style": { + "color": "gray" + }, + "attributes": [ + { + "type": "generic.max_health", + "modifier": { + "name": "tiered:resilient", + "operation": "ADDITION", + "amount": 1 + }, + "optional_equipment_slots": [ + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all_armor/unchained.json b/out/production/tiered.main/data/tiered/item_attributes/all_armor/unchained.json new file mode 100644 index 00000000..7de7d806 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all_armor/unchained.json @@ -0,0 +1,50 @@ +{ + "id": "tiered:unchained", + "verifiers": [ + { + "tag": "fabric:helmets" + }, + { + "tag": "fabric:chestplates" + }, + { + "tag": "fabric:leggings" + }, + { + "tag": "fabric:boots" + } + ], + "style": { + "color": "dark_red" + }, + "attributes": [ + { + "type": "generic.armor", + "modifier": { + "name": "tiered:unchained", + "operation": "ADDITION", + "amount": -2 + }, + "optional_equipment_slots": [ + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + }, + { + "type": "generic.attack_damage", + "modifier": { + "name": "tiered:unchained", + "operation": "MULTIPLY_TOTAL", + "amount": 0.25 + }, + "optional_equipment_slots": [ + "FEET", + "LEGS", + "CHEST", + "HEAD" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/all_tools/extended.json b/out/production/tiered.main/data/tiered/item_attributes/all_tools/extended.json new file mode 100644 index 00000000..9edd9769 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/all_tools/extended.json @@ -0,0 +1,47 @@ +{ + "id": "tiered:extended", + "verifiers": [ + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:axes" + }, + { + "tag": "fabric:pickaxes" + }, + { + "tag": "fabric:shovels" + }, + { + "tag": "fabric:hoes" + } + ], + "style": { + "color": "dark_purple" + }, + "attributes": [ + { + "type": "reach-entity-attributes:reach", + "modifier": { + "name": "tiered:extended", + "operation": "ADDITION", + "amount": 1 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + }, + { + "type": "reach-entity-attributes:attack_range", + "modifier": { + "name": "tiered:extended", + "operation": "ADDITION", + "amount": 1 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/fishing_rods/lucky.json b/out/production/tiered.main/data/tiered/item_attributes/fishing_rods/lucky.json new file mode 100644 index 00000000..03cc1d8a --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/fishing_rods/lucky.json @@ -0,0 +1,24 @@ +{ + "id": "tiered:lucky", + "verifiers": [ + { + "id": "minecraft:fishing_rod" + } + ], + "style": { + "color": "aqua" + }, + "attributes": [ + { + "type": "generic.luck", + "modifier": { + "name": "tiered:lucky", + "operation": "MULTIPLY_TOTAL", + "amount": 0.25 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} diff --git a/out/production/tiered.main/data/tiered/item_attributes/gathering_tools/hasteful.json b/out/production/tiered.main/data/tiered/item_attributes/gathering_tools/hasteful.json new file mode 100644 index 00000000..e3047a47 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/gathering_tools/hasteful.json @@ -0,0 +1,30 @@ +{ + "id": "tiered:hasteful", + "verifiers": [ + { + "tag": "fabric:pickaxes" + }, + { + "tag": "fabric:shovels" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "green" + }, + "attributes": [ + { + "type": "tiered:generic.dig_speed", + "modifier": { + "name": "tiered:hasteful", + "operation": "MULTIPLY_TOTAL", + "amount": 0.10 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/gathering_tools/swift.json b/out/production/tiered.main/data/tiered/item_attributes/gathering_tools/swift.json new file mode 100644 index 00000000..10d6a3dc --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/gathering_tools/swift.json @@ -0,0 +1,41 @@ +{ + "id": "tiered:swift", + "verifiers": [ + { + "tag": "fabric:pickaxes" + }, + { + "tag": "fabric:shovels" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "yellow" + }, + "attributes": [ + { + "type": "tiered:generic.dig_speed", + "modifier": { + "name": "tiered:swift", + "operation": "MULTIPLY_TOTAL", + "amount": 0.10 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + }, + { + "type": "generic.movement_speed", + "modifier": { + "name": "tiered:swift", + "operation": "MULTIPLY_TOTAL", + "amount": 0.10 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/berserk.json b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/berserk.json new file mode 100644 index 00000000..20d62a96 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/berserk.json @@ -0,0 +1,60 @@ +{ + "id": "tiered:berserk", + "verifiers": [ + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "red" + }, + "attributes": [ + { + "type": "generic.attack_damage", + "modifier": { + "name": "tiered:berserk", + "operation": "MULTIPLY_TOTAL", + "amount": 0.25 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + }, + { + "type": "generic.attack_speed", + "modifier": { + "name": "tiered:berserk", + "operation": "MULTIPLY_TOTAL", + "amount": -0.25 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + }, + { + "type": "reach-entity-attributes:reach", + "modifier": { + "name": "tiered:berserk", + "operation": "ADDITION", + "amount": -1 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + }, + { + "type": "reach-entity-attributes:attack_range", + "modifier": { + "name": "tiered:berserk", + "operation": "ADDITION", + "amount": -1 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/critical.json b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/critical.json new file mode 100644 index 00000000..e6187196 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/critical.json @@ -0,0 +1,38 @@ +{ + "id": "tiered:critical", + "verifiers": [ + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "green" + }, + "attributes": [ + { + "type": "generic.attack_damage", + "modifier": { + "name": "tiered:critical", + "operation": "MULTIPLY_TOTAL", + "amount": -0.10 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + }, + { + "type": "tiered:generic.crit_chance", + "modifier": { + "name": "tiered:critical", + "operation": "MULTIPLY_TOTAL", + "amount": 0.25 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/dull.json b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/dull.json new file mode 100644 index 00000000..83a1813c --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/dull.json @@ -0,0 +1,27 @@ +{ + "id": "tiered:dull", + "verifiers": [ + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "gray" + }, + "attributes": [ + { + "type": "generic.attack_damage", + "modifier": { + "name": "tiered:dull", + "operation": "MULTIPLY_TOTAL", + "amount": -0.10 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/keen.json b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/keen.json new file mode 100644 index 00000000..bf51f8cf --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/keen.json @@ -0,0 +1,27 @@ +{ + "id": "tiered:keen", + "verifiers": [ + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "red" + }, + "attributes": [ + { + "type": "generic.attack_damage", + "modifier": { + "name": "tiered:keen", + "operation": "MULTIPLY_TOTAL", + "amount": 0.10 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/sharp.json b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/sharp.json new file mode 100644 index 00000000..4a2cb270 --- /dev/null +++ b/out/production/tiered.main/data/tiered/item_attributes/melee_weapons/sharp.json @@ -0,0 +1,27 @@ +{ + "id": "tiered:sharp", + "verifiers": [ + { + "tag": "fabric:swords" + }, + { + "tag": "fabric:axes" + } + ], + "style": { + "color": "red" + }, + "attributes": [ + { + "type": "generic.attack_damage", + "modifier": { + "name": "tiered:sharp", + "operation": "MULTIPLY_TOTAL", + "amount": 0.15 + }, + "optional_equipment_slots": [ + "MAINHAND" + ] + } + ] +} \ No newline at end of file diff --git a/out/production/tiered.main/draylar/tiered/Tiered.class b/out/production/tiered.main/draylar/tiered/Tiered.class new file mode 100644 index 00000000..d24ab026 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/Tiered.class differ diff --git a/out/production/tiered.main/draylar/tiered/TieredClient.class b/out/production/tiered.main/draylar/tiered/TieredClient.class new file mode 100644 index 00000000..e2a0d4ea Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/TieredClient.class differ diff --git a/out/production/tiered.main/draylar/tiered/api/AttributeTemplate.class b/out/production/tiered.main/draylar/tiered/api/AttributeTemplate.class new file mode 100644 index 00000000..fe66777b Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/api/AttributeTemplate.class differ diff --git a/out/production/tiered.main/draylar/tiered/api/CustomEntityAttributes.class b/out/production/tiered.main/draylar/tiered/api/CustomEntityAttributes.class new file mode 100644 index 00000000..7244c298 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/api/CustomEntityAttributes.class differ diff --git a/out/production/tiered.main/draylar/tiered/api/ItemVerifier.class b/out/production/tiered.main/draylar/tiered/api/ItemVerifier.class new file mode 100644 index 00000000..b27fadeb Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/api/ItemVerifier.class differ diff --git a/out/production/tiered.main/draylar/tiered/api/ModifierUtils.class b/out/production/tiered.main/draylar/tiered/api/ModifierUtils.class new file mode 100644 index 00000000..51371071 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/api/ModifierUtils.class differ diff --git a/out/production/tiered.main/draylar/tiered/api/PotentialAttribute.class b/out/production/tiered.main/draylar/tiered/api/PotentialAttribute.class new file mode 100644 index 00000000..754823f0 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/api/PotentialAttribute.class differ diff --git a/out/production/tiered.main/draylar/tiered/api/TieredItemTags.class b/out/production/tiered.main/draylar/tiered/api/TieredItemTags.class new file mode 100644 index 00000000..0e5dc8e0 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/api/TieredItemTags.class differ diff --git a/out/production/tiered.main/draylar/tiered/data/AttributeDataLoader.class b/out/production/tiered.main/draylar/tiered/data/AttributeDataLoader.class new file mode 100644 index 00000000..5e0c2a7c Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/data/AttributeDataLoader.class differ diff --git a/out/production/tiered.main/draylar/tiered/gson/EntityAttributeModifierDeserializer.class b/out/production/tiered.main/draylar/tiered/gson/EntityAttributeModifierDeserializer.class new file mode 100644 index 00000000..9231c2aa Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/gson/EntityAttributeModifierDeserializer.class differ diff --git a/out/production/tiered.main/draylar/tiered/gson/EntityAttributeModifierSerializer.class b/out/production/tiered.main/draylar/tiered/gson/EntityAttributeModifierSerializer.class new file mode 100644 index 00000000..69ddee36 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/gson/EntityAttributeModifierSerializer.class differ diff --git a/out/production/tiered.main/draylar/tiered/gson/EquipmentSlotDeserializer.class b/out/production/tiered.main/draylar/tiered/gson/EquipmentSlotDeserializer.class new file mode 100644 index 00000000..50a02547 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/gson/EquipmentSlotDeserializer.class differ diff --git a/out/production/tiered.main/draylar/tiered/gson/EquipmentSlotSerializer.class b/out/production/tiered.main/draylar/tiered/gson/EquipmentSlotSerializer.class new file mode 100644 index 00000000..6e93bc21 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/gson/EquipmentSlotSerializer.class differ diff --git a/out/production/tiered.main/draylar/tiered/gson/FormattingDeserializer.class b/out/production/tiered.main/draylar/tiered/gson/FormattingDeserializer.class new file mode 100644 index 00000000..37d61900 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/gson/FormattingDeserializer.class differ diff --git a/out/production/tiered.main/draylar/tiered/gson/TextColorDeserializer.class b/out/production/tiered.main/draylar/tiered/gson/TextColorDeserializer.class new file mode 100644 index 00000000..a88599dd Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/gson/TextColorDeserializer.class differ diff --git a/out/production/tiered.main/draylar/tiered/mixin/InventoryAccessor.class b/out/production/tiered.main/draylar/tiered/mixin/InventoryAccessor.class new file mode 100644 index 00000000..ac81229b Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/mixin/InventoryAccessor.class differ diff --git a/out/production/tiered.main/draylar/tiered/mixin/ItemStackClientMixin.class b/out/production/tiered.main/draylar/tiered/mixin/ItemStackClientMixin.class new file mode 100644 index 00000000..bb290df1 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/mixin/ItemStackClientMixin.class differ diff --git a/out/production/tiered.main/draylar/tiered/mixin/ItemStackMixin.class b/out/production/tiered.main/draylar/tiered/mixin/ItemStackMixin.class new file mode 100644 index 00000000..85e46c27 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/mixin/ItemStackMixin.class differ diff --git a/out/production/tiered.main/draylar/tiered/mixin/LivingEntityMixin.class b/out/production/tiered.main/draylar/tiered/mixin/LivingEntityMixin.class new file mode 100644 index 00000000..794c8300 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/mixin/LivingEntityMixin.class differ diff --git a/out/production/tiered.main/draylar/tiered/mixin/PlayerEntityMixin.class b/out/production/tiered.main/draylar/tiered/mixin/PlayerEntityMixin.class new file mode 100644 index 00000000..6e362707 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/mixin/PlayerEntityMixin.class differ diff --git a/out/production/tiered.main/draylar/tiered/mixin/ServerPlayerEntityMixin.class b/out/production/tiered.main/draylar/tiered/mixin/ServerPlayerEntityMixin.class new file mode 100644 index 00000000..1622972e Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/mixin/ServerPlayerEntityMixin.class differ diff --git a/out/production/tiered.main/draylar/tiered/mixin/ServerResourceManagerMixin.class b/out/production/tiered.main/draylar/tiered/mixin/ServerResourceManagerMixin.class new file mode 100644 index 00000000..edca5a85 Binary files /dev/null and b/out/production/tiered.main/draylar/tiered/mixin/ServerResourceManagerMixin.class differ diff --git a/out/production/tiered.main/fabric.mod.json b/out/production/tiered.main/fabric.mod.json new file mode 100644 index 00000000..644a90f3 --- /dev/null +++ b/out/production/tiered.main/fabric.mod.json @@ -0,0 +1,33 @@ +{ + "schemaVersion": 1, + "id": "tiered", + "version": "${version}", + "name": "Tiered", + "description": "Adds tiers to tools.", + "authors": [ + "Draylar" + ], + "contact": { + "issues": "https://github.com/Draylar/tiered/issues", + "homepage": "https://www.curseforge.com/minecraft/mc-mods/tiered" + }, + "license": "CC0-1.0", + "icon": "assets/tiered/icon.png", + "environment": "*", + "entrypoints": { + "main": [ + "draylar.tiered.Tiered" + ], + "client": [ + "draylar.tiered.TieredClient" + ] + }, + "mixins": [ + "tiered.mixins.json" + ], + "depends": { + "fabricloader": ">=0.8.2+build.194", + "fabric": "*", + "minecraft": ">=1.16" + } +} diff --git a/out/production/tiered.main/tiered.mixins.json b/out/production/tiered.main/tiered.mixins.json new file mode 100644 index 00000000..83c65e52 --- /dev/null +++ b/out/production/tiered.main/tiered.mixins.json @@ -0,0 +1,18 @@ +{ + "required": true, + "package": "draylar.tiered.mixin", + "compatibilityLevel": "JAVA_8", + "mixins": [ + "ItemStackMixin", + "LivingEntityMixin", + "PlayerEntityMixin", + "ServerPlayerEntityMixin", + "ServerResourceManagerMixin" + ], + "client": [ + "ItemStackClientMixin" + ], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/src/main/java/draylar/tiered/Tiered.java b/src/main/java/draylar/tiered/Tiered.java index 94bc6435..cb24c499 100644 --- a/src/main/java/draylar/tiered/Tiered.java +++ b/src/main/java/draylar/tiered/Tiered.java @@ -73,9 +73,9 @@ public static Identifier id(String path) { private void setupModifierLabel() { ItemTooltipCallback.EVENT.register((stack, tooltipContext, lines) -> { // has tier - if(stack.getSubTag(NBT_SUBTAG_KEY) != null) { + if(stack.getSubNbt(NBT_SUBTAG_KEY) != null) { // get tier - Identifier tier = new Identifier(stack.getOrCreateSubTag(NBT_SUBTAG_KEY).getString(Tiered.NBT_SUBTAG_DATA_KEY)); + Identifier tier = new Identifier(stack.getOrCreateSubNbt(NBT_SUBTAG_KEY).getString(Tiered.NBT_SUBTAG_DATA_KEY)); // attempt to display attribute if it is valid PotentialAttribute potentialAttribute = Tiered.ATTRIBUTE_DATA_LOADER.getItemAttributes().get(tier); diff --git a/src/main/java/draylar/tiered/mixin/InventoryAccessor.java b/src/main/java/draylar/tiered/mixin/InventoryAccessor.java new file mode 100644 index 00000000..9076aba7 --- /dev/null +++ b/src/main/java/draylar/tiered/mixin/InventoryAccessor.java @@ -0,0 +1,13 @@ +package draylar.tiered.mixin; + +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; +import org.spongepowered.asm.mixin.gen.Invoker; + +@Mixin(PlayerEntity.class) +public interface InventoryAccessor { + @Accessor + PlayerInventory getInventory(); +} \ No newline at end of file diff --git a/src/main/java/draylar/tiered/mixin/ItemStackClientMixin.java b/src/main/java/draylar/tiered/mixin/ItemStackClientMixin.java index 577f95f0..ece0cefb 100644 --- a/src/main/java/draylar/tiered/mixin/ItemStackClientMixin.java +++ b/src/main/java/draylar/tiered/mixin/ItemStackClientMixin.java @@ -11,7 +11,7 @@ import net.minecraft.entity.attribute.EntityAttributeModifier; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtCompound; import net.minecraft.text.MutableText; import net.minecraft.text.Text; import net.minecraft.text.TranslatableText; @@ -34,11 +34,11 @@ @Mixin(ItemStack.class) public abstract class ItemStackClientMixin { - @Shadow public abstract CompoundTag getOrCreateSubTag(String key); + @Shadow public abstract NbtCompound getOrCreateSubTag(String key); @Shadow public abstract boolean hasTag(); - @Shadow public abstract CompoundTag getSubTag(String key); + @Shadow public abstract NbtCompound getSubTag(String key); private boolean isTiered = false; diff --git a/src/main/java/draylar/tiered/mixin/ItemStackMixin.java b/src/main/java/draylar/tiered/mixin/ItemStackMixin.java index c4acd5fc..64dfa673 100644 --- a/src/main/java/draylar/tiered/mixin/ItemStackMixin.java +++ b/src/main/java/draylar/tiered/mixin/ItemStackMixin.java @@ -9,7 +9,7 @@ import net.minecraft.entity.attribute.EntityAttributeModifier; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtCompound; import net.minecraft.util.Identifier; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -23,13 +23,13 @@ @Mixin(ItemStack.class) public abstract class ItemStackMixin { - @Shadow public abstract CompoundTag getOrCreateSubTag(String key); + @Shadow public abstract NbtCompound getOrCreateSubTag(String key); - @Shadow public abstract CompoundTag getTag(); + @Shadow public abstract NbtCompound getTag(); @Shadow public abstract boolean hasTag(); - @Shadow public abstract CompoundTag getSubTag(String key); + @Shadow public abstract NbtCompound getSubTag(String key); @Redirect( method = "getAttributeModifiers", diff --git a/src/main/java/draylar/tiered/mixin/ServerPlayerEntityMixin.java b/src/main/java/draylar/tiered/mixin/ServerPlayerEntityMixin.java index 849dda63..27284561 100644 --- a/src/main/java/draylar/tiered/mixin/ServerPlayerEntityMixin.java +++ b/src/main/java/draylar/tiered/mixin/ServerPlayerEntityMixin.java @@ -29,13 +29,15 @@ private ServerPlayerEntityMixin(World world, BlockPos pos, float yaw, GameProfil private void onTick(CallbackInfo ci) { // if main copy is null, set it to player inventory and check each stack if(mainCopy == null) { - mainCopy = copyDefaultedList(inventory.main); + mainCopy = copyDefaultedList(((InventoryAccessor)this).getInventory().main); + //mainCopy = copyDefaultedList(inventory.main); runCheck(); } // if main copy =/= inventory, run check and set mainCopy to inventory - if (!inventory.main.equals(mainCopy)) { - mainCopy = copyDefaultedList(inventory.main); + if (!((InventoryAccessor)this).getInventory().main.equals(mainCopy)) { + //if (!inventory.main.equals(mainCopy)) { + mainCopy = copyDefaultedList(((InventoryAccessor)this).getInventory().main); runCheck(); } } @@ -53,15 +55,15 @@ private DefaultedList copyDefaultedList(DefaultedList list @Unique private void runCheck() { - inventory.main.forEach(itemStack -> { + ((InventoryAccessor)this).getInventory().main.forEach(itemStack -> { // no tier on item - if(itemStack.getSubTag(Tiered.NBT_SUBTAG_KEY) == null) { + if(itemStack.getSubNbt(Tiered.NBT_SUBTAG_KEY) == null) { // attempt to get a random tier Identifier potentialAttributeID = ModifierUtils.getRandomAttributeIDFor(itemStack.getItem()); // found an ID if(potentialAttributeID != null) { - itemStack.getOrCreateSubTag(Tiered.NBT_SUBTAG_KEY).putString(Tiered.NBT_SUBTAG_DATA_KEY, potentialAttributeID.toString()); + itemStack.getOrCreateSubNbt(Tiered.NBT_SUBTAG_KEY).putString(Tiered.NBT_SUBTAG_DATA_KEY, potentialAttributeID.toString()); } } }); diff --git a/src/main/java/draylar/tiered/mixin/ServerResourceManagerMixin.java b/src/main/java/draylar/tiered/mixin/ServerResourceManagerMixin.java index 1c10e939..b335f488 100644 --- a/src/main/java/draylar/tiered/mixin/ServerResourceManagerMixin.java +++ b/src/main/java/draylar/tiered/mixin/ServerResourceManagerMixin.java @@ -18,6 +18,6 @@ public class ServerResourceManagerMixin { @Inject(at = @At("RETURN"), method = "") private void onInit(CommandManager.RegistrationEnvironment registrationEnvironment, int i, CallbackInfo ci) { - this.resourceManager.registerListener(Tiered.ATTRIBUTE_DATA_LOADER); + this.resourceManager.registerReloader(Tiered.ATTRIBUTE_DATA_LOADER); } }