diff --git a/build.gradle b/build.gradle index 6f912b7..c30a762 100644 --- a/build.gradle +++ b/build.gradle @@ -35,10 +35,9 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:16.0.777" - modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:16.0.777" - modApi "dev.architectury:architectury-fabric:13.0.8" - modApi "me.shedaniel.cloth:cloth-config-fabric:15.0.140" + modApi "me.shedaniel:RoughlyEnoughItems-fabric:17.0.807" + modApi "dev.architectury:architectury-fabric:14.0.4" + modApi "me.shedaniel.cloth:cloth-config-fabric:16.0.143" } processResources { diff --git a/gradle.properties b/gradle.properties index 7c4a477..c598d1e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,13 +4,13 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.21.1 -yarn_mappings=1.21.1+build.3 +minecraft_version=1.21.3 +yarn_mappings=1.21.3+build.2 loader_version=0.18.4 loom_version=1.15-SNAPSHOT # Fabric API -fabric_version=0.116.8+1.21.1 +fabric_version=0.114.1+1.21.3 # Mod Properties mod_version=2.0.0 diff --git a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/infernal_ashes.json b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/infernal_ashes.json index 9a9ce5d..960c064 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/infernal_ashes.json +++ b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/infernal_ashes.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:infernal_ashes" + "recipe": "minecraft:infernal_ashes" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:infernal_ashes" + "minecraft:infernal_ashes" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/prisma_steel.json b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/prisma_steel.json index 638978e..903997b 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/prisma_steel.json +++ b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/prisma_steel.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:prisma_steel" + "recipe": "minecraft:prisma_steel" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:prisma_steel" + "minecraft:prisma_steel" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/raw_endtropy.json b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/raw_endtropy.json index c950a58..d185151 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/raw_endtropy.json +++ b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/raw_endtropy.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:raw_endtropy" + "recipe": "minecraft:raw_endtropy" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:raw_endtropy" + "minecraft:raw_endtropy" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/raw_entropy.json b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/raw_entropy.json index 521e583..59a1d09 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/raw_entropy.json +++ b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/raw_entropy.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:raw_entropy" + "recipe": "minecraft:raw_entropy" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:raw_entropy" + "minecraft:raw_entropy" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/stable_endtropy.json b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/stable_endtropy.json index 7db5d2f..10cfb98 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/stable_endtropy.json +++ b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/stable_endtropy.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:stable_endtropy" + "recipe": "minecraft:stable_endtropy" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:stable_endtropy" + "minecraft:stable_endtropy" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/stable_entropy.json b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/stable_entropy.json index 645d1e8..76bd293 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/building_blocks/stable_entropy.json +++ b/src/main/generated/data/acesbs/advancement/recipes/building_blocks/stable_entropy.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:stable_entropy" + "recipe": "minecraft:stable_entropy" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:stable_entropy" + "minecraft:stable_entropy" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/decorations/infernal_ashes_block.json b/src/main/generated/data/acesbs/advancement/recipes/decorations/infernal_ashes_block.json index 74facd3..3a20bc2 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/decorations/infernal_ashes_block.json +++ b/src/main/generated/data/acesbs/advancement/recipes/decorations/infernal_ashes_block.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:infernal_ashes_block" + "recipe": "minecraft:infernal_ashes_block" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:infernal_ashes_block" + "minecraft:infernal_ashes_block" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/decorations/prisma_steel_block.json b/src/main/generated/data/acesbs/advancement/recipes/decorations/prisma_steel_block.json index 433de02..9fad1e6 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/decorations/prisma_steel_block.json +++ b/src/main/generated/data/acesbs/advancement/recipes/decorations/prisma_steel_block.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:prisma_steel_block" + "recipe": "minecraft:prisma_steel_block" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:prisma_steel_block" + "minecraft:prisma_steel_block" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/decorations/raw_endtropy_block.json b/src/main/generated/data/acesbs/advancement/recipes/decorations/raw_endtropy_block.json index 9b1083e..84ed67d 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/decorations/raw_endtropy_block.json +++ b/src/main/generated/data/acesbs/advancement/recipes/decorations/raw_endtropy_block.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:raw_endtropy_block" + "recipe": "minecraft:raw_endtropy_block" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:raw_endtropy_block" + "minecraft:raw_endtropy_block" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/decorations/raw_entropy_block.json b/src/main/generated/data/acesbs/advancement/recipes/decorations/raw_entropy_block.json index abac3d0..6c8ccd7 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/decorations/raw_entropy_block.json +++ b/src/main/generated/data/acesbs/advancement/recipes/decorations/raw_entropy_block.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:raw_entropy_block" + "recipe": "minecraft:raw_entropy_block" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:raw_entropy_block" + "minecraft:raw_entropy_block" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/decorations/stable_endtropy_block.json b/src/main/generated/data/acesbs/advancement/recipes/decorations/stable_endtropy_block.json index 12bdd8f..fedf39a 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/decorations/stable_endtropy_block.json +++ b/src/main/generated/data/acesbs/advancement/recipes/decorations/stable_endtropy_block.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:stable_endtropy_block" + "recipe": "minecraft:stable_endtropy_block" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:stable_endtropy_block" + "minecraft:stable_endtropy_block" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/decorations/stable_entropy_block.json b/src/main/generated/data/acesbs/advancement/recipes/decorations/stable_entropy_block.json index dbfe2b3..ff7448f 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/decorations/stable_entropy_block.json +++ b/src/main/generated/data/acesbs/advancement/recipes/decorations/stable_entropy_block.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:stable_entropy_block" + "recipe": "minecraft:stable_entropy_block" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:stable_entropy_block" + "minecraft:stable_entropy_block" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_campfire_cooking.json b/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_campfire_cooking.json index 097734e..ea2dd6c 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_campfire_cooking.json +++ b/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_campfire_cooking.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:cooked_lemon_from_campfire_cooking" + "recipe": "minecraft:cooked_lemon_from_campfire_cooking" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:cooked_lemon_from_campfire_cooking" + "minecraft:cooked_lemon_from_campfire_cooking" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_smelting.json b/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_smelting.json index 585ecd5..87a014a 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_smelting.json +++ b/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_smelting.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:cooked_lemon_from_smelting" + "recipe": "minecraft:cooked_lemon_from_smelting" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:cooked_lemon_from_smelting" + "minecraft:cooked_lemon_from_smelting" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_smoking.json b/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_smoking.json index 9c1b240..af3104b 100644 --- a/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_smoking.json +++ b/src/main/generated/data/acesbs/advancement/recipes/food/cooked_lemon_from_smoking.json @@ -13,7 +13,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "acesbs:cooked_lemon_from_smoking" + "recipe": "minecraft:cooked_lemon_from_smoking" }, "trigger": "minecraft:recipe_unlocked" } @@ -26,7 +26,7 @@ ], "rewards": { "recipes": [ - "acesbs:cooked_lemon_from_smoking" + "minecraft:cooked_lemon_from_smoking" ] } } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/loot_table/blocks/deepslate_entropy_ore.json b/src/main/generated/data/acesbs/loot_table/blocks/deepslate_entropy_ore.json index 770c027..485bfdc 100644 --- a/src/main/generated/data/acesbs/loot_table/blocks/deepslate_entropy_ore.json +++ b/src/main/generated/data/acesbs/loot_table/blocks/deepslate_entropy_ore.json @@ -36,6 +36,10 @@ { "bonus_rolls": 0.0, "conditions": [ + { + "chance": 0.1, + "condition": "minecraft:random_chance" + }, { "condition": "minecraft:inverted", "term": { @@ -65,11 +69,6 @@ } ], "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:air", - "weight": 360 - }, { "type": "minecraft:item", "name": "minecraft:coal", @@ -123,11 +122,7 @@ "function": "minecraft:explosion_decay" } ], - "rolls": { - "type": "minecraft:uniform", - "max": 3.0, - "min": 1.0 - } + "rolls": 1.0 }, { "bonus_rolls": 0.0, @@ -149,18 +144,6 @@ } } } - }, - { - "condition": "minecraft:inverted", - "term": { - "condition": "minecraft:match_tool", - "predicate": { - "items": [ - "acesbs:prisma_steel_pickaxe", - "acesbs:prisma_steel_hammer" - ] - } - } } ], "entries": [ diff --git a/src/main/generated/data/acesbs/loot_table/blocks/endtropy_ore.json b/src/main/generated/data/acesbs/loot_table/blocks/endtropy_ore.json index 54af59a..2370cb3 100644 --- a/src/main/generated/data/acesbs/loot_table/blocks/endtropy_ore.json +++ b/src/main/generated/data/acesbs/loot_table/blocks/endtropy_ore.json @@ -36,6 +36,10 @@ { "bonus_rolls": 0.0, "conditions": [ + { + "chance": 0.1, + "condition": "minecraft:random_chance" + }, { "condition": "minecraft:inverted", "term": { @@ -65,11 +69,6 @@ } ], "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:air", - "weight": 360 - }, { "type": "minecraft:item", "name": "minecraft:coal", @@ -123,11 +122,7 @@ "function": "minecraft:explosion_decay" } ], - "rolls": { - "type": "minecraft:uniform", - "max": 3.0, - "min": 1.0 - } + "rolls": 1.0 }, { "bonus_rolls": 0.0, @@ -149,18 +144,6 @@ } } } - }, - { - "condition": "minecraft:inverted", - "term": { - "condition": "minecraft:match_tool", - "predicate": { - "items": [ - "acesbs:prisma_steel_pickaxe", - "acesbs:prisma_steel_hammer" - ] - } - } } ], "entries": [ diff --git a/src/main/generated/data/acesbs/loot_table/blocks/entropy_ore.json b/src/main/generated/data/acesbs/loot_table/blocks/entropy_ore.json index c39682b..ef50a3c 100644 --- a/src/main/generated/data/acesbs/loot_table/blocks/entropy_ore.json +++ b/src/main/generated/data/acesbs/loot_table/blocks/entropy_ore.json @@ -36,6 +36,10 @@ { "bonus_rolls": 0.0, "conditions": [ + { + "chance": 0.1, + "condition": "minecraft:random_chance" + }, { "condition": "minecraft:inverted", "term": { @@ -65,11 +69,6 @@ } ], "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:air", - "weight": 360 - }, { "type": "minecraft:item", "name": "minecraft:coal", @@ -123,11 +122,7 @@ "function": "minecraft:explosion_decay" } ], - "rolls": { - "type": "minecraft:uniform", - "max": 3.0, - "min": 1.0 - } + "rolls": 1.0 }, { "bonus_rolls": 0.0, @@ -149,18 +144,6 @@ } } } - }, - { - "condition": "minecraft:inverted", - "term": { - "condition": "minecraft:match_tool", - "predicate": { - "items": [ - "acesbs:prisma_steel_pickaxe", - "acesbs:prisma_steel_hammer" - ] - } - } } ], "entries": [ diff --git a/src/main/generated/data/acesbs/loot_table/blocks/infernal_ashes_ore.json b/src/main/generated/data/acesbs/loot_table/blocks/infernal_ashes_ore.json index 6b46ec4..d613c65 100644 --- a/src/main/generated/data/acesbs/loot_table/blocks/infernal_ashes_ore.json +++ b/src/main/generated/data/acesbs/loot_table/blocks/infernal_ashes_ore.json @@ -36,6 +36,10 @@ { "bonus_rolls": 0.0, "conditions": [ + { + "chance": 0.1, + "condition": "minecraft:random_chance" + }, { "condition": "minecraft:inverted", "term": { @@ -65,11 +69,6 @@ } ], "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:air", - "weight": 360 - }, { "type": "minecraft:item", "name": "minecraft:coal", @@ -123,11 +122,7 @@ "function": "minecraft:explosion_decay" } ], - "rolls": { - "type": "minecraft:uniform", - "max": 3.0, - "min": 1.0 - } + "rolls": 1.0 }, { "bonus_rolls": 0.0, @@ -149,18 +144,6 @@ } } } - }, - { - "condition": "minecraft:inverted", - "term": { - "condition": "minecraft:match_tool", - "predicate": { - "items": [ - "acesbs:prisma_steel_pickaxe", - "acesbs:prisma_steel_hammer" - ] - } - } } ], "entries": [ diff --git a/src/main/generated/data/acesbs/recipe/ashen.json b/src/main/generated/data/acesbs/recipe/ashen.json index 788482e..c81c0f5 100644 --- a/src/main/generated/data/acesbs/recipe/ashen.json +++ b/src/main/generated/data/acesbs/recipe/ashen.json @@ -1,12 +1,6 @@ { "type": "minecraft:smithing_trim", - "addition": { - "tag": "minecraft:trim_materials" - }, - "base": { - "tag": "minecraft:trimmable_armor" - }, - "template": { - "item": "acesbs:ashen_armor_trim_smithing_template" - } + "addition": "#minecraft:trim_materials", + "base": "#minecraft:trimmable_armor", + "template": "acesbs:ashen_armor_trim_smithing_template" } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/recipe/ashen_steel_boots.json b/src/main/generated/data/acesbs/recipe/ashen_steel_boots.json index 844deb1..6f1b310 100644 --- a/src/main/generated/data/acesbs/recipe/ashen_steel_boots.json +++ b/src/main/generated/data/acesbs/recipe/ashen_steel_boots.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - } + "#": "acesbs:ashen_steel" }, "pattern": [ " ", diff --git a/src/main/generated/data/acesbs/recipe/ashen_steel_chestplate.json b/src/main/generated/data/acesbs/recipe/ashen_steel_chestplate.json index 9db23ee..0c75277 100644 --- a/src/main/generated/data/acesbs/recipe/ashen_steel_chestplate.json +++ b/src/main/generated/data/acesbs/recipe/ashen_steel_chestplate.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - } + "#": "acesbs:ashen_steel" }, "pattern": [ "# #", diff --git a/src/main/generated/data/acesbs/recipe/ashen_steel_hammer.json b/src/main/generated/data/acesbs/recipe/ashen_steel_hammer.json index 52a9671..17bf95d 100644 --- a/src/main/generated/data/acesbs/recipe/ashen_steel_hammer.json +++ b/src/main/generated/data/acesbs/recipe/ashen_steel_hammer.json @@ -2,15 +2,9 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - }, - "B": { - "item": "acesbs:ashen_steel_block" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:ashen_steel", + "B": "acesbs:ashen_steel_block", + "I": "minecraft:stick" }, "pattern": [ "B#B", diff --git a/src/main/generated/data/acesbs/recipe/ashen_steel_helmet.json b/src/main/generated/data/acesbs/recipe/ashen_steel_helmet.json index d4c2246..4d9ddd8 100644 --- a/src/main/generated/data/acesbs/recipe/ashen_steel_helmet.json +++ b/src/main/generated/data/acesbs/recipe/ashen_steel_helmet.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - } + "#": "acesbs:ashen_steel" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/ashen_steel_leggings.json b/src/main/generated/data/acesbs/recipe/ashen_steel_leggings.json index 9bca381..a99b9ea 100644 --- a/src/main/generated/data/acesbs/recipe/ashen_steel_leggings.json +++ b/src/main/generated/data/acesbs/recipe/ashen_steel_leggings.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - } + "#": "acesbs:ashen_steel" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/ashen_steel_pickaxe.json b/src/main/generated/data/acesbs/recipe/ashen_steel_pickaxe.json index 29afce2..08fd784 100644 --- a/src/main/generated/data/acesbs/recipe/ashen_steel_pickaxe.json +++ b/src/main/generated/data/acesbs/recipe/ashen_steel_pickaxe.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:ashen_steel", + "I": "minecraft:stick" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/ashen_steel_shovel.json b/src/main/generated/data/acesbs/recipe/ashen_steel_shovel.json index f06e655..b301649 100644 --- a/src/main/generated/data/acesbs/recipe/ashen_steel_shovel.json +++ b/src/main/generated/data/acesbs/recipe/ashen_steel_shovel.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:ashen_steel", + "I": "minecraft:stick" }, "pattern": [ " # ", diff --git a/src/main/generated/data/acesbs/recipe/ashen_steel_sword.json b/src/main/generated/data/acesbs/recipe/ashen_steel_sword.json index 513f907..b140f74 100644 --- a/src/main/generated/data/acesbs/recipe/ashen_steel_sword.json +++ b/src/main/generated/data/acesbs/recipe/ashen_steel_sword.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:ashen_steel", + "I": "minecraft:stick" }, "pattern": [ " # ", diff --git a/src/main/generated/data/acesbs/recipe/bricked_up.json b/src/main/generated/data/acesbs/recipe/bricked_up.json index 6e2a6e0..a2cbfbe 100644 --- a/src/main/generated/data/acesbs/recipe/bricked_up.json +++ b/src/main/generated/data/acesbs/recipe/bricked_up.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shapeless", "category": "misc", "ingredients": [ - { - "item": "minecraft:brick" - }, - { - "item": "acesbs:stable_endtropy" - } + "minecraft:brick", + "acesbs:stable_endtropy" ], "result": { "count": 1, diff --git a/src/main/generated/data/acesbs/recipe/bubble_pipe.json b/src/main/generated/data/acesbs/recipe/bubble_pipe.json index 1469bf8..3c07bde 100644 --- a/src/main/generated/data/acesbs/recipe/bubble_pipe.json +++ b/src/main/generated/data/acesbs/recipe/bubble_pipe.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "minecraft:iron_ingot" - }, - "P": { - "item": "minecraft:birch_planks" - } + "#": "minecraft:iron_ingot", + "P": "minecraft:birch_planks" }, "pattern": [ " #", diff --git a/src/main/generated/data/acesbs/recipe/cigarette.json b/src/main/generated/data/acesbs/recipe/cigarette.json index 754c762..6a58828 100644 --- a/src/main/generated/data/acesbs/recipe/cigarette.json +++ b/src/main/generated/data/acesbs/recipe/cigarette.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shapeless", "category": "misc", "ingredients": [ - { - "item": "minecraft:paper" - }, - { - "item": "acesbs:tobacco" - } + "minecraft:paper", + "acesbs:tobacco" ], "result": { "count": 1, diff --git a/src/main/generated/data/acesbs/recipe/cigarette_funny.json b/src/main/generated/data/acesbs/recipe/cigarette_funny.json index 6797030..8f7bdda 100644 --- a/src/main/generated/data/acesbs/recipe/cigarette_funny.json +++ b/src/main/generated/data/acesbs/recipe/cigarette_funny.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shapeless", "category": "misc", "ingredients": [ - { - "item": "acesbs:cigarette" - }, - { - "item": "acesbs:infernal_ashes" - } + "acesbs:cigarette", + "acesbs:infernal_ashes" ], "result": { "count": 1, diff --git a/src/main/generated/data/acesbs/recipe/cigarette_lemon.json b/src/main/generated/data/acesbs/recipe/cigarette_lemon.json index 9abacab..2da2085 100644 --- a/src/main/generated/data/acesbs/recipe/cigarette_lemon.json +++ b/src/main/generated/data/acesbs/recipe/cigarette_lemon.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shapeless", "category": "misc", "ingredients": [ - { - "item": "acesbs:cigarette" - }, - { - "item": "acesbs:combustible_lemon" - } + "acesbs:cigarette", + "acesbs:combustible_lemon" ], "result": { "count": 1, diff --git a/src/main/generated/data/acesbs/recipe/combustible_lemon.json b/src/main/generated/data/acesbs/recipe/combustible_lemon.json index a538861..b04baf9 100644 --- a/src/main/generated/data/acesbs/recipe/combustible_lemon.json +++ b/src/main/generated/data/acesbs/recipe/combustible_lemon.json @@ -2,15 +2,9 @@ "type": "minecraft:crafting_shapeless", "category": "equipment", "ingredients": [ - { - "item": "acesbs:lemon" - }, - { - "item": "minecraft:fire_charge" - }, - { - "item": "minecraft:gunpowder" - } + "acesbs:lemon", + "minecraft:fire_charge", + "minecraft:gunpowder" ], "result": { "count": 1, diff --git a/src/main/generated/data/acesbs/recipe/cooked_lemon_from_campfire_cooking.json b/src/main/generated/data/acesbs/recipe/cooked_lemon_from_campfire_cooking.json index c52a5f0..70639ab 100644 --- a/src/main/generated/data/acesbs/recipe/cooked_lemon_from_campfire_cooking.json +++ b/src/main/generated/data/acesbs/recipe/cooked_lemon_from_campfire_cooking.json @@ -3,9 +3,7 @@ "category": "food", "cookingtime": 600, "experience": 0.35, - "ingredient": { - "item": "acesbs:lemon" - }, + "ingredient": "acesbs:lemon", "result": { "id": "acesbs:cooked_lemon" } diff --git a/src/main/generated/data/acesbs/recipe/cooked_lemon_from_smelting.json b/src/main/generated/data/acesbs/recipe/cooked_lemon_from_smelting.json index 1aa5f67..6ae05e5 100644 --- a/src/main/generated/data/acesbs/recipe/cooked_lemon_from_smelting.json +++ b/src/main/generated/data/acesbs/recipe/cooked_lemon_from_smelting.json @@ -3,9 +3,7 @@ "category": "food", "cookingtime": 200, "experience": 0.35, - "ingredient": { - "item": "acesbs:lemon" - }, + "ingredient": "acesbs:lemon", "result": { "id": "acesbs:cooked_lemon" } diff --git a/src/main/generated/data/acesbs/recipe/cooked_lemon_from_smoking.json b/src/main/generated/data/acesbs/recipe/cooked_lemon_from_smoking.json index f6451d3..e6565bb 100644 --- a/src/main/generated/data/acesbs/recipe/cooked_lemon_from_smoking.json +++ b/src/main/generated/data/acesbs/recipe/cooked_lemon_from_smoking.json @@ -3,9 +3,7 @@ "category": "food", "cookingtime": 100, "experience": 0.35, - "ingredient": { - "item": "acesbs:lemon" - }, + "ingredient": "acesbs:lemon", "result": { "id": "acesbs:cooked_lemon" } diff --git a/src/main/generated/data/acesbs/recipe/crystal_entropy_from_stable_and_glass.json b/src/main/generated/data/acesbs/recipe/crystal_entropy_from_stable_and_glass.json index 9b984bb..df37ba5 100644 --- a/src/main/generated/data/acesbs/recipe/crystal_entropy_from_stable_and_glass.json +++ b/src/main/generated/data/acesbs/recipe/crystal_entropy_from_stable_and_glass.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "minecraft:glass" - }, - "S": { - "item": "acesbs:stable_entropy" - } + "#": "minecraft:glass", + "S": "acesbs:stable_entropy" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/crystal_entropy_pane.json b/src/main/generated/data/acesbs/recipe/crystal_entropy_pane.json index 1382422..7cbcfa8 100644 --- a/src/main/generated/data/acesbs/recipe/crystal_entropy_pane.json +++ b/src/main/generated/data/acesbs/recipe/crystal_entropy_pane.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "acesbs:crystal_entropy" - } + "#": "acesbs:crystal_entropy" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/entropic_entangler.json b/src/main/generated/data/acesbs/recipe/entropic_entangler.json index 7ad66c2..2cbb9e4 100644 --- a/src/main/generated/data/acesbs/recipe/entropic_entangler.json +++ b/src/main/generated/data/acesbs/recipe/entropic_entangler.json @@ -2,18 +2,10 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "B": { - "item": "minecraft:bucket" - }, - "G": { - "item": "minecraft:gold_block" - }, - "I": { - "item": "minecraft:iron_ingot" - }, - "S": { - "item": "acesbs:stable_entropy" - } + "B": "minecraft:bucket", + "G": "minecraft:gold_block", + "I": "minecraft:iron_ingot", + "S": "acesbs:stable_entropy" }, "pattern": [ "ISI", diff --git a/src/main/generated/data/acesbs/recipe/entropic_eviscerator.json b/src/main/generated/data/acesbs/recipe/entropic_eviscerator.json index a3ffd3c..4749c42 100644 --- a/src/main/generated/data/acesbs/recipe/entropic_eviscerator.json +++ b/src/main/generated/data/acesbs/recipe/entropic_eviscerator.json @@ -2,15 +2,9 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "E": { - "item": "acesbs:stable_entropy" - }, - "I": { - "item": "minecraft:iron_ingot" - }, - "S": { - "item": "minecraft:stonecutter" - } + "E": "acesbs:stable_entropy", + "I": "minecraft:iron_ingot", + "S": "minecraft:stonecutter" }, "pattern": [ "III", diff --git a/src/main/generated/data/acesbs/recipe/entropic_stabilizer.json b/src/main/generated/data/acesbs/recipe/entropic_stabilizer.json index e9750a4..d42bcbd 100644 --- a/src/main/generated/data/acesbs/recipe/entropic_stabilizer.json +++ b/src/main/generated/data/acesbs/recipe/entropic_stabilizer.json @@ -2,15 +2,9 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "B": { - "item": "minecraft:blue_ice" - }, - "I": { - "item": "minecraft:iron_ingot" - }, - "R": { - "item": "acesbs:raw_entropy" - } + "B": "minecraft:blue_ice", + "I": "minecraft:iron_ingot", + "R": "acesbs:raw_entropy" }, "pattern": [ "IRI", diff --git a/src/main/generated/data/acesbs/recipe/infernal_ashes.json b/src/main/generated/data/acesbs/recipe/infernal_ashes.json index 48865d2..652ff8a 100644 --- a/src/main/generated/data/acesbs/recipe/infernal_ashes.json +++ b/src/main/generated/data/acesbs/recipe/infernal_ashes.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:infernal_ashes_block" - } + "acesbs:infernal_ashes_block" ], "result": { "count": 9, diff --git a/src/main/generated/data/acesbs/recipe/infernal_ashes_block.json b/src/main/generated/data/acesbs/recipe/infernal_ashes_block.json index 0dedcef..4363395 100644 --- a/src/main/generated/data/acesbs/recipe/infernal_ashes_block.json +++ b/src/main/generated/data/acesbs/recipe/infernal_ashes_block.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "acesbs:infernal_ashes" - } + "#": "acesbs:infernal_ashes" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_axe.left.json b/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_axe.left.json index e98e5e9..18b7cd9 100644 --- a/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_axe.left.json +++ b/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_axe.left.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:ashen_steel", + "I": "minecraft:stick" }, "pattern": [ "## ", diff --git a/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_axe.right.json b/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_axe.right.json index 28a9bf7..722fffa 100644 --- a/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_axe.right.json +++ b/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_axe.right.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:ashen_steel", + "I": "minecraft:stick" }, "pattern": [ " ##", diff --git a/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_hoe.left.json b/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_hoe.left.json index 8ace9ce..9428d4e 100644 --- a/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_hoe.left.json +++ b/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_hoe.left.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:ashen_steel", + "I": "minecraft:stick" }, "pattern": [ "## ", diff --git a/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_hoe.right.json b/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_hoe.right.json index e41f32c..f7cd610 100644 --- a/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_hoe.right.json +++ b/src/main/generated/data/acesbs/recipe/item.acesbs.ashen_steel_hoe.right.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:ashen_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:ashen_steel", + "I": "minecraft:stick" }, "pattern": [ " ##", diff --git a/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_axe.left.json b/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_axe.left.json index 8db82a7..af31e84 100644 --- a/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_axe.left.json +++ b/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_axe.left.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:prisma_steel", + "I": "minecraft:stick" }, "pattern": [ "## ", diff --git a/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_axe.right.json b/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_axe.right.json index 49f20b7..12c7402 100644 --- a/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_axe.right.json +++ b/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_axe.right.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:prisma_steel", + "I": "minecraft:stick" }, "pattern": [ " ##", diff --git a/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_hoe.left.json b/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_hoe.left.json index 3f450ad..a9e4671 100644 --- a/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_hoe.left.json +++ b/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_hoe.left.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:prisma_steel", + "I": "minecraft:stick" }, "pattern": [ "## ", diff --git a/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_hoe.right.json b/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_hoe.right.json index 20f39fa..7799c2c 100644 --- a/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_hoe.right.json +++ b/src/main/generated/data/acesbs/recipe/item.acesbs.prisma_steel_hoe.right.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:prisma_steel", + "I": "minecraft:stick" }, "pattern": [ " ##", diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_button.json b/src/main/generated/data/acesbs/recipe/lemonwood_button.json index 467663e..357fa02 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_button.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_button.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "redstone", "ingredients": [ - { - "item": "acesbs:lemonwood_planks" - } + "acesbs:lemonwood_planks" ], "result": { "count": 1, diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_door.json b/src/main/generated/data/acesbs/recipe/lemonwood_door.json index ddee166..c0e2cce 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_door.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_door.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "redstone", "key": { - "#": { - "item": "acesbs:lemonwood_planks" - } + "#": "acesbs:lemonwood_planks" }, "pattern": [ "##", diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_fence.json b/src/main/generated/data/acesbs/recipe/lemonwood_fence.json index bdfa695..c28511e 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_fence.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_fence.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "minecraft:stick" - }, - "W": { - "item": "acesbs:lemonwood_planks" - } + "#": "minecraft:stick", + "W": "acesbs:lemonwood_planks" }, "pattern": [ "W#W", diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_fence_gate.json b/src/main/generated/data/acesbs/recipe/lemonwood_fence_gate.json index a3a036a..f8dff32 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_fence_gate.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_fence_gate.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "redstone", "key": { - "#": { - "item": "minecraft:stick" - }, - "W": { - "item": "acesbs:lemonwood_planks" - } + "#": "minecraft:stick", + "W": "acesbs:lemonwood_planks" }, "pattern": [ "#W#", diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_lemonwood_log.json b/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_lemonwood_log.json index ab7b4a1..cc13a71 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_lemonwood_log.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_lemonwood_log.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:lemonwood_log" - } + "acesbs:lemonwood_log" ], "result": { "count": 4, diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_lemonwood_wood.json b/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_lemonwood_wood.json index 7010767..302608d 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_lemonwood_wood.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_lemonwood_wood.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:lemonwood_wood" - } + "acesbs:lemonwood_wood" ], "result": { "count": 4, diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_stripped_lemonwood_log.json b/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_stripped_lemonwood_log.json index f990c12..7ef70cb 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_stripped_lemonwood_log.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_stripped_lemonwood_log.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:stripped_lemonwood_log" - } + "acesbs:stripped_lemonwood_log" ], "result": { "count": 4, diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_stripped_lemonwood_wood.json b/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_stripped_lemonwood_wood.json index 6ecce71..1e566fd 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_stripped_lemonwood_wood.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_planks_from_stripped_lemonwood_wood.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:stripped_lemonwood_wood" - } + "acesbs:stripped_lemonwood_wood" ], "result": { "count": 4, diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_pressure_plate.json b/src/main/generated/data/acesbs/recipe/lemonwood_pressure_plate.json index 8bc322f..e1afd99 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_pressure_plate.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_pressure_plate.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "redstone", "key": { - "#": { - "item": "acesbs:lemonwood_planks" - } + "#": "acesbs:lemonwood_planks" }, "pattern": [ "##" diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_sapling.json b/src/main/generated/data/acesbs/recipe/lemonwood_sapling.json index a5737f3..bc9726f 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_sapling.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_sapling.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shapeless", "category": "misc", "ingredients": [ - { - "item": "minecraft:birch_sapling" - }, - { - "item": "acesbs:lemon" - } + "minecraft:birch_sapling", + "acesbs:lemon" ], "result": { "count": 1, diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_slab.json b/src/main/generated/data/acesbs/recipe/lemonwood_slab.json index 45cc501..ebf42df 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_slab.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_slab.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "building", "key": { - "#": { - "item": "acesbs:lemonwood_planks" - } + "#": "acesbs:lemonwood_planks" }, "pattern": [ "###" diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_stairs.json b/src/main/generated/data/acesbs/recipe/lemonwood_stairs.json index 13d8270..fc03682 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_stairs.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_stairs.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "building", "key": { - "#": { - "item": "acesbs:lemonwood_planks" - } + "#": "acesbs:lemonwood_planks" }, "pattern": [ "# ", diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_trapdoor.json b/src/main/generated/data/acesbs/recipe/lemonwood_trapdoor.json index b0ad671..dea6f42 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_trapdoor.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_trapdoor.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "redstone", "key": { - "#": { - "item": "acesbs:lemonwood_planks" - } + "#": "acesbs:lemonwood_planks" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_wall.json b/src/main/generated/data/acesbs/recipe/lemonwood_wall.json index 35ede32..19e9d43 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_wall.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_wall.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "building", "key": { - "#": { - "item": "acesbs:lemonwood_planks" - } + "#": "acesbs:lemonwood_planks" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/lemonwood_wood.json b/src/main/generated/data/acesbs/recipe/lemonwood_wood.json index 2c821b4..f0940db 100644 --- a/src/main/generated/data/acesbs/recipe/lemonwood_wood.json +++ b/src/main/generated/data/acesbs/recipe/lemonwood_wood.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "building", "key": { - "#": { - "item": "acesbs:lemonwood_log" - } + "#": "acesbs:lemonwood_log" }, "pattern": [ "## ", diff --git a/src/main/generated/data/acesbs/recipe/lizard_button.json b/src/main/generated/data/acesbs/recipe/lizard_button.json index ea2196e..1d1f36c 100644 --- a/src/main/generated/data/acesbs/recipe/lizard_button.json +++ b/src/main/generated/data/acesbs/recipe/lizard_button.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "redstone", "ingredients": [ - { - "item": "acesbs:lizard_planks" - } + "acesbs:lizard_planks" ], "result": { "count": 1, diff --git a/src/main/generated/data/acesbs/recipe/lizard_planks.json b/src/main/generated/data/acesbs/recipe/lizard_planks.json index 64d154b..4e53c81 100644 --- a/src/main/generated/data/acesbs/recipe/lizard_planks.json +++ b/src/main/generated/data/acesbs/recipe/lizard_planks.json @@ -2,24 +2,12 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "minecraft:birch_planks" - }, - { - "item": "minecraft:birch_planks" - }, - { - "item": "minecraft:birch_planks" - }, - { - "item": "minecraft:birch_planks" - }, - { - "item": "acesbs:raw_entropy" - }, - { - "item": "minecraft:green_dye" - } + "minecraft:birch_planks", + "minecraft:birch_planks", + "minecraft:birch_planks", + "minecraft:birch_planks", + "acesbs:raw_entropy", + "minecraft:green_dye" ], "result": { "count": 4, diff --git a/src/main/generated/data/acesbs/recipe/oracle_lemon.json b/src/main/generated/data/acesbs/recipe/oracle_lemon.json index 7256314..1c5cbad 100644 --- a/src/main/generated/data/acesbs/recipe/oracle_lemon.json +++ b/src/main/generated/data/acesbs/recipe/oracle_lemon.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:stable_entropy" - }, - "L": { - "item": "acesbs:lemon" - } + "#": "acesbs:stable_entropy", + "L": "acesbs:lemon" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/prisma.json b/src/main/generated/data/acesbs/recipe/prisma.json index c98ffa7..d54c010 100644 --- a/src/main/generated/data/acesbs/recipe/prisma.json +++ b/src/main/generated/data/acesbs/recipe/prisma.json @@ -1,12 +1,6 @@ { "type": "minecraft:smithing_trim", - "addition": { - "tag": "minecraft:trim_materials" - }, - "base": { - "tag": "minecraft:trimmable_armor" - }, - "template": { - "item": "acesbs:prisma_armor_trim_smithing_template" - } + "addition": "#minecraft:trim_materials", + "base": "#minecraft:trimmable_armor", + "template": "acesbs:prisma_armor_trim_smithing_template" } \ No newline at end of file diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel.json b/src/main/generated/data/acesbs/recipe/prisma_steel.json index 62fb9da..b95cfa9 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:prisma_steel_block" - } + "acesbs:prisma_steel_block" ], "result": { "count": 9, diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_block.json b/src/main/generated/data/acesbs/recipe/prisma_steel_block.json index 43456da..314dcc0 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_block.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_block.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "acesbs:prisma_steel" - } + "#": "acesbs:prisma_steel" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_boots.json b/src/main/generated/data/acesbs/recipe/prisma_steel_boots.json index df9498b..813175f 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_boots.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_boots.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - } + "#": "acesbs:prisma_steel" }, "pattern": [ " ", diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_chestplate.json b/src/main/generated/data/acesbs/recipe/prisma_steel_chestplate.json index e2b1a18..c3ee026 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_chestplate.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_chestplate.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - } + "#": "acesbs:prisma_steel" }, "pattern": [ "# #", diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_hammer.json b/src/main/generated/data/acesbs/recipe/prisma_steel_hammer.json index b5ce22b..26c088e 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_hammer.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_hammer.json @@ -2,15 +2,9 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - }, - "B": { - "item": "acesbs:prisma_steel_block" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:prisma_steel", + "B": "acesbs:prisma_steel_block", + "I": "minecraft:stick" }, "pattern": [ "B#B", diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_helmet.json b/src/main/generated/data/acesbs/recipe/prisma_steel_helmet.json index e46b343..15c1131 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_helmet.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_helmet.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - } + "#": "acesbs:prisma_steel" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_leggings.json b/src/main/generated/data/acesbs/recipe/prisma_steel_leggings.json index e63f4fd..2b8a717 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_leggings.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_leggings.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - } + "#": "acesbs:prisma_steel" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_pickaxe.json b/src/main/generated/data/acesbs/recipe/prisma_steel_pickaxe.json index 3d98c18..6f51c22 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_pickaxe.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_pickaxe.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:prisma_steel", + "I": "minecraft:stick" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_shovel.json b/src/main/generated/data/acesbs/recipe/prisma_steel_shovel.json index b2fcc89..6610390 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_shovel.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_shovel.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:prisma_steel", + "I": "minecraft:stick" }, "pattern": [ " # ", diff --git a/src/main/generated/data/acesbs/recipe/prisma_steel_sword.json b/src/main/generated/data/acesbs/recipe/prisma_steel_sword.json index 9468a99..8eddf94 100644 --- a/src/main/generated/data/acesbs/recipe/prisma_steel_sword.json +++ b/src/main/generated/data/acesbs/recipe/prisma_steel_sword.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "#": { - "item": "acesbs:prisma_steel" - }, - "I": { - "item": "minecraft:stick" - } + "#": "acesbs:prisma_steel", + "I": "minecraft:stick" }, "pattern": [ " # ", diff --git a/src/main/generated/data/acesbs/recipe/raw_endtropy.json b/src/main/generated/data/acesbs/recipe/raw_endtropy.json index d3c37ce..2b949c7 100644 --- a/src/main/generated/data/acesbs/recipe/raw_endtropy.json +++ b/src/main/generated/data/acesbs/recipe/raw_endtropy.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:raw_endtropy_block" - } + "acesbs:raw_endtropy_block" ], "result": { "count": 9, diff --git a/src/main/generated/data/acesbs/recipe/raw_endtropy_block.json b/src/main/generated/data/acesbs/recipe/raw_endtropy_block.json index f501980..f9ee62c 100644 --- a/src/main/generated/data/acesbs/recipe/raw_endtropy_block.json +++ b/src/main/generated/data/acesbs/recipe/raw_endtropy_block.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "acesbs:raw_endtropy" - } + "#": "acesbs:raw_endtropy" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/raw_entropy.json b/src/main/generated/data/acesbs/recipe/raw_entropy.json index 5428544..185c1a1 100644 --- a/src/main/generated/data/acesbs/recipe/raw_entropy.json +++ b/src/main/generated/data/acesbs/recipe/raw_entropy.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:raw_entropy_block" - } + "acesbs:raw_entropy_block" ], "result": { "count": 9, diff --git a/src/main/generated/data/acesbs/recipe/raw_entropy_block.json b/src/main/generated/data/acesbs/recipe/raw_entropy_block.json index 5e2a299..165675c 100644 --- a/src/main/generated/data/acesbs/recipe/raw_entropy_block.json +++ b/src/main/generated/data/acesbs/recipe/raw_entropy_block.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "acesbs:raw_entropy" - } + "#": "acesbs:raw_entropy" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/stable_endtropy.json b/src/main/generated/data/acesbs/recipe/stable_endtropy.json index 87d6161..3242ecd 100644 --- a/src/main/generated/data/acesbs/recipe/stable_endtropy.json +++ b/src/main/generated/data/acesbs/recipe/stable_endtropy.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:stable_endtropy_block" - } + "acesbs:stable_endtropy_block" ], "result": { "count": 9, diff --git a/src/main/generated/data/acesbs/recipe/stable_endtropy_block.json b/src/main/generated/data/acesbs/recipe/stable_endtropy_block.json index ffc3af5..47c40cd 100644 --- a/src/main/generated/data/acesbs/recipe/stable_endtropy_block.json +++ b/src/main/generated/data/acesbs/recipe/stable_endtropy_block.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "acesbs:stable_endtropy" - } + "#": "acesbs:stable_endtropy" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/stable_entropy.json b/src/main/generated/data/acesbs/recipe/stable_entropy.json index 4c2163c..0d3786c 100644 --- a/src/main/generated/data/acesbs/recipe/stable_entropy.json +++ b/src/main/generated/data/acesbs/recipe/stable_entropy.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shapeless", "category": "building", "ingredients": [ - { - "item": "acesbs:stable_entropy_block" - } + "acesbs:stable_entropy_block" ], "result": { "count": 9, diff --git a/src/main/generated/data/acesbs/recipe/stable_entropy_block.json b/src/main/generated/data/acesbs/recipe/stable_entropy_block.json index 9093b05..c4ca309 100644 --- a/src/main/generated/data/acesbs/recipe/stable_entropy_block.json +++ b/src/main/generated/data/acesbs/recipe/stable_entropy_block.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "misc", "key": { - "#": { - "item": "acesbs:stable_entropy" - } + "#": "acesbs:stable_entropy" }, "pattern": [ "###", diff --git a/src/main/generated/data/acesbs/recipe/stripped_lemonwood_wood.json b/src/main/generated/data/acesbs/recipe/stripped_lemonwood_wood.json index 1c6b99c..3b15a1e 100644 --- a/src/main/generated/data/acesbs/recipe/stripped_lemonwood_wood.json +++ b/src/main/generated/data/acesbs/recipe/stripped_lemonwood_wood.json @@ -2,9 +2,7 @@ "type": "minecraft:crafting_shaped", "category": "building", "key": { - "#": { - "item": "acesbs:stripped_lemonwood_log" - } + "#": "acesbs:stripped_lemonwood_log" }, "pattern": [ "## ", diff --git a/src/main/generated/data/acesbs/recipe/thot_begone.json b/src/main/generated/data/acesbs/recipe/thot_begone.json index 551cf98..e77e01c 100644 --- a/src/main/generated/data/acesbs/recipe/thot_begone.json +++ b/src/main/generated/data/acesbs/recipe/thot_begone.json @@ -2,12 +2,8 @@ "type": "minecraft:crafting_shaped", "category": "equipment", "key": { - "P": { - "tag": "minecraft:planks" - }, - "S": { - "item": "minecraft:stick" - } + "P": "#minecraft:planks", + "S": "minecraft:stick" }, "pattern": [ " P", diff --git a/src/main/generated/data/acesbs/tags/item/berserkers_repair.json b/src/main/generated/data/acesbs/tags/item/berserkers_repair.json new file mode 100644 index 0000000..71b797d --- /dev/null +++ b/src/main/generated/data/acesbs/tags/item/berserkers_repair.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:leather" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/tags/item/plates_repair.json b/src/main/generated/data/acesbs/tags/item/plates_repair.json new file mode 100644 index 0000000..456480d --- /dev/null +++ b/src/main/generated/data/acesbs/tags/item/plates_repair.json @@ -0,0 +1,5 @@ +{ + "values": [ + "acesbs:ashen_steel" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/acesbs/tags/item/wildfire_repair.json b/src/main/generated/data/acesbs/tags/item/wildfire_repair.json new file mode 100644 index 0000000..a958166 --- /dev/null +++ b/src/main/generated/data/acesbs/tags/item/wildfire_repair.json @@ -0,0 +1,5 @@ +{ + "values": [ + "acesbs:infernal_ashes" + ] +} \ No newline at end of file diff --git a/src/main/java/com/acethewildfire/acesbs/KNOWN_ISSUES b/src/main/java/com/acethewildfire/acesbs/KNOWN_ISSUES new file mode 100644 index 0000000..9d666f8 --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/KNOWN_ISSUES @@ -0,0 +1,5 @@ +attribute components on items and armor are not being applied. +- Thot-begone +- Beserkers Pauldon + +REI display does not display custom recipes. \ No newline at end of file diff --git a/src/main/java/com/acethewildfire/acesbs/V1 Complete.txt b/src/main/java/com/acethewildfire/acesbs/V1 Complete.txt deleted file mode 100644 index e69de29..0000000 diff --git a/src/main/java/com/acethewildfire/acesbs/block/ModBlocks.java b/src/main/java/com/acethewildfire/acesbs/block/ModBlocks.java index b305c67..54d8ebe 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/ModBlocks.java +++ b/src/main/java/com/acethewildfire/acesbs/block/ModBlocks.java @@ -13,25 +13,26 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemConvertible; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.sound.SoundEvent; import net.minecraft.util.Identifier; import net.minecraft.util.math.intprovider.UniformIntProvider; +import java.util.function.Function; import java.util.function.ToIntFunction; -import static net.minecraft.block.Blocks.createFlowerPotBlock; - public class ModBlocks { public static final Block RAW_ENTROPY_BLOCK = registerBlock("raw_entropy_block", - new RawEntropyBlock(AbstractBlock.Settings.create() + properties -> new RawEntropyBlock(properties .strength(3f) .requiresTool() .sounds(BlockSoundGroup.AMETHYST_BLOCK))); public static final Block STABLE_ENTROPY_BLOCK = registerBlock("stable_entropy_block", - new StableEntropyBlock(AbstractBlock.Settings.create() + properties -> new StableEntropyBlock(properties .strength(5f) .luminance(new ToIntFunction() { @Override @@ -43,52 +44,52 @@ public class ModBlocks { .sounds(BlockSoundGroup.LODESTONE))); public static final Block ENTROPY_ORE = registerBlock("entropy_ore", - new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), - AbstractBlock.Settings.create() + properties -> new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), + properties .strength(3.0F, 3.0F) .mapColor(MapColor.STONE_GRAY) .requiresTool() .sounds(BlockSoundGroup.STONE))); public static final Block DEEPSLATE_ENTROPY_ORE = registerBlock("deepslate_entropy_ore", - new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), - AbstractBlock.Settings.create() + properties -> new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), + properties .mapColor(MapColor.DEEPSLATE_GRAY) .strength(4.5F, 3.0F) .requiresTool() .sounds(BlockSoundGroup.DEEPSLATE))); public static final Block ENDTROPY_ORE = registerBlock("endtropy_ore", - new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), - AbstractBlock.Settings.create() + properties -> new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), + properties .mapColor(MapColor.PALE_YELLOW) .requiresTool() .strength(3.0F, 9.0F))); public static final Block RAW_ENDTROPY_BLOCK = registerBlock("raw_endtropy_block", - new RawEndtropyBlock(AbstractBlock.Settings.create() + properties -> new RawEndtropyBlock(properties .strength(3f) .requiresTool() .sounds(BlockSoundGroup.AMETHYST_BLOCK))); public static final Block STABLE_ENDTROPY_BLOCK = registerBlock("stable_endtropy_block", - new StableEndtropyBlock(AbstractBlock.Settings.create() + properties -> new StableEndtropyBlock(properties .strength(3f) .requiresTool() .sounds(BlockSoundGroup.AMETHYST_BLOCK))); public static final Block INFERNAL_ASHES_ORE = registerBlock("infernal_ashes_ore", - new ExperienceDroppingBlock( + properties -> new ExperienceDroppingBlock( UniformIntProvider.create(0, 1), - AbstractBlock.Settings.create() + properties .mapColor(MapColor.DARK_RED) .requiresTool() .strength(3.0F, 3.0F) .sounds(BlockSoundGroup.NETHER_GOLD_ORE))); public static final Block ENTROPIC_STABILIZER = registerBlock("entropic_stabilizer", - new EntropicStabilizer( - AbstractBlock.Settings.create() + properties -> new EntropicStabilizer( + properties .mapColor(MapColor.LIGHT_GRAY) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.METAL) @@ -96,16 +97,16 @@ public class ModBlocks { )); public static final Block ENTROPIC_EVISCERATOR = registerBlock("entropic_eviscerator", - new EntropicEviscerator( - AbstractBlock.Settings.create() + properties -> new EntropicEviscerator( + properties .mapColor(MapColor.LIGHT_GRAY) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.METAL) .requiresTool() )); public static final Block ENTROPIC_ENTANGLER = registerBlock("entropic_entangler", - new EntropicEntangler( - AbstractBlock.Settings.create() + properties -> new EntropicEntangler( + properties .mapColor(MapColor.LIGHT_GRAY) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.METAL) @@ -113,8 +114,8 @@ public class ModBlocks { )); public static final Block ORDERED_CORE = registerBlock("ordered_core", - new HeavyCoreBlock( - AbstractBlock.Settings.create() + properties -> new HeavyCoreBlock( + properties .mapColor(MapColor.IRON_GRAY) .instrument(NoteBlockInstrument.SNARE) .sounds(BlockSoundGroup.HEAVY_CORE) @@ -125,24 +126,24 @@ public class ModBlocks { public static final Block LEMONWOOD_LOG = registerBlock("lemonwood_log", - new PillarBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_LOG))); + properties -> new PillarBlock(properties.mapColor(MapColor.PALE_YELLOW).sounds(BlockSoundGroup.WOOD))); public static final Block LEMONWOOD_WOOD = registerBlock("lemonwood_wood", - new PillarBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_WOOD).mapColor(MapColor.PALE_YELLOW))); + properties -> new PillarBlock(properties.mapColor(MapColor.PALE_YELLOW).instrument(NoteBlockInstrument.BASS).strength(2.0F).sounds(BlockSoundGroup.WOOD).burnable())); public static final Block STRIPPED_LEMONWOOD_LOG = registerBlock("stripped_lemonwood_log", - new PillarBlock(AbstractBlock.Settings.copy(Blocks.STRIPPED_BIRCH_LOG))); + properties -> new PillarBlock(properties.mapColor(MapColor.PALE_YELLOW).instrument(NoteBlockInstrument.BASS).strength(2.0F).sounds(BlockSoundGroup.WOOD).burnable())); public static final Block STRIPPED_LEMONWOOD_WOOD = registerBlock("stripped_lemonwood_wood", - new PillarBlock(AbstractBlock.Settings.copy(Blocks.STRIPPED_BIRCH_WOOD).mapColor(MapColor.PALE_YELLOW))); + properties -> new PillarBlock(properties.mapColor(MapColor.PALE_YELLOW).instrument(NoteBlockInstrument.BASS).strength(2.0F).sounds(BlockSoundGroup.WOOD).burnable())); public static final Block LEMONWOOD_LEAVES = registerBlock("lemonwood_leaves", - new LeavesBlock(AbstractBlock.Settings.copy(Blocks.BIRCH_LEAVES))); + properties -> new LeavesBlock(properties.mapColor(MapColor.DARK_GREEN).strength(0.2F).ticksRandomly().sounds(BlockSoundGroup.GRASS).nonOpaque().allowsSpawning(Blocks::canSpawnOnLeaves).suffocates(Blocks::never).blockVision(Blocks::never).burnable().pistonBehavior(PistonBehavior.DESTROY).solidBlock(Blocks::never))); public static final Block LEMONWOOD_SAPLING = registerBlock("lemonwood_sapling", - new SaplingBlock(ModBlockSaplingGenerator.LEMONWOOD, AbstractBlock.Settings.copy(Blocks.BIRCH_SAPLING))); + properties -> new SaplingBlock(ModBlockSaplingGenerator.LEMONWOOD, properties.mapColor(MapColor.DARK_GREEN).noCollision().ticksRandomly().breakInstantly().sounds(BlockSoundGroup.GRASS).pistonBehavior(PistonBehavior.DESTROY))); - public static final Block POTTED_LEMONWOOD_SAPLING = registerBlock("potted_lemonwood_sapling", createFlowerPotBlock(LEMONWOOD_SAPLING)); + public static final Block POTTED_LEMONWOOD_SAPLING = registerBlock("potted_lemonwood_sapling", properties -> new FlowerPotBlock(LEMONWOOD_SAPLING, properties.breakInstantly().nonOpaque().pistonBehavior(PistonBehavior.DESTROY))); public static final Block LEMONWOOD_PLANKS = registerBlock("lemonwood_planks", - new Block( - AbstractBlock.Settings.create() + properties -> new Block( + properties .mapColor(MapColor.PALE_YELLOW) .instrument(NoteBlockInstrument.BASS) .strength(2.0F, 3.0F) @@ -152,16 +153,16 @@ public class ModBlocks { public static final Block LEMONWOOD_STAIRS = registerBlock("lemonwood_stairs", - new StairsBlock(ModBlocks.LEMONWOOD_PLANKS.getDefaultState(), - AbstractBlock.Settings.create() + properties -> new StairsBlock(ModBlocks.LEMONWOOD_PLANKS.getDefaultState(), + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) .burnable() )); public static final Block LEMONWOOD_SLAB = registerBlock("lemonwood_slab", - new SlabBlock( - AbstractBlock.Settings.create() + properties -> new SlabBlock( + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) @@ -169,8 +170,8 @@ public class ModBlocks { )); public static final Block LEMONWOOD_BUTTON = registerBlock("lemonwood_button", - new ButtonBlock(BlockSetType.BIRCH, 10, - AbstractBlock.Settings.create() + properties -> new ButtonBlock(BlockSetType.BIRCH, 10, + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) @@ -178,8 +179,8 @@ public class ModBlocks { .noCollision() )); public static final Block LEMONWOOD_PRESSURE_PLATE = registerBlock("lemonwood_pressure_plate", - new PressurePlateBlock(BlockSetType.BIRCH, - AbstractBlock.Settings.create() + properties -> new PressurePlateBlock(BlockSetType.BIRCH, + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) @@ -187,24 +188,24 @@ public class ModBlocks { )); public static final Block LEMONWOOD_FENCE = registerBlock("lemonwood_fence", - new FenceBlock( - AbstractBlock.Settings.create() + properties -> new FenceBlock( + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) .burnable() )); public static final Block LEMONWOOD_FENCE_GATE = registerBlock("lemonwood_fence_gate", - new FenceGateBlock(WoodType.BIRCH, - AbstractBlock.Settings.create() + properties -> new FenceGateBlock(WoodType.BIRCH, + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) .burnable() )); public static final Block LEMONWOOD_WALL = registerBlock("lemonwood_wall", - new WallBlock( - AbstractBlock.Settings.create() + properties -> new WallBlock( + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) @@ -212,8 +213,8 @@ public class ModBlocks { )); public static final Block LEMONWOOD_DOOR = registerBlock("lemonwood_door", - new DoorBlock(BlockSetType.BIRCH, - AbstractBlock.Settings.create() + properties -> new DoorBlock(BlockSetType.BIRCH, + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) @@ -221,8 +222,8 @@ public class ModBlocks { .nonOpaque() )); public static final Block LEMONWOOD_TRAPDOOR = registerBlock("lemonwood_trapdoor", - new TrapdoorBlock(BlockSetType.BIRCH, - AbstractBlock.Settings.create() + properties -> new TrapdoorBlock(BlockSetType.BIRCH, + properties .mapColor(MapColor.PALE_YELLOW) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) @@ -231,8 +232,8 @@ public class ModBlocks { )); public static final Block LIZARD_PLANKS = registerBlock("lizard_planks", - new Block( - AbstractBlock.Settings.create() + properties -> new Block( + properties .mapColor(MapColor.DARK_GREEN) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) @@ -240,8 +241,8 @@ public class ModBlocks { )); public static final Block LIZARD_BUTTON = registerBlock("lizard_button", - new ButtonBlock(BlockSetType.BIRCH, 1, - AbstractBlock.Settings.create() + properties -> new ButtonBlock(BlockSetType.BIRCH, 1, + properties .mapColor(MapColor.DARK_GREEN) .strength(2.0F, 3.0F) .sounds(BlockSoundGroup.WOOD) @@ -261,7 +262,7 @@ public class ModBlocks { }); public static final Block EVIL_BLOCK = registerBlock("evil_block", - new EvilBlock(AbstractBlock.Settings.create() + properties -> new EvilBlock(properties .strength(5f) .luminance(state -> state.get(EvilBlock.CLICKED) ? 15 : 0) .requiresTool() @@ -269,8 +270,8 @@ public class ModBlocks { public static final Block PRISMA_STEEL_BLOCK = registerBlock( "prisma_steel_block", - new Block( - AbstractBlock.Settings.create() + properties -> new Block( + properties .mapColor(MapColor.IRON_GRAY) .instrument(NoteBlockInstrument.IRON_XYLOPHONE) .requiresTool() @@ -281,8 +282,8 @@ public class ModBlocks { public static final Block INFERNAL_ASHES_BLOCK = registerBlock( "infernal_ashes_block", - new FallingBlock( - AbstractBlock.Settings.create() + properties -> new FallingBlock( + properties .mapColor(MapColor.LIGHT_GRAY) .instrument(NoteBlockInstrument.SNARE) .strength(0.5F) @@ -297,8 +298,8 @@ public class ModBlocks { public static final Block CRYSTAL_ENTROPY = registerBlock( "crystal_entropy", - new TransparentBlock( - AbstractBlock.Settings.create() + properties -> new TransparentBlock( + properties .instrument(NoteBlockInstrument.HAT) .strength(0.3F) .sounds(BlockSoundGroup.GLASS) @@ -312,8 +313,8 @@ public class ModBlocks { public static final Block CRYSTAL_ENTROPY_PANE = registerBlock( "crystal_entropy_pane", - new PaneBlock( - AbstractBlock.Settings.create() + properties -> new PaneBlock( + properties .instrument(NoteBlockInstrument.HAT) .strength(0.3F) .sounds(BlockSoundGroup.GLASS) @@ -321,8 +322,8 @@ public class ModBlocks { ) ); - public static final Block TOBACCO_CROP = registerBlockWithoutItem("tobacco_crop", new TobaccoCrop( - AbstractBlock.Settings.create() + public static final Block TOBACCO_CROP = registerBlockWithoutItem("tobacco_crop", properties -> new TobaccoCrop( + properties .mapColor(MapColor.DARK_GREEN) .noCollision() .ticksRandomly() @@ -332,8 +333,8 @@ public class ModBlocks { )); public static final Block ASHEN_STEEL_BLOCK = registerBlock( "ashen_steel_block", - new Block( - AbstractBlock.Settings.create() + properties -> new Block( + properties .mapColor(MapColor.IRON_GRAY) .instrument(NoteBlockInstrument.IRON_XYLOPHONE) .requiresTool() @@ -342,18 +343,21 @@ public class ModBlocks { ) ); - private static Block registerBlockWithoutItem(String name, Block block){ - return Registry.register(Registries.BLOCK, Identifier.of(AcesBS.MOD_ID, name), block); + private static Block registerBlock(String name, Function function) { + Block toRegister = function.apply(AbstractBlock.Settings.create().registryKey(RegistryKey.of(RegistryKeys.BLOCK, Identifier.of(AcesBS.MOD_ID, name)))); + registerBlockItem(name, toRegister); + return Registry.register(Registries.BLOCK, Identifier.of(AcesBS.MOD_ID, name), toRegister); } - private static Block registerBlock(String name, Block block){ - registerBlockItem(name, block); - return Registry.register(Registries.BLOCK, Identifier.of(AcesBS.MOD_ID, name), block); + private static Block registerBlockWithoutItem(String name, Function function) { + return Registry.register(Registries.BLOCK, Identifier.of(AcesBS.MOD_ID, name), + function.apply(AbstractBlock.Settings.create().registryKey(RegistryKey.of(RegistryKeys.BLOCK, Identifier.of(AcesBS.MOD_ID, name))))); } - private static void registerBlockItem(String name, Block block){ + private static void registerBlockItem(String name, Block block) { Registry.register(Registries.ITEM, Identifier.of(AcesBS.MOD_ID, name), - new BlockItem(block, new Item.Settings())); + new BlockItem(block, new Item.Settings().useBlockPrefixedTranslationKey() + .registryKey(RegistryKey.of(RegistryKeys.ITEM, Identifier.of(AcesBS.MOD_ID, name))))); } public static void registerModBlocks(){ diff --git a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEntangler.java b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEntangler.java index cc0ea69..a087609 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEntangler.java +++ b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEntangler.java @@ -12,10 +12,10 @@ import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; import net.minecraft.screen.NamedScreenHandlerFactory; import net.minecraft.state.StateManager; -import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.Properties; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.ItemActionResult; import net.minecraft.util.ItemScatterer; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; @@ -24,7 +24,7 @@ import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; public class EntropicEntangler extends BlockWithEntity implements BlockEntityProvider { - public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING; + public static final EnumProperty FACING = Properties.HORIZONTAL_FACING; public static final MapCodec CODEC = EntropicEntangler.createCodec(EntropicEntangler::new); public EntropicEntangler(Settings settings) { @@ -60,7 +60,7 @@ public class EntropicEntangler extends BlockWithEntity implements BlockEntityPro } @Override - protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { if (!world.isClient) { NamedScreenHandlerFactory screenHandlerFactory = ((EntropicEntanglerEntity) world.getBlockEntity(pos)); @@ -68,7 +68,7 @@ public class EntropicEntangler extends BlockWithEntity implements BlockEntityPro player.openHandledScreen(screenHandlerFactory); } } - return ItemActionResult.SUCCESS; + return ActionResult.SUCCESS; } diff --git a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEviscerator.java b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEviscerator.java index b24f2ae..72a5e4d 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEviscerator.java +++ b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicEviscerator.java @@ -12,10 +12,10 @@ import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; import net.minecraft.screen.NamedScreenHandlerFactory; import net.minecraft.state.StateManager; -import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.Properties; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.ItemActionResult; import net.minecraft.util.ItemScatterer; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; @@ -24,7 +24,7 @@ import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; public class EntropicEviscerator extends BlockWithEntity implements BlockEntityProvider { - public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING; + public static final EnumProperty FACING = Properties.HORIZONTAL_FACING; public static final MapCodec CODEC = EntropicEviscerator.createCodec(EntropicEviscerator::new); public EntropicEviscerator(Settings settings) { @@ -60,7 +60,7 @@ public class EntropicEviscerator extends BlockWithEntity implements BlockEntityP } @Override - protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { if (!world.isClient) { NamedScreenHandlerFactory screenHandlerFactory = ((EntropicEvisceratorEntity) world.getBlockEntity(pos)); @@ -68,7 +68,7 @@ public class EntropicEviscerator extends BlockWithEntity implements BlockEntityP player.openHandledScreen(screenHandlerFactory); } } - return ItemActionResult.SUCCESS; + return ActionResult.SUCCESS; } diff --git a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicStabilizer.java b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicStabilizer.java index 416d774..343a877 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicStabilizer.java +++ b/src/main/java/com/acethewildfire/acesbs/block/custom/EntropicStabilizer.java @@ -12,10 +12,10 @@ import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; import net.minecraft.screen.NamedScreenHandlerFactory; import net.minecraft.state.StateManager; -import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.EnumProperty; import net.minecraft.state.property.Properties; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.ItemActionResult; import net.minecraft.util.ItemScatterer; import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.math.BlockPos; @@ -24,7 +24,7 @@ import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; public class EntropicStabilizer extends BlockWithEntity implements BlockEntityProvider { - public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING; + public static final EnumProperty FACING = Properties.HORIZONTAL_FACING; public static final MapCodec CODEC = EntropicStabilizer.createCodec(EntropicStabilizer::new); public EntropicStabilizer(Settings settings) { @@ -60,7 +60,7 @@ public class EntropicStabilizer extends BlockWithEntity implements BlockEntityPr } @Override - protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + protected ActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { if (!world.isClient) { NamedScreenHandlerFactory screenHandlerFactory = ((EntropicStabilizerEntity) world.getBlockEntity(pos)); @@ -68,7 +68,7 @@ public class EntropicStabilizer extends BlockWithEntity implements BlockEntityPr player.openHandledScreen(screenHandlerFactory); } } - return ItemActionResult.SUCCESS; + return ActionResult.SUCCESS; } diff --git a/src/main/java/com/acethewildfire/acesbs/block/entity/ModBlockEntities.java b/src/main/java/com/acethewildfire/acesbs/block/entity/ModBlockEntities.java index 7150089..3730b85 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/entity/ModBlockEntities.java +++ b/src/main/java/com/acethewildfire/acesbs/block/entity/ModBlockEntities.java @@ -5,6 +5,7 @@ import com.acethewildfire.acesbs.block.ModBlocks; import com.acethewildfire.acesbs.block.entity.custom.EntropicEntanglerEntity; import com.acethewildfire.acesbs.block.entity.custom.EntropicEvisceratorEntity; import com.acethewildfire.acesbs.block.entity.custom.EntropicStabilizerEntity; +import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -14,13 +15,13 @@ public class ModBlockEntities { public static final BlockEntityType E_STABILIZER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "e_stabilizer_be"), - BlockEntityType.Builder.create(EntropicStabilizerEntity::new, ModBlocks.ENTROPIC_STABILIZER).build(null)); + FabricBlockEntityTypeBuilder.create(EntropicStabilizerEntity::new, ModBlocks.ENTROPIC_STABILIZER).build(null)); public static final BlockEntityType E_EVISCERATOR_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "e_eviscerator_be"), - BlockEntityType.Builder.create(EntropicEvisceratorEntity::new, ModBlocks.ENTROPIC_EVISCERATOR).build(null)); + FabricBlockEntityTypeBuilder.create(EntropicEvisceratorEntity::new, ModBlocks.ENTROPIC_EVISCERATOR).build(null)); public static final BlockEntityType E_ENTANGLER_BE = Registry.register(Registries.BLOCK_ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "e_entangler_be"), - BlockEntityType.Builder.create(EntropicEntanglerEntity::new, ModBlocks.ENTROPIC_ENTANGLER).build(null)); + FabricBlockEntityTypeBuilder.create(EntropicEntanglerEntity::new, ModBlocks.ENTROPIC_ENTANGLER).build(null)); public static void registerBlockEntities() { AcesBS.LOGGER.info("Registering Block Entities for " + AcesBS.MOD_ID); diff --git a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEntanglerEntity.java b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEntanglerEntity.java index 89ca08c..83f8c96 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEntanglerEntity.java +++ b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEntanglerEntity.java @@ -23,6 +23,7 @@ import net.minecraft.registry.RegistryWrapper; import net.minecraft.screen.PropertyDelegate; import net.minecraft.screen.ScreenHandler; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.text.Text; import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.math.BlockPos; @@ -230,7 +231,7 @@ public class EntropicEntanglerEntity extends BlockEntity implements EntanglerInv } private Optional> getCurrentRecipe() { - return this.getWorld().getRecipeManager() + return ((ServerWorld) this.getWorld()).getRecipeManager() .getFirstMatch(ModRecipies.ENTROPIC_ENTANGLER_TYPE, new EntropicEntanglerRecipeInput(inventory.get(INPUT_SLOT), inventory.get(INPUT2_SLOT)), this.getWorld()); } diff --git a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEvisceratorEntity.java b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEvisceratorEntity.java index 4594c0c..8687f3d 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEvisceratorEntity.java +++ b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicEvisceratorEntity.java @@ -24,6 +24,7 @@ import net.minecraft.registry.RegistryWrapper; import net.minecraft.screen.PropertyDelegate; import net.minecraft.screen.ScreenHandler; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.text.Text; import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.math.BlockPos; @@ -242,7 +243,7 @@ public class EntropicEvisceratorEntity extends BlockEntity implements Implemente } private Optional> getCurrentRecipe() { - return this.getWorld().getRecipeManager() + return ((ServerWorld) this.getWorld()).getRecipeManager() .getFirstMatch(ModRecipies.ENTROPIC_EVISCERATOR_TYPE, new EntropicEvisceratorRecipeInput(inventory.get(INPUT_SLOT)), this.getWorld()); } diff --git a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicStabilizerEntity.java b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicStabilizerEntity.java index 20eda5b..c5ae70d 100644 --- a/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicStabilizerEntity.java +++ b/src/main/java/com/acethewildfire/acesbs/block/entity/custom/EntropicStabilizerEntity.java @@ -24,6 +24,7 @@ import net.minecraft.registry.RegistryWrapper; import net.minecraft.screen.PropertyDelegate; import net.minecraft.screen.ScreenHandler; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.text.Text; import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.math.BlockPos; @@ -242,7 +243,7 @@ public class EntropicStabilizerEntity extends BlockEntity implements Implemented } private Optional> getCurrentRecipe() { - return this.getWorld().getRecipeManager() + return ((ServerWorld) this.getWorld()).getRecipeManager() .getFirstMatch(ModRecipies.ENTROPIC_STABILIZER_TYPE, new EntropicStabilizerRecipeInput(inventory.get(INPUT_SLOT)), this.getWorld()); } diff --git a/src/main/java/com/acethewildfire/acesbs/compat/AcesBSREIClient.java b/src/main/java/com/acethewildfire/acesbs/compat/AcesBSREIClient.java index b117b5c..cc7a6e2 100644 --- a/src/main/java/com/acethewildfire/acesbs/compat/AcesBSREIClient.java +++ b/src/main/java/com/acethewildfire/acesbs/compat/AcesBSREIClient.java @@ -31,9 +31,9 @@ public class AcesBSREIClient implements REIClientPlugin { @Override public void registerDisplays(DisplayRegistry registry) { - registry.registerRecipeFiller(EntropicStabilizerRecipe.class, ModRecipies.ENTROPIC_STABILIZER_TYPE, EntropicStabilizerDisplay::new); - registry.registerRecipeFiller(EntropicEvisceratorRecipe.class, ModRecipies.ENTROPIC_EVISCERATOR_TYPE, EntropicEvisceratorDisplay::new); - registry.registerRecipeFiller(EntropicEntanglerRecipe.class, ModRecipies.ENTROPIC_ENTANGLER_TYPE, EntropicEntanglerDisplay::new); +// registry.registerRecipeFiller(EntropicStabilizerRecipe.class, ModRecipies.ENTROPIC_STABILIZER_TYPE, EntropicStabilizerDisplay::new); +// registry.registerRecipeFiller(EntropicEvisceratorRecipe.class, ModRecipies.ENTROPIC_EVISCERATOR_TYPE, EntropicEvisceratorDisplay::new); +// registry.registerRecipeFiller(EntropicEntanglerRecipe.class, ModRecipies.ENTROPIC_ENTANGLER_TYPE, EntropicEntanglerDisplay::new); } @Override diff --git a/src/main/java/com/acethewildfire/acesbs/compat/EntropicEntanglerDisplay.java b/src/main/java/com/acethewildfire/acesbs/compat/EntropicEntanglerDisplay.java index 40b799a..bab6b07 100644 --- a/src/main/java/com/acethewildfire/acesbs/compat/EntropicEntanglerDisplay.java +++ b/src/main/java/com/acethewildfire/acesbs/compat/EntropicEntanglerDisplay.java @@ -2,11 +2,14 @@ package com.acethewildfire.acesbs.compat; import com.acethewildfire.acesbs.recipe.EntropicEntanglerRecipe; import me.shedaniel.rei.api.common.category.CategoryIdentifier; +import me.shedaniel.rei.api.common.display.Display; +import me.shedaniel.rei.api.common.display.DisplaySerializer; import me.shedaniel.rei.api.common.display.basic.BasicDisplay; import me.shedaniel.rei.api.common.entry.EntryIngredient; import me.shedaniel.rei.api.common.util.EntryIngredients; import me.shedaniel.rei.api.common.util.EntryStacks; import net.minecraft.recipe.RecipeEntry; +import org.jetbrains.annotations.Nullable; import java.util.List; @@ -18,11 +21,16 @@ public class EntropicEntanglerDisplay extends BasicDisplay { public EntropicEntanglerDisplay(RecipeEntry recipe){ super( List.of(EntryIngredients.ofIngredient(recipe.value().getIngredients().get(0)), EntryIngredients.ofIngredient(recipe.value().getIngredients().get(1))), - List.of(EntryIngredient.of(EntryStacks.of(recipe.value().getResult(null))))); + List.of(EntryIngredient.of(EntryStacks.of(recipe.value().output())))); } @Override public CategoryIdentifier getCategoryIdentifier() { return EntropicEntanglerCategory.ENTROPIC_ENTANGLER; } + + @Override + public @Nullable DisplaySerializer getSerializer() { + return null; + } } diff --git a/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorDisplay.java b/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorDisplay.java index 166b992..b3cdf0e 100644 --- a/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorDisplay.java +++ b/src/main/java/com/acethewildfire/acesbs/compat/EntropicEvisceratorDisplay.java @@ -2,11 +2,14 @@ package com.acethewildfire.acesbs.compat; import com.acethewildfire.acesbs.recipe.EntropicEvisceratorRecipe; import me.shedaniel.rei.api.common.category.CategoryIdentifier; +import me.shedaniel.rei.api.common.display.Display; +import me.shedaniel.rei.api.common.display.DisplaySerializer; import me.shedaniel.rei.api.common.display.basic.BasicDisplay; import me.shedaniel.rei.api.common.entry.EntryIngredient; import me.shedaniel.rei.api.common.util.EntryIngredients; import me.shedaniel.rei.api.common.util.EntryStacks; import net.minecraft.recipe.RecipeEntry; +import org.jetbrains.annotations.Nullable; import java.util.List; @@ -18,11 +21,16 @@ public class EntropicEvisceratorDisplay extends BasicDisplay { public EntropicEvisceratorDisplay(RecipeEntry recipe){ super( List.of(EntryIngredients.ofIngredient(recipe.value().getIngredients().get(0))), - List.of(EntryIngredient.of(EntryStacks.of(recipe.value().getResult(null))))); + List.of(EntryIngredient.of(EntryStacks.of(recipe.value().output())))); } @Override public CategoryIdentifier getCategoryIdentifier() { return EntropicEvisceratorCategory.ENTROPIC_EVISCERATOR; } + + @Override + public @Nullable DisplaySerializer getSerializer() { + return null; + } } diff --git a/src/main/java/com/acethewildfire/acesbs/compat/EntropicStabilizerDisplay.java b/src/main/java/com/acethewildfire/acesbs/compat/EntropicStabilizerDisplay.java index 2337140..2c8532c 100644 --- a/src/main/java/com/acethewildfire/acesbs/compat/EntropicStabilizerDisplay.java +++ b/src/main/java/com/acethewildfire/acesbs/compat/EntropicStabilizerDisplay.java @@ -2,11 +2,14 @@ package com.acethewildfire.acesbs.compat; import com.acethewildfire.acesbs.recipe.EntropicStabilizerRecipe; import me.shedaniel.rei.api.common.category.CategoryIdentifier; +import me.shedaniel.rei.api.common.display.Display; +import me.shedaniel.rei.api.common.display.DisplaySerializer; import me.shedaniel.rei.api.common.display.basic.BasicDisplay; import me.shedaniel.rei.api.common.entry.EntryIngredient; import me.shedaniel.rei.api.common.util.EntryIngredients; import me.shedaniel.rei.api.common.util.EntryStacks; import net.minecraft.recipe.RecipeEntry; +import org.jetbrains.annotations.Nullable; import java.util.List; @@ -18,11 +21,16 @@ public class EntropicStabilizerDisplay extends BasicDisplay { public EntropicStabilizerDisplay(RecipeEntry recipe){ super( List.of(EntryIngredients.ofIngredient(recipe.value().getIngredients().get(0))), - List.of(EntryIngredient.of(EntryStacks.of(recipe.value().getResult(null))))); + List.of(EntryIngredient.of(EntryStacks.of(recipe.value().output())))); } @Override public CategoryIdentifier getCategoryIdentifier() { return EntropicStabilizerCategory.ENTROPIC_STABILIZER; } + + @Override + public @Nullable DisplaySerializer getSerializer() { + return null; + } } diff --git a/src/main/java/com/acethewildfire/acesbs/datagen/ModItemTagProvider.java b/src/main/java/com/acethewildfire/acesbs/datagen/ModItemTagProvider.java index 6028a67..d3849f5 100644 --- a/src/main/java/com/acethewildfire/acesbs/datagen/ModItemTagProvider.java +++ b/src/main/java/com/acethewildfire/acesbs/datagen/ModItemTagProvider.java @@ -27,6 +27,12 @@ public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider { .add(PrismaSteelItems.PRISMA_STEEL); getOrCreateTagBuilder(ModTags.Items.ASHEN_REPAIR) .add(AshenSteelItems.ASHEN_STEEL); + getOrCreateTagBuilder(ModTags.Items.WILDFIRE_REPAIR) + .add(ModItems.INFERNAL_ASHES); + getOrCreateTagBuilder(ModTags.Items.PLATES_REPAIR) + .add(AshenSteelItems.ASHEN_STEEL); + getOrCreateTagBuilder(ModTags.Items.BERSERKERS_REPAIR) + .add(Items.LEATHER); getOrCreateTagBuilder(ModTags.Items.PRISMA_CONVERTABLE) .add(Items.COAL) .add(Items.RAW_COPPER) diff --git a/src/main/java/com/acethewildfire/acesbs/datagen/ModLootTableProvider.java b/src/main/java/com/acethewildfire/acesbs/datagen/ModLootTableProvider.java index 3ab7d23..2df95f6 100644 --- a/src/main/java/com/acethewildfire/acesbs/datagen/ModLootTableProvider.java +++ b/src/main/java/com/acethewildfire/acesbs/datagen/ModLootTableProvider.java @@ -16,10 +16,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.loot.LootPool; import net.minecraft.loot.LootTable; -import net.minecraft.loot.condition.BlockStatePropertyLootCondition; -import net.minecraft.loot.condition.InvertedLootCondition; -import net.minecraft.loot.condition.LootCondition; -import net.minecraft.loot.condition.MatchToolLootCondition; +import net.minecraft.loot.condition.*; import net.minecraft.loot.entry.ItemEntry; import net.minecraft.loot.entry.LeafEntry; import net.minecraft.loot.function.ApplyBonusLootFunction; @@ -33,10 +30,16 @@ import net.minecraft.predicate.item.EnchantmentPredicate; import net.minecraft.predicate.item.EnchantmentsPredicate; import net.minecraft.predicate.item.ItemPredicate; import net.minecraft.predicate.item.ItemSubPredicateTypes; +import net.minecraft.registry.RegistryEntryLookup; +import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.RegistryWrapper; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.registry.entry.RegistryEntryList; +import net.minecraft.registry.tag.TagKey; import java.util.List; +import java.util.Optional; import java.util.concurrent.CompletableFuture; public class ModLootTableProvider extends FabricBlockLootTableProvider { @@ -96,7 +99,7 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider { } public LootTable.Builder multipleOreDrops(Block drop, Item item, float minDrops, float maxDrops) { - RegistryWrapper.Impl impl = this.registryLookup.getWrapperOrThrow(RegistryKeys.ENCHANTMENT); + RegistryWrapper.Impl impl = this.registries.getOrThrow(RegistryKeys.ENCHANTMENT); return this.dropsWithSilkTouch( drop, this.applyExplosionDecay(drop, ((LeafEntry.Builder)ItemEntry.builder(item) @@ -104,16 +107,17 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider { .apply(ApplyBonusLootFunction.oreDrops(impl.getOrThrow(Enchantments.FORTUNE))))); } - public LootCondition.Builder specialToolCondition(ItemConvertible... tools){ + public LootCondition.Builder specialToolCondition(RegistryEntryLookup lookup, ItemConvertible... tools) { return MatchToolLootCondition.builder( ItemPredicate.Builder.create() - .items(tools) + .items(lookup, tools) ); } public LootTable.Builder prismaSteelOreDrops(Block block, Item defaultItem, float minDrops, float maxDrops){ - RegistryWrapper.Impl impl = this.registryLookup.getWrapperOrThrow(RegistryKeys.ENCHANTMENT); + RegistryWrapper.Impl impl = this.registries.getOrThrow(RegistryKeys.ENCHANTMENT); + RegistryEntryLookup itemLookup = registries.getOrThrow(RegistryKeys.ITEM); LootCondition.Builder silkTouchCondition = MatchToolLootCondition.builder( ItemPredicate.Builder.create() .subPredicate( @@ -125,7 +129,7 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider { LootPool.Builder defaultPool = LootPool.builder() .rolls(UniformLootNumberProvider.create(minDrops, maxDrops)) .conditionally(InvertedLootCondition.builder(silkTouchCondition)) - .conditionally(InvertedLootCondition.builder(specialToolCondition(PrismaSteelItems.PRISMA_STEEL_PICKAXE, PrismaSteelItems.PRISMA_STEEL_HAMMER))) +// .conditionally(InvertedLootCondition.builder(specialToolCondition(itemLookup, PrismaSteelItems.PRISMA_STEEL_PICKAXE, PrismaSteelItems.PRISMA_STEEL_HAMMER))) .with(ItemEntry.builder(defaultItem).weight(1)) .apply(ApplyBonusLootFunction.oreDrops(impl.getOrThrow(Enchantments.FORTUNE))) .apply(ExplosionDecayLootFunction.builder()); @@ -137,10 +141,10 @@ public class ModLootTableProvider extends FabricBlockLootTableProvider { .apply(ExplosionDecayLootFunction.builder()); LootPool.Builder prismaPool = LootPool.builder() - .rolls(UniformLootNumberProvider.create(minDrops, maxDrops)) + .rolls(ConstantLootNumberProvider.create(1)) // only 1 roll + .conditionally(RandomChanceLootCondition.builder(0.1f)) // chance to drop anything .conditionally(InvertedLootCondition.builder(silkTouchCondition)) - .conditionally(specialToolCondition(PrismaSteelItems.PRISMA_STEEL_PICKAXE, PrismaSteelItems.PRISMA_STEEL_HAMMER)) - .with(ItemEntry.builder(Items.AIR).weight(360)) + .conditionally(specialToolCondition(itemLookup, PrismaSteelItems.PRISMA_STEEL_PICKAXE, PrismaSteelItems.PRISMA_STEEL_HAMMER)) .with(ItemEntry.builder(Items.COAL).weight(12)) .with(ItemEntry.builder(Items.RAW_COPPER).weight(10)) .with(ItemEntry.builder(Items.RAW_IRON).weight(6)) diff --git a/src/main/java/com/acethewildfire/acesbs/datagen/ModModelProvider.java b/src/main/java/com/acethewildfire/acesbs/datagen/ModModelProvider.java index 5363e71..2d895a8 100644 --- a/src/main/java/com/acethewildfire/acesbs/datagen/ModModelProvider.java +++ b/src/main/java/com/acethewildfire/acesbs/datagen/ModModelProvider.java @@ -1,14 +1,17 @@ package com.acethewildfire.acesbs.datagen; +import com.acethewildfire.acesbs.AcesBS; import com.acethewildfire.acesbs.block.ModBlocks; import com.acethewildfire.acesbs.block.custom.EvilBlock; import com.acethewildfire.acesbs.block.custom.TobaccoCrop; import com.acethewildfire.acesbs.item.AshenSteelItems; +import com.acethewildfire.acesbs.item.ModArmorMaterials; import com.acethewildfire.acesbs.item.ModItems; import com.acethewildfire.acesbs.item.PrismaSteelItems; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider; import net.minecraft.data.client.*; +import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.ArmorItem; import net.minecraft.util.Identifier; @@ -106,10 +109,14 @@ public class ModModelProvider extends FabricModelProvider { itemModelGenerator.register(PrismaSteelItems.PRISMA_STEEL_SHOVEL, Models.HANDHELD); itemModelGenerator.register(PrismaSteelItems.PRISMA_STEEL_HOE, Models.HANDHELD); - itemModelGenerator.registerArmor((ArmorItem) PrismaSteelItems.PRISMA_STEEL_HELMET); - itemModelGenerator.registerArmor((ArmorItem) PrismaSteelItems.PRISMA_STEEL_CHESTPLATE); - itemModelGenerator.registerArmor((ArmorItem) PrismaSteelItems.PRISMA_STEEL_LEGGINGS); - itemModelGenerator.registerArmor((ArmorItem) PrismaSteelItems.PRISMA_STEEL_BOOTS); + itemModelGenerator.registerArmor(((ArmorItem) PrismaSteelItems.PRISMA_STEEL_HELMET), Identifier.of(AcesBS.MOD_ID, "prisma_steel"), + ModArmorMaterials.PRISMA, EquipmentSlot.HEAD); + itemModelGenerator.registerArmor(((ArmorItem) PrismaSteelItems.PRISMA_STEEL_CHESTPLATE), Identifier.of(AcesBS.MOD_ID, "prisma_steel"), + ModArmorMaterials.PRISMA, EquipmentSlot.CHEST); + itemModelGenerator.registerArmor(((ArmorItem) PrismaSteelItems.PRISMA_STEEL_LEGGINGS), Identifier.of(AcesBS.MOD_ID, "prisma_steel"), + ModArmorMaterials.PRISMA, EquipmentSlot.LEGS); + itemModelGenerator.registerArmor(((ArmorItem) PrismaSteelItems.PRISMA_STEEL_BOOTS), Identifier.of(AcesBS.MOD_ID, "prisma_steel"), + ModArmorMaterials.PRISMA, EquipmentSlot.FEET); itemModelGenerator.register(AshenSteelItems.ASHEN_STEEL_SWORD, Models.HANDHELD); itemModelGenerator.register(AshenSteelItems.ASHEN_STEEL_PICKAXE, Models.HANDHELD); @@ -118,14 +125,21 @@ public class ModModelProvider extends FabricModelProvider { itemModelGenerator.register(AshenSteelItems.ASHEN_STEEL_SHOVEL, Models.HANDHELD); itemModelGenerator.register(AshenSteelItems.ASHEN_STEEL_HOE, Models.HANDHELD); - itemModelGenerator.registerArmor((ArmorItem) AshenSteelItems.ASHEN_STEEL_HELMET); - itemModelGenerator.registerArmor((ArmorItem) AshenSteelItems.ASHEN_STEEL_CHESTPLATE); - itemModelGenerator.registerArmor((ArmorItem) AshenSteelItems.ASHEN_STEEL_LEGGINGS); - itemModelGenerator.registerArmor((ArmorItem) AshenSteelItems.ASHEN_STEEL_BOOTS); + itemModelGenerator.registerArmor(((ArmorItem) AshenSteelItems.ASHEN_STEEL_HELMET), Identifier.of(AcesBS.MOD_ID, "ashen_steel"), + ModArmorMaterials.ASHEN, EquipmentSlot.HEAD); + itemModelGenerator.registerArmor(((ArmorItem) AshenSteelItems.ASHEN_STEEL_CHESTPLATE), Identifier.of(AcesBS.MOD_ID, "ashen_steel"), + ModArmorMaterials.ASHEN, EquipmentSlot.CHEST); + itemModelGenerator.registerArmor(((ArmorItem) AshenSteelItems.ASHEN_STEEL_LEGGINGS), Identifier.of(AcesBS.MOD_ID, "ashen_steel"), + ModArmorMaterials.ASHEN, EquipmentSlot.LEGS); + itemModelGenerator.registerArmor(((ArmorItem) AshenSteelItems.ASHEN_STEEL_BOOTS), Identifier.of(AcesBS.MOD_ID, "ashen_steel"), + ModArmorMaterials.ASHEN, EquipmentSlot.FEET); - itemModelGenerator.registerArmor((ArmorItem) ModItems.BERSERKERS_PAULDRON); - itemModelGenerator.registerArmor((ArmorItem) ModItems.WILDFIRE_BOOTS); - itemModelGenerator.registerArmor((ArmorItem) ModItems.SOVS_PLATE_CARRIER); + itemModelGenerator.registerArmor(((ArmorItem) ModItems.BERSERKERS_PAULDRON), Identifier.of(AcesBS.MOD_ID, "berserkers"), + ModArmorMaterials.BERSERKERS, EquipmentSlot.CHEST); + itemModelGenerator.registerArmor(((ArmorItem) ModItems.WILDFIRE_BOOTS), Identifier.of(AcesBS.MOD_ID, "wildfire"), + ModArmorMaterials.WILDFIRE, EquipmentSlot.FEET); + itemModelGenerator.registerArmor(((ArmorItem) ModItems.SOVS_PLATE_CARRIER), Identifier.of(AcesBS.MOD_ID, "plates"), + ModArmorMaterials.PLATES, EquipmentSlot.CHEST); itemModelGenerator.register(ModItems.FREN_SPAWN_EGG, new Model(Optional.of(Identifier.of("item/template_spawn_egg")), Optional.empty())); diff --git a/src/main/java/com/acethewildfire/acesbs/datagen/ModRecipeProvider.java b/src/main/java/com/acethewildfire/acesbs/datagen/ModRecipeProvider.java index 4c01b3b..c4e5f57 100644 --- a/src/main/java/com/acethewildfire/acesbs/datagen/ModRecipeProvider.java +++ b/src/main/java/com/acethewildfire/acesbs/datagen/ModRecipeProvider.java @@ -10,6 +10,7 @@ import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider; import net.minecraft.block.Blocks; import net.minecraft.data.server.recipe.RecipeExporter; +import net.minecraft.data.server.recipe.RecipeGenerator; import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder; import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder; import net.minecraft.item.Item; @@ -17,6 +18,7 @@ import net.minecraft.item.ItemConvertible; import net.minecraft.item.Items; import net.minecraft.recipe.*; import net.minecraft.recipe.book.RecipeCategory; +import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.RegistryWrapper; import net.minecraft.registry.tag.TagKey; @@ -30,356 +32,365 @@ public class ModRecipeProvider extends FabricRecipeProvider { } @Override - public void generate(RecipeExporter recipeExporter) { - TagKey PLANKS = TagKey.of(RegistryKeys.ITEM, Identifier.ofVanilla( "planks")); + protected RecipeGenerator getRecipeGenerator(RegistryWrapper.WrapperLookup wrapperLookup, RecipeExporter recipeExporter) { + return new RecipeGenerator(wrapperLookup, recipeExporter) { + @Override + public void generate() { + TagKey PLANKS = TagKey.of(RegistryKeys.ITEM, Identifier.ofVanilla( "planks")); // List ENTROPY_SMELTABLES = List.of(ModItems.RAW_ENTROPY, ModBlocks.ENTROPY_ORE, ModBlocks.DEEPSLATE_ENTROPY_ORE); // List ENDTROPY_SMELTABLES = List.of(ModItems.RAW_ENDTROPY, ModBlocks.ENDTROPY_ORE); // // offerBlasting(recipeExporter, ENTROPY_SMELTABLES, RecipeCategory.MISC, ModItems.STABLE_ENTROPY, 0.5f, 2000, "stable_entropy"); // offerBlasting(recipeExporter, ENDTROPY_SMELTABLES, RecipeCategory.MISC, ModItems.STABLE_ENDTROPY, 0.5f, 2000, "stable_endtropy"); - offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.RAW_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.RAW_ENTROPY_BLOCK); - offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.STABLE_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.STABLE_ENTROPY_BLOCK); - offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.RAW_ENDTROPY, RecipeCategory.DECORATIONS, ModBlocks.RAW_ENDTROPY_BLOCK); - offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.STABLE_ENDTROPY, RecipeCategory.DECORATIONS, ModBlocks.STABLE_ENDTROPY_BLOCK); - // ENDTROPY BLOCKS - // offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.RAW_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.ENDTROPY_BLOCK); - // offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.STABLE_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.STABLE_ENDTROPY_BLOCK); - offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, PrismaSteelItems.PRISMA_STEEL, RecipeCategory.DECORATIONS, ModBlocks.PRISMA_STEEL_BLOCK); - offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.INFERNAL_ASHES, RecipeCategory.DECORATIONS, ModBlocks.INFERNAL_ASHES_BLOCK); + offerReversibleCompactingRecipes(RecipeCategory.BUILDING_BLOCKS, ModItems.RAW_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.RAW_ENTROPY_BLOCK); + offerReversibleCompactingRecipes(RecipeCategory.BUILDING_BLOCKS, ModItems.STABLE_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.STABLE_ENTROPY_BLOCK); + offerReversibleCompactingRecipes(RecipeCategory.BUILDING_BLOCKS, ModItems.RAW_ENDTROPY, RecipeCategory.DECORATIONS, ModBlocks.RAW_ENDTROPY_BLOCK); + offerReversibleCompactingRecipes(RecipeCategory.BUILDING_BLOCKS, ModItems.STABLE_ENDTROPY, RecipeCategory.DECORATIONS, ModBlocks.STABLE_ENDTROPY_BLOCK); + // ENDTROPY BLOCKS + // offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.RAW_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.ENDTROPY_BLOCK); + // offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.STABLE_ENTROPY, RecipeCategory.DECORATIONS, ModBlocks.STABLE_ENDTROPY_BLOCK); + offerReversibleCompactingRecipes(RecipeCategory.BUILDING_BLOCKS, PrismaSteelItems.PRISMA_STEEL, RecipeCategory.DECORATIONS, ModBlocks.PRISMA_STEEL_BLOCK); + offerReversibleCompactingRecipes(RecipeCategory.BUILDING_BLOCKS, ModItems.INFERNAL_ASHES, RecipeCategory.DECORATIONS, ModBlocks.INFERNAL_ASHES_BLOCK); - offerAllFoodCookingRecipes(recipeExporter, 200, ModItems.LEMON, ModItems.COOKED_LEMON, 0.35F); + offerAllFoodCookingRecipes(200, ModItems.LEMON, ModItems.COOKED_LEMON, 0.35F); - ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, ModItems.ORACLE_LEMON, 4) - .pattern("###") - .pattern("#L#") - .pattern("###") - .input('#', ModItems.STABLE_ENTROPY) - .input('L', ModItems.LEMON) - .criterion(hasItem(ModItems.LEMON), conditionsFromItem(ModItems.LEMON)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.COMBAT, ModItems.ORACLE_LEMON, 4) + .pattern("###") + .pattern("#L#") + .pattern("###") + .input('#', ModItems.STABLE_ENTROPY) + .input('L', ModItems.LEMON) + .criterion(hasItem(ModItems.LEMON), conditionsFromItem(ModItems.LEMON)) + .offerTo(recipeExporter); - ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, ModItems.THOT_BEGONE, 1) - .pattern(" P") - .pattern(" P ") - .pattern("S ") - .input('S', Items.STICK) - .input('P', PLANKS) - .criterion(hasItem(Items.STICK), conditionsFromItem(Items.STICK)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.COMBAT, ModItems.THOT_BEGONE, 1) + .pattern(" P") + .pattern(" P ") + .pattern("S ") + .input('S', Items.STICK) + .input('P', PLANKS) + .criterion(hasItem(Items.STICK), conditionsFromItem(Items.STICK)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, ModItems.BRICKED_UP, 1) - .input(Items.BRICK, 1) - .input(ModItems.STABLE_ENDTROPY, 1) - .criterion(hasItem(ModItems.STABLE_ENDTROPY), conditionsFromItem(ModItems.STABLE_ENDTROPY)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.FOOD, ModItems.BRICKED_UP, 1) + .input(Items.BRICK, 1) + .input(ModItems.STABLE_ENDTROPY, 1) + .criterion(hasItem(ModItems.STABLE_ENDTROPY), conditionsFromItem(ModItems.STABLE_ENDTROPY)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, ModItems.CIGARETTE, 1) - .input(Items.PAPER, 1) - .input(ModItems.TOBACCO, 1) - .criterion(hasItem(ModItems.TOBACCO), conditionsFromItem(ModItems.TOBACCO)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.FOOD, ModItems.CIGARETTE, 1) + .input(Items.PAPER, 1) + .input(ModItems.TOBACCO, 1) + .criterion(hasItem(ModItems.TOBACCO), conditionsFromItem(ModItems.TOBACCO)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, ModItems.CIGARETTE_LEMON, 1) - .input(ModItems.CIGARETTE, 1) - .input(ModItems.COMBUSTIBLE_LEMON, 1) - .criterion(hasItem(ModItems.CIGARETTE), conditionsFromItem(ModItems.CIGARETTE)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.FOOD, ModItems.CIGARETTE_LEMON, 1) + .input(ModItems.CIGARETTE, 1) + .input(ModItems.COMBUSTIBLE_LEMON, 1) + .criterion(hasItem(ModItems.CIGARETTE), conditionsFromItem(ModItems.CIGARETTE)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, ModItems.CIGARETTE_FUNNY, 1) - .input(ModItems.CIGARETTE, 1) - .input(ModItems.INFERNAL_ASHES, 1) - .criterion(hasItem(ModItems.CIGARETTE), conditionsFromItem(ModItems.CIGARETTE)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.FOOD, ModItems.CIGARETTE_FUNNY, 1) + .input(ModItems.CIGARETTE, 1) + .input(ModItems.INFERNAL_ASHES, 1) + .criterion(hasItem(ModItems.CIGARETTE), conditionsFromItem(ModItems.CIGARETTE)) + .offerTo(recipeExporter); - ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, ModBlocks.CRYSTAL_ENTROPY, 8) - .pattern("###") - .pattern("#S#") - .pattern("###") - .input('#', Blocks.GLASS) - .input('S', ModItems.STABLE_ENTROPY) - .criterion(hasItem(ModItems.STABLE_ENTROPY), conditionsFromItem(ModItems.STABLE_ENTROPY)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, "crystal_entropy_from_stable_and_glass")); + createShaped(RecipeCategory.DECORATIONS, ModBlocks.CRYSTAL_ENTROPY, 8) + .pattern("###") + .pattern("#S#") + .pattern("###") + .input('#', Blocks.GLASS) + .input('S', ModItems.STABLE_ENTROPY) + .criterion(hasItem(ModItems.STABLE_ENTROPY), conditionsFromItem(ModItems.STABLE_ENTROPY)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, "crystal_entropy_from_stable_and_glass"))); - ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModBlocks.ENTROPIC_STABILIZER, 1) - .pattern("IRI") - .pattern("IBI") - .pattern("III") - .input('I', Items.IRON_INGOT) - .input('R', ModItems.RAW_ENTROPY) - .input('B', Blocks.BLUE_ICE) - .criterion(hasItem(ModItems.RAW_ENTROPY), conditionsFromItem(ModItems.RAW_ENTROPY)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.MISC, ModBlocks.ENTROPIC_STABILIZER, 1) + .pattern("IRI") + .pattern("IBI") + .pattern("III") + .input('I', Items.IRON_INGOT) + .input('R', ModItems.RAW_ENTROPY) + .input('B', Blocks.BLUE_ICE) + .criterion(hasItem(ModItems.RAW_ENTROPY), conditionsFromItem(ModItems.RAW_ENTROPY)) + .offerTo(recipeExporter); - ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModBlocks.ENTROPIC_EVISCERATOR, 1) - .pattern("III") - .pattern("SES") - .pattern("III") - .input('I', Items.IRON_INGOT) - .input('S', Blocks.STONECUTTER) - .input('E', ModItems.STABLE_ENTROPY) - .criterion(hasItem(Blocks.STONECUTTER), conditionsFromItem(Blocks.STONECUTTER)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.MISC, ModBlocks.ENTROPIC_EVISCERATOR, 1) + .pattern("III") + .pattern("SES") + .pattern("III") + .input('I', Items.IRON_INGOT) + .input('S', Blocks.STONECUTTER) + .input('E', ModItems.STABLE_ENTROPY) + .criterion(hasItem(Blocks.STONECUTTER), conditionsFromItem(Blocks.STONECUTTER)) + .offerTo(recipeExporter); - ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModBlocks.ENTROPIC_ENTANGLER, 1) - .pattern("ISI") - .pattern("BGB") - .pattern("ISI") - .input('I', Items.IRON_INGOT) - .input('S', ModItems.STABLE_ENTROPY) - .input('B', Items.BUCKET) - .input('G', Blocks.GOLD_BLOCK) - .criterion(hasItem(ModItems.RAW_ENTROPY), conditionsFromItem(ModItems.RAW_ENTROPY)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.MISC, ModBlocks.ENTROPIC_ENTANGLER, 1) + .pattern("ISI") + .pattern("BGB") + .pattern("ISI") + .input('I', Items.IRON_INGOT) + .input('S', ModItems.STABLE_ENTROPY) + .input('B', Items.BUCKET) + .input('G', Blocks.GOLD_BLOCK) + .criterion(hasItem(ModItems.RAW_ENTROPY), conditionsFromItem(ModItems.RAW_ENTROPY)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.COMBAT, ModItems.COMBUSTIBLE_LEMON, 1) - .input(ModItems.LEMON, 1) - .input(Items.FIRE_CHARGE, 1) - .input(Items.GUNPOWDER, 1) - .criterion(hasItem(ModItems.LEMON), conditionsFromItem(ModItems.LEMON)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.COMBAT, ModItems.COMBUSTIBLE_LEMON, 1) + .input(ModItems.LEMON, 1) + .input(Items.FIRE_CHARGE, 1) + .input(Items.GUNPOWDER, 1) + .criterion(hasItem(ModItems.LEMON), conditionsFromItem(ModItems.LEMON)) + .offerTo(recipeExporter); - ShapedRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, ModBlocks.CRYSTAL_ENTROPY_PANE, 16) - .pattern("###") - .pattern("###") - .input('#', ModBlocks.CRYSTAL_ENTROPY) - .criterion(hasItem(ModBlocks.CRYSTAL_ENTROPY), conditionsFromItem(ModBlocks.CRYSTAL_ENTROPY)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.DECORATIONS, ModBlocks.CRYSTAL_ENTROPY_PANE, 16) + .pattern("###") + .pattern("###") + .input('#', ModBlocks.CRYSTAL_ENTROPY) + .criterion(hasItem(ModBlocks.CRYSTAL_ENTROPY), conditionsFromItem(ModBlocks.CRYSTAL_ENTROPY)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LIZARD_PLANKS, 4) - .input(Blocks.BIRCH_PLANKS, 4) - .input(ModItems.RAW_ENTROPY, 1) - .input(Items.GREEN_DYE, 1) - .criterion(hasItem(Items.GREEN_DYE), conditionsFromItem(Items.GREEN_DYE)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LIZARD_PLANKS, 4) + .input(Blocks.BIRCH_PLANKS, 4) + .input(ModItems.RAW_ENTROPY, 1) + .input(Items.GREEN_DYE, 1) + .criterion(hasItem(Items.GREEN_DYE), conditionsFromItem(Items.GREEN_DYE)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.REDSTONE, ModBlocks.LIZARD_BUTTON, 1) - .input(ModBlocks.LIZARD_PLANKS, 1) - .criterion(hasItem(ModBlocks.LIZARD_PLANKS), conditionsFromItem(ModBlocks.LIZARD_PLANKS)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.REDSTONE, ModBlocks.LIZARD_BUTTON, 1) + .input(ModBlocks.LIZARD_PLANKS, 1) + .criterion(hasItem(ModBlocks.LIZARD_PLANKS), conditionsFromItem(ModBlocks.LIZARD_PLANKS)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, ModBlocks.LEMONWOOD_SAPLING, 1) - .input(Blocks.BIRCH_SAPLING, 1) - .input(ModItems.LEMON, 1) - .criterion(hasItem(ModItems.LEMON), conditionsFromItem(ModItems.LEMON)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.DECORATIONS, ModBlocks.LEMONWOOD_SAPLING, 1) + .input(Blocks.BIRCH_SAPLING, 1) + .input(ModItems.LEMON, 1) + .criterion(hasItem(ModItems.LEMON), conditionsFromItem(ModItems.LEMON)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_PLANKS, 4) - .input(ModBlocks.LEMONWOOD_LOG, 1) - .criterion(hasItem(ModBlocks.LEMONWOOD_LOG), conditionsFromItem(ModBlocks.LEMONWOOD_LOG)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, "lemonwood_planks_from_lemonwood_log")); + createShapeless(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_PLANKS, 4) + .input(ModBlocks.LEMONWOOD_LOG, 1) + .criterion(hasItem(ModBlocks.LEMONWOOD_LOG), conditionsFromItem(ModBlocks.LEMONWOOD_LOG)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, "lemonwood_planks_from_lemonwood_log"))); - ShapelessRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_PLANKS, 4) - .input(ModBlocks.STRIPPED_LEMONWOOD_LOG, 1) - .criterion(hasItem(ModBlocks.STRIPPED_LEMONWOOD_LOG), conditionsFromItem(ModBlocks.STRIPPED_LEMONWOOD_LOG)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, "lemonwood_planks_from_stripped_lemonwood_log")); + createShapeless(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_PLANKS, 4) + .input(ModBlocks.STRIPPED_LEMONWOOD_LOG, 1) + .criterion(hasItem(ModBlocks.STRIPPED_LEMONWOOD_LOG), conditionsFromItem(ModBlocks.STRIPPED_LEMONWOOD_LOG)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, "lemonwood_planks_from_stripped_lemonwood_log"))); - ShapelessRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_PLANKS, 4) - .input(ModBlocks.LEMONWOOD_WOOD, 1) - .criterion(hasItem(ModBlocks.LEMONWOOD_WOOD), conditionsFromItem(ModBlocks.LEMONWOOD_WOOD)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, "lemonwood_planks_from_lemonwood_wood")); + createShapeless(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_PLANKS, 4) + .input(ModBlocks.LEMONWOOD_WOOD, 1) + .criterion(hasItem(ModBlocks.LEMONWOOD_WOOD), conditionsFromItem(ModBlocks.LEMONWOOD_WOOD)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, "lemonwood_planks_from_lemonwood_wood"))); - ShapelessRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_PLANKS, 4) - .input(ModBlocks.STRIPPED_LEMONWOOD_WOOD, 1) - .criterion(hasItem(ModBlocks.STRIPPED_LEMONWOOD_WOOD), conditionsFromItem(ModBlocks.STRIPPED_LEMONWOOD_WOOD)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, "lemonwood_planks_from_stripped_lemonwood_wood")); + createShapeless(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_PLANKS, 4) + .input(ModBlocks.STRIPPED_LEMONWOOD_WOOD, 1) + .criterion(hasItem(ModBlocks.STRIPPED_LEMONWOOD_WOOD), conditionsFromItem(ModBlocks.STRIPPED_LEMONWOOD_WOOD)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, "lemonwood_planks_from_stripped_lemonwood_wood"))); - ShapedRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_WOOD, 3) - .pattern("## ") - .pattern("## ") - .pattern(" ") - .input('#', ModBlocks.LEMONWOOD_LOG) - .criterion(hasItem(ModBlocks.LEMONWOOD_LOG), conditionsFromItem(ModBlocks.LEMONWOOD_LOG)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_WOOD, 3) + .pattern("## ") + .pattern("## ") + .pattern(" ") + .input('#', ModBlocks.LEMONWOOD_LOG) + .criterion(hasItem(ModBlocks.LEMONWOOD_LOG), conditionsFromItem(ModBlocks.LEMONWOOD_LOG)) + .offerTo(recipeExporter); - ShapedRecipeJsonBuilder.create(RecipeCategory.BUILDING_BLOCKS, ModBlocks.STRIPPED_LEMONWOOD_WOOD, 3) - .pattern("## ") - .pattern("## ") - .pattern(" ") - .input('#', ModBlocks.STRIPPED_LEMONWOOD_LOG) - .criterion(hasItem(ModBlocks.STRIPPED_LEMONWOOD_LOG), conditionsFromItem(ModBlocks.STRIPPED_LEMONWOOD_LOG)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.BUILDING_BLOCKS, ModBlocks.STRIPPED_LEMONWOOD_WOOD, 3) + .pattern("## ") + .pattern("## ") + .pattern(" ") + .input('#', ModBlocks.STRIPPED_LEMONWOOD_LOG) + .criterion(hasItem(ModBlocks.STRIPPED_LEMONWOOD_LOG), conditionsFromItem(ModBlocks.STRIPPED_LEMONWOOD_LOG)) + .offerTo(recipeExporter); - ShapedRecipeJsonBuilder.create(RecipeCategory.FOOD, ModItems.BUBBLE_PIPE, 1) - .pattern(" #") - .pattern("PPP") - .pattern(" ") - .input('#', Items.IRON_INGOT) - .input('P', Blocks.BIRCH_PLANKS) - .criterion(hasItem(Blocks.BIRCH_PLANKS), conditionsFromItem(Blocks.BIRCH_PLANKS)) - .offerTo(recipeExporter); + createShaped(RecipeCategory.FOOD, ModItems.BUBBLE_PIPE, 1) + .pattern(" #") + .pattern("PPP") + .pattern(" ") + .input('#', Items.IRON_INGOT) + .input('P', Blocks.BIRCH_PLANKS) + .criterion(hasItem(Blocks.BIRCH_PLANKS), conditionsFromItem(Blocks.BIRCH_PLANKS)) + .offerTo(recipeExporter); - createStairsRecipe(ModBlocks.LEMONWOOD_STAIRS, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) - .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) - .offerTo(recipeExporter); - createSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_SLAB, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) - .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) - .offerTo(recipeExporter); + createStairsRecipe(ModBlocks.LEMONWOOD_STAIRS, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) + .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) + .offerTo(recipeExporter); + createSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_SLAB, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) + .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) + .offerTo(recipeExporter); - ShapelessRecipeJsonBuilder.create(RecipeCategory.REDSTONE, ModBlocks.LEMONWOOD_BUTTON, 1) - .input(ModBlocks.LEMONWOOD_PLANKS, 1) - .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) - .offerTo(recipeExporter); - createPressurePlateRecipe(RecipeCategory.REDSTONE, ModBlocks.LEMONWOOD_PRESSURE_PLATE, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) - .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) - .offerTo(recipeExporter); + createShapeless(RecipeCategory.REDSTONE, ModBlocks.LEMONWOOD_BUTTON, 1) + .input(ModBlocks.LEMONWOOD_PLANKS, 1) + .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) + .offerTo(recipeExporter); + createPressurePlateRecipe(RecipeCategory.REDSTONE, ModBlocks.LEMONWOOD_PRESSURE_PLATE, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) + .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) + .offerTo(recipeExporter); - createFenceRecipe(ModBlocks.LEMONWOOD_FENCE, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) - .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) - .offerTo(recipeExporter); - createFenceGateRecipe(ModBlocks.LEMONWOOD_FENCE_GATE, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) - .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) - .offerTo(recipeExporter); - offerWallRecipe(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_WALL, ModBlocks.LEMONWOOD_PLANKS); + createFenceRecipe(ModBlocks.LEMONWOOD_FENCE, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) + .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) + .offerTo(recipeExporter); + createFenceGateRecipe(ModBlocks.LEMONWOOD_FENCE_GATE, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) + .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) + .offerTo(recipeExporter); + offerWallRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LEMONWOOD_WALL, ModBlocks.LEMONWOOD_PLANKS); - createDoorRecipe(ModBlocks.LEMONWOOD_DOOR, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) - .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) - .offerTo(recipeExporter); - createTrapdoorRecipe(ModBlocks.LEMONWOOD_TRAPDOOR, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) - .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) - .offerTo(recipeExporter); + createDoorRecipe(ModBlocks.LEMONWOOD_DOOR, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) + .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) + .offerTo(recipeExporter); + createTrapdoorRecipe(ModBlocks.LEMONWOOD_TRAPDOOR, Ingredient.ofItems(ModBlocks.LEMONWOOD_PLANKS)) + .criterion(hasItem(ModBlocks.LEMONWOOD_PLANKS), conditionsFromItem(ModBlocks.LEMONWOOD_PLANKS)) + .offerTo(recipeExporter); - SwordRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_SWORD, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); - PickaxeRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_PICKAXE, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); - HammerRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_HAMMER, PrismaSteelItems.PRISMA_STEEL, ModBlocks.PRISMA_STEEL_BLOCK, Items.STICK, PrismaSteelItems.PRISMA_STEEL); - AxeRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_AXE, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); - ShovelRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_SHOVEL, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); - HoeRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_HOE, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); + SwordRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_SWORD, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); + PickaxeRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_PICKAXE, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); + HammerRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_HAMMER, PrismaSteelItems.PRISMA_STEEL, ModBlocks.PRISMA_STEEL_BLOCK, Items.STICK, PrismaSteelItems.PRISMA_STEEL); + AxeRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_AXE, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); + ShovelRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_SHOVEL, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); + HoeRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_HOE, PrismaSteelItems.PRISMA_STEEL, Items.STICK, PrismaSteelItems.PRISMA_STEEL); - SwordRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_SWORD, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); - PickaxeRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_PICKAXE, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); - HammerRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_HAMMER, AshenSteelItems.ASHEN_STEEL, ModBlocks.ASHEN_STEEL_BLOCK, Items.STICK, AshenSteelItems.ASHEN_STEEL); - AxeRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_AXE, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); - ShovelRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_SHOVEL, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); - HoeRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_HOE, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); + SwordRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_SWORD, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); + PickaxeRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_PICKAXE, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); + HammerRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_HAMMER, AshenSteelItems.ASHEN_STEEL, ModBlocks.ASHEN_STEEL_BLOCK, Items.STICK, AshenSteelItems.ASHEN_STEEL); + AxeRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_AXE, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); + ShovelRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_SHOVEL, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); + HoeRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_HOE, AshenSteelItems.ASHEN_STEEL, Items.STICK, AshenSteelItems.ASHEN_STEEL); - ModArmorRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_HELMET, PrismaSteelItems.PRISMA_STEEL_CHESTPLATE, PrismaSteelItems.PRISMA_STEEL_LEGGINGS, PrismaSteelItems.PRISMA_STEEL_BOOTS, PrismaSteelItems.PRISMA_STEEL, PrismaSteelItems.PRISMA_STEEL); - ModArmorRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_HELMET, AshenSteelItems.ASHEN_STEEL_CHESTPLATE, AshenSteelItems.ASHEN_STEEL_LEGGINGS, AshenSteelItems.ASHEN_STEEL_BOOTS, AshenSteelItems.ASHEN_STEEL, AshenSteelItems.ASHEN_STEEL); + ModArmorRecipeJsonBuilder(recipeExporter, PrismaSteelItems.PRISMA_STEEL_HELMET, PrismaSteelItems.PRISMA_STEEL_CHESTPLATE, PrismaSteelItems.PRISMA_STEEL_LEGGINGS, PrismaSteelItems.PRISMA_STEEL_BOOTS, PrismaSteelItems.PRISMA_STEEL, PrismaSteelItems.PRISMA_STEEL); + ModArmorRecipeJsonBuilder(recipeExporter, AshenSteelItems.ASHEN_STEEL_HELMET, AshenSteelItems.ASHEN_STEEL_CHESTPLATE, AshenSteelItems.ASHEN_STEEL_LEGGINGS, AshenSteelItems.ASHEN_STEEL_BOOTS, AshenSteelItems.ASHEN_STEEL, AshenSteelItems.ASHEN_STEEL); - offerSmithingTrimRecipe(recipeExporter, PrismaSteelItems.PRISMA_SMITHING_TEMPLATE, Identifier.of(AcesBS.MOD_ID, "prisma")); - offerSmithingTrimRecipe(recipeExporter, AshenSteelItems.ASHEN_SMITHING_TEMPLATE, Identifier.of(AcesBS.MOD_ID, "ashen")); + offerSmithingTrimRecipe(PrismaSteelItems.PRISMA_SMITHING_TEMPLATE, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, "prisma"))); + offerSmithingTrimRecipe(AshenSteelItems.ASHEN_SMITHING_TEMPLATE, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, "ashen"))); - // For 2+ recipes with the same RESULT use - // .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, "output_item_from_input_item")); + // For 2+ recipes with the same RESULT use + // .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, "output_item_from_input_item")); + } + + private void SwordRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ + createShaped(RecipeCategory.COMBAT, result) + .pattern(" # ") + .pattern(" # ") + .pattern(" I ") + .input('#', headMaterial) + .input('I', handleMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter); + } + private void PickaxeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ + createShaped(RecipeCategory.TOOLS, result) + .pattern("###") + .pattern(" I ") + .pattern(" I ") + .input('#', headMaterial) + .input('I', handleMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter); + } + private void HammerRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible headMaterialBlock, ItemConvertible handleMaterial, ItemConvertible criterionItem){ + createShaped(RecipeCategory.TOOLS, result) + .pattern("B#B") + .pattern(" I ") + .pattern(" I ") + .input('B', headMaterialBlock) + .input('#', headMaterial) + .input('I', handleMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter); + } + private void AxeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ + createShaped(RecipeCategory.TOOLS, result) + .pattern("## ") + .pattern("#I ") + .pattern(" I ") + .input('#', headMaterial) + .input('I', handleMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".left"))); + createShaped(RecipeCategory.TOOLS, result) + .pattern(" ##") + .pattern(" I#") + .pattern(" I ") + .input('#', headMaterial) + .input('I', handleMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".right"))); + } + private void ShovelRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ + createShaped(RecipeCategory.TOOLS, result) + .pattern(" # ") + .pattern(" I ") + .pattern(" I ") + .input('#', headMaterial) + .input('I', handleMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter); + } + private void HoeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ + createShaped(RecipeCategory.TOOLS, result) + .pattern("## ") + .pattern(" I ") + .pattern(" I ") + .input('#', headMaterial) + .input('I', handleMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".left"))); + createShaped(RecipeCategory.TOOLS, result) + .pattern(" ##") + .pattern(" I ") + .pattern(" I ") + .input('#', headMaterial) + .input('I', handleMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter, RegistryKey.of(RegistryKeys.RECIPE, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".right"))); + } + + private void ModArmorRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible helmetResult, ItemConvertible chestplateResult, ItemConvertible leggingsResult, ItemConvertible bootsResult, ItemConvertible baseMaterial, ItemConvertible criterionItem){ + createShaped(RecipeCategory.COMBAT, helmetResult) + .pattern("###") + .pattern("# #") + .pattern(" ") + .input('#', baseMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter); + + createShaped(RecipeCategory.COMBAT, chestplateResult) + .pattern("# #") + .pattern("###") + .pattern("###") + .input('#', baseMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter); + + createShaped(RecipeCategory.COMBAT, leggingsResult) + .pattern("###") + .pattern("# #") + .pattern("# #") + .input('#', baseMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter); + + createShaped(RecipeCategory.COMBAT, bootsResult) + .pattern(" ") + .pattern("# #") + .pattern("# #") + .input('#', baseMaterial) + .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) + .offerTo(recipeExporter); + } + + public void offerAllFoodCookingRecipes (int baseCookingTime, ItemConvertible raw_item, ItemConvertible cooked_item, float experience ){ + offerFoodCookingRecipe("smoking", RecipeSerializer.SMOKING, SmokingRecipe::new,baseCookingTime/2, raw_item, cooked_item, experience); + offerFoodCookingRecipe("campfire_cooking", RecipeSerializer.CAMPFIRE_COOKING, CampfireCookingRecipe::new, baseCookingTime*3, raw_item, cooked_item, experience); + offerFoodCookingRecipe("smelting", RecipeSerializer.SMELTING, SmeltingRecipe::new, baseCookingTime, raw_item, cooked_item, experience); + } + }; } - - private void SwordRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ - ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, result) - .pattern(" # ") - .pattern(" # ") - .pattern(" I ") - .input('#', headMaterial) - .input('I', handleMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter); - } - private void PickaxeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ - ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result) - .pattern("###") - .pattern(" I ") - .pattern(" I ") - .input('#', headMaterial) - .input('I', handleMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter); - } - private void HammerRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible headMaterialBlock, ItemConvertible handleMaterial, ItemConvertible criterionItem){ - ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result) - .pattern("B#B") - .pattern(" I ") - .pattern(" I ") - .input('B', headMaterialBlock) - .input('#', headMaterial) - .input('I', handleMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter); - } - private void AxeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ - ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result) - .pattern("## ") - .pattern("#I ") - .pattern(" I ") - .input('#', headMaterial) - .input('I', handleMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".left")); - ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result) - .pattern(" ##") - .pattern(" I#") - .pattern(" I ") - .input('#', headMaterial) - .input('I', handleMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".right")); - } - private void ShovelRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ - ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result) - .pattern(" # ") - .pattern(" I ") - .pattern(" I ") - .input('#', headMaterial) - .input('I', handleMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter); - } - private void HoeRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible result, ItemConvertible headMaterial, ItemConvertible handleMaterial, ItemConvertible criterionItem){ - ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result) - .pattern("## ") - .pattern(" I ") - .pattern(" I ") - .input('#', headMaterial) - .input('I', handleMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".left")); - ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, result) - .pattern(" ##") - .pattern(" I ") - .pattern(" I ") - .input('#', headMaterial) - .input('I', handleMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter, Identifier.of(AcesBS.MOD_ID, result.asItem().getName().getString() + ".right")); - } - - private void ModArmorRecipeJsonBuilder(RecipeExporter recipeExporter, ItemConvertible helmetResult, ItemConvertible chestplateResult, ItemConvertible leggingsResult, ItemConvertible bootsResult, ItemConvertible baseMaterial, ItemConvertible criterionItem){ - ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, helmetResult) - .pattern("###") - .pattern("# #") - .pattern(" ") - .input('#', baseMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter); - - ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, chestplateResult) - .pattern("# #") - .pattern("###") - .pattern("###") - .input('#', baseMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter); - - ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, leggingsResult) - .pattern("###") - .pattern("# #") - .pattern("# #") - .input('#', baseMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter); - - ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, bootsResult) - .pattern(" ") - .pattern("# #") - .pattern("# #") - .input('#', baseMaterial) - .criterion(hasItem(criterionItem), conditionsFromItem(criterionItem)) - .offerTo(recipeExporter); - } - - public void offerAllFoodCookingRecipes (RecipeExporter recipeExporter, int baseCookingTime, ItemConvertible raw_item, ItemConvertible cooked_item, float experience ){ - offerFoodCookingRecipe(recipeExporter, "smoking", RecipeSerializer.SMOKING, SmokingRecipe::new,baseCookingTime/2, raw_item, cooked_item, experience); - offerFoodCookingRecipe(recipeExporter, "campfire_cooking", RecipeSerializer.CAMPFIRE_COOKING, CampfireCookingRecipe::new, baseCookingTime*3, raw_item, cooked_item, experience); - offerFoodCookingRecipe(recipeExporter, "smelting", RecipeSerializer.SMELTING, SmeltingRecipe::new, baseCookingTime, raw_item, cooked_item, experience); + @Override + public String getName() { + return "AcesBS Recipes"; } } diff --git a/src/main/java/com/acethewildfire/acesbs/datagen/ModRegistryDataGenerator.java b/src/main/java/com/acethewildfire/acesbs/datagen/ModRegistryDataGenerator.java index 274b527..633c83c 100644 --- a/src/main/java/com/acethewildfire/acesbs/datagen/ModRegistryDataGenerator.java +++ b/src/main/java/com/acethewildfire/acesbs/datagen/ModRegistryDataGenerator.java @@ -14,11 +14,11 @@ public class ModRegistryDataGenerator extends FabricDynamicRegistryProvider { @Override protected void configure(RegistryWrapper.WrapperLookup registries, Entries entries) { - entries.addAll(registries.getWrapperOrThrow(RegistryKeys.TRIM_MATERIAL)); - entries.addAll(registries.getWrapperOrThrow(RegistryKeys.TRIM_PATTERN)); - entries.addAll(registries.getWrapperOrThrow(RegistryKeys.ENCHANTMENT)); - entries.addAll(registries.getWrapperOrThrow(RegistryKeys.CONFIGURED_FEATURE)); - entries.addAll(registries.getWrapperOrThrow(RegistryKeys.PLACED_FEATURE)); + entries.addAll(registries.getOrThrow(RegistryKeys.TRIM_MATERIAL)); + entries.addAll(registries.getOrThrow(RegistryKeys.TRIM_PATTERN)); + entries.addAll(registries.getOrThrow(RegistryKeys.ENCHANTMENT)); + entries.addAll(registries.getOrThrow(RegistryKeys.CONFIGURED_FEATURE)); + entries.addAll(registries.getOrThrow(RegistryKeys.PLACED_FEATURE)); } @Override diff --git a/src/main/java/com/acethewildfire/acesbs/effect/BrickedUpEffect.java b/src/main/java/com/acethewildfire/acesbs/effect/BrickedUpEffect.java index f18168a..fddfdde 100644 --- a/src/main/java/com/acethewildfire/acesbs/effect/BrickedUpEffect.java +++ b/src/main/java/com/acethewildfire/acesbs/effect/BrickedUpEffect.java @@ -5,6 +5,7 @@ import net.minecraft.entity.Flutterer; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectCategory; +import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; @@ -15,11 +16,10 @@ public class BrickedUpEffect extends StatusEffect { } @Override - public boolean applyUpdateEffect(LivingEntity entity, int amplifier) { + public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) { int durationLeft = entity.getStatusEffect(ModEffects.BRICKED_UP).getDuration(); int idealLen = 160; - World world = entity.getWorld(); if(durationLeft > idealLen - 1){ world.playSound(entity, entity.getBlockPos(), ModSounds.BRICKED_UP, SoundCategory.PLAYERS, 2f, 1f); @@ -27,7 +27,8 @@ public class BrickedUpEffect extends StatusEffect { else if(durationLeft > idealLen - 120){ float p = entity.getWorld().getBlockState(entity.getBlockPos()).getBlock().getSlipperiness(); float f = entity.isOnGround() ? p * 0.91F : 0.91F; - Vec3d vec3d6 = entity.applyMovementInput(entity.getMovement(), p); + entity.travel(entity.getMovement()); + Vec3d vec3d6 = entity.getVelocity(); double q = vec3d6.y; q += (0.05 * 7.75 - vec3d6.y) * 0.2; @@ -52,7 +53,8 @@ public class BrickedUpEffect extends StatusEffect { else { float p = entity.getWorld().getBlockState(entity.getBlockPos()).getBlock().getSlipperiness(); float f = entity.isOnGround() ? p * 0.91F : 0.91F; - Vec3d vec3d6 = entity.applyMovementInput(entity.getMovement(), p); + entity.travel(entity.getMovement()); + Vec3d vec3d6 = entity.getVelocity();; double q = vec3d6.y; q += (0.05 * 250 - vec3d6.y) * 0.2; @@ -60,7 +62,7 @@ public class BrickedUpEffect extends StatusEffect { } - return true; + return super.applyUpdateEffect(world, entity, amplifier); } diff --git a/src/main/java/com/acethewildfire/acesbs/effect/CigaretteEffect.java b/src/main/java/com/acethewildfire/acesbs/effect/CigaretteEffect.java index 0dabb9d..1671369 100644 --- a/src/main/java/com/acethewildfire/acesbs/effect/CigaretteEffect.java +++ b/src/main/java/com/acethewildfire/acesbs/effect/CigaretteEffect.java @@ -4,6 +4,7 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectCategory; import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.server.world.ServerWorld; public class CigaretteEffect extends StatusEffect { public CigaretteEffect(StatusEffectCategory category, int color) { @@ -11,7 +12,7 @@ public class CigaretteEffect extends StatusEffect { } @Override - public boolean applyUpdateEffect(LivingEntity entity, int amplifier) { + public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) { StatusEffectInstance effect = entity.getStatusEffect(ModEffects.CIGARETTE); if (effect == null) return true; diff --git a/src/main/java/com/acethewildfire/acesbs/effect/InfernalFireEffect.java b/src/main/java/com/acethewildfire/acesbs/effect/InfernalFireEffect.java index 8a8512e..6fdf43d 100644 --- a/src/main/java/com/acethewildfire/acesbs/effect/InfernalFireEffect.java +++ b/src/main/java/com/acethewildfire/acesbs/effect/InfernalFireEffect.java @@ -17,9 +17,8 @@ public class InfernalFireEffect extends StatusEffect { Random r = new Random(); @Override - public boolean applyUpdateEffect(LivingEntity entity, int amplifier) { + public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) { entity.setOnFireFor(1); - World world = entity.getWorld(); if (entity.isTouchingWater()){ // double randomVelocityX = r.nextDouble(-0.5, 0.5); diff --git a/src/main/java/com/acethewildfire/acesbs/effect/JitteryEffect.java b/src/main/java/com/acethewildfire/acesbs/effect/JitteryEffect.java index b272437..c3bb452 100644 --- a/src/main/java/com/acethewildfire/acesbs/effect/JitteryEffect.java +++ b/src/main/java/com/acethewildfire/acesbs/effect/JitteryEffect.java @@ -4,6 +4,7 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectCategory; import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.server.world.ServerWorld; import java.util.Random; @@ -20,7 +21,7 @@ public class JitteryEffect extends StatusEffect { int times = 2; @Override - public boolean applyUpdateEffect(LivingEntity entity, int amplifier) { + public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) { StatusEffectInstance effect = entity.getStatusEffect(ModEffects.JITTERY); if (effect == null) return true; diff --git a/src/main/java/com/acethewildfire/acesbs/effect/LemonEffect.java b/src/main/java/com/acethewildfire/acesbs/effect/LemonEffect.java index 3668a58..1d09b50 100644 --- a/src/main/java/com/acethewildfire/acesbs/effect/LemonEffect.java +++ b/src/main/java/com/acethewildfire/acesbs/effect/LemonEffect.java @@ -3,6 +3,7 @@ package com.acethewildfire.acesbs.effect; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectCategory; +import net.minecraft.server.world.ServerWorld; public class LemonEffect extends StatusEffect { public LemonEffect(StatusEffectCategory category, int color) { @@ -10,9 +11,9 @@ public class LemonEffect extends StatusEffect { } @Override - public boolean applyUpdateEffect(LivingEntity entity, int amplifier) { + public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) { - entity.damage(entity.getDamageSources().wither(), 0.1F); + entity.damage(world, entity.getDamageSources().wither(), 0.1F); return true; } diff --git a/src/main/java/com/acethewildfire/acesbs/effect/ModEffects.java b/src/main/java/com/acethewildfire/acesbs/effect/ModEffects.java index d2451c0..0493be5 100644 --- a/src/main/java/com/acethewildfire/acesbs/effect/ModEffects.java +++ b/src/main/java/com/acethewildfire/acesbs/effect/ModEffects.java @@ -14,13 +14,13 @@ public class ModEffects { public static final RegistryEntry LEMON = registerStatusEffect("lemon", new LemonEffect(StatusEffectCategory.HARMFUL, 0xfae640) - .addAttributeModifier(EntityAttributes.GENERIC_MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "lemon"), + .addAttributeModifier(EntityAttributes.MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "lemon"), -0.75F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); public static final RegistryEntry INFERNAL_FIRE = registerStatusEffect("infernal_fire", new InfernalFireEffect(StatusEffectCategory.HARMFUL, 0x963830) - .addAttributeModifier(EntityAttributes.GENERIC_MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "infernal_fire"), + .addAttributeModifier(EntityAttributes.MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "infernal_fire"), 1F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL) - .addAttributeModifier(EntityAttributes.GENERIC_JUMP_STRENGTH, Identifier.of(AcesBS.MOD_ID, "infernal_fire"), + .addAttributeModifier(EntityAttributes.JUMP_STRENGTH, Identifier.of(AcesBS.MOD_ID, "infernal_fire"), 0.25F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); public static final RegistryEntry BRICKED_UP = registerStatusEffect("bricked_up", @@ -28,12 +28,12 @@ public class ModEffects { public static final RegistryEntry CIGARETTE = registerStatusEffect("cigarette", new CigaretteEffect(StatusEffectCategory.BENEFICIAL, 0xE6A74F) - .addAttributeModifier(EntityAttributes.GENERIC_MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "cigarette"), + .addAttributeModifier(EntityAttributes.MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "cigarette"), 1F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); public static final RegistryEntry WITHDRAWAL = registerStatusEffect("withdrawal", new WithdrawalEffect(StatusEffectCategory.HARMFUL, 0x4A412A) - .addAttributeModifier(EntityAttributes.GENERIC_MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "withdrawal"), + .addAttributeModifier(EntityAttributes.MOVEMENT_SPEED, Identifier.of(AcesBS.MOD_ID, "withdrawal"), -0.5F, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)); public static final RegistryEntry JITTERY = registerStatusEffect("jittery", diff --git a/src/main/java/com/acethewildfire/acesbs/effect/WithdrawalEffect.java b/src/main/java/com/acethewildfire/acesbs/effect/WithdrawalEffect.java index bb4d54c..6d21a05 100644 --- a/src/main/java/com/acethewildfire/acesbs/effect/WithdrawalEffect.java +++ b/src/main/java/com/acethewildfire/acesbs/effect/WithdrawalEffect.java @@ -3,6 +3,7 @@ package com.acethewildfire.acesbs.effect; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.effect.StatusEffect; import net.minecraft.entity.effect.StatusEffectCategory; +import net.minecraft.server.world.ServerWorld; public class WithdrawalEffect extends StatusEffect { protected WithdrawalEffect(StatusEffectCategory category, int color) { @@ -10,7 +11,7 @@ public class WithdrawalEffect extends StatusEffect { } @Override - public boolean applyUpdateEffect(LivingEntity entity, int amplifier) { + public boolean applyUpdateEffect(ServerWorld world, LivingEntity entity, int amplifier) { return true; } diff --git a/src/main/java/com/acethewildfire/acesbs/entity/ModEntities.java b/src/main/java/com/acethewildfire/acesbs/entity/ModEntities.java index e0fd820..4182026 100644 --- a/src/main/java/com/acethewildfire/acesbs/entity/ModEntities.java +++ b/src/main/java/com/acethewildfire/acesbs/entity/ModEntities.java @@ -16,6 +16,8 @@ import net.minecraft.item.Items; import net.minecraft.particle.ParticleTypes; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundEvents; import net.minecraft.util.ActionResult; @@ -23,20 +25,27 @@ import net.minecraft.util.Identifier; public class ModEntities { + private static final RegistryKey> FREN_KEY = + RegistryKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "fren")); + private static final RegistryKey> C_LEMON_KEY = + RegistryKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "combustible_lemon")); + private static final RegistryKey> VULGAR_BONES_KEY = + RegistryKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "vulgar_bones")); + public static final EntityType FREN = Registry.register(Registries.ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "fren"), - EntityType.Builder.create(FrenEntity::new, SpawnGroup.MONSTER) - .dimensions(0.6F, 1.7F).build()); + EntityType.Builder.create(FrenEntity::new, SpawnGroup.CREATURE) + .dimensions(0.6F, 1.7F).build(FREN_KEY)); public static final EntityType C_LEMON = Registry.register(Registries.ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "combustible_lemon"), EntityType.Builder.create(CombustibleLemonEntity::new, SpawnGroup.MISC) - .dimensions(0.5F, 0.5F).build()); + .dimensions(0.5F, 0.5F).build(C_LEMON_KEY)); public static final EntityType VULGAR_BONES = Registry.register(Registries.ENTITY_TYPE, Identifier.of(AcesBS.MOD_ID, "vulgar_bones"), EntityType.Builder.create(VulgarBones::new, SpawnGroup.MONSTER) - .dimensions(0.6F, 1.99F).build()); + .dimensions(0.6F, 1.99F).build(VULGAR_BONES_KEY)); public static void registerModEntities() { diff --git a/src/main/java/com/acethewildfire/acesbs/entity/client/CombustibleLemonModel.java b/src/main/java/com/acethewildfire/acesbs/entity/client/CombustibleLemonModel.java index c8d5067..08eed56 100644 --- a/src/main/java/com/acethewildfire/acesbs/entity/client/CombustibleLemonModel.java +++ b/src/main/java/com/acethewildfire/acesbs/entity/client/CombustibleLemonModel.java @@ -6,14 +6,16 @@ import net.minecraft.client.model.*; import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.entity.model.EntityModel; import net.minecraft.client.render.entity.model.EntityModelLayer; +import net.minecraft.client.render.entity.state.EntityRenderState; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.util.Identifier; -public class CombustibleLemonModel extends EntityModel { +public class CombustibleLemonModel extends EntityModel { public static final EntityModelLayer C_LEMON = new EntityModelLayer(Identifier.of(AcesBS.MOD_ID, "combustible_lemon"), "main"); private final ModelPart combustible_lemon; public CombustibleLemonModel(ModelPart root) { + super(root); this.combustible_lemon = root.getChild("combustible_lemon"); } @@ -28,12 +30,9 @@ public class CombustibleLemonModel extends EntityModel { .uv(40, 66).cuboid(4.0F, -11.0F, -6.0F, 3.0F, 4.0F, 3.0F, new Dilation(-2.0F)), ModelTransform.pivot(0.0F, 9.0F, 0.0F)); return TexturedModelData.of(modelData, 128, 128); } - @Override - public void setAngles(CombustibleLemonEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { - } - @Override - public void render(MatrixStack matrices, VertexConsumer vertexConsumer, int light, int overlay, int color) { - combustible_lemon.render(matrices, vertexConsumer, light, overlay, color); - } +// @Override +// public void render(MatrixStack matrices, VertexConsumer vertexConsumer, int light, int overlay, int color) { +// combustible_lemon.render(matrices, vertexConsumer, light, overlay, color); +// } } diff --git a/src/main/java/com/acethewildfire/acesbs/entity/client/CombustibleLemonRenderer.java b/src/main/java/com/acethewildfire/acesbs/entity/client/CombustibleLemonRenderer.java index 77f861a..f5bdb38 100644 --- a/src/main/java/com/acethewildfire/acesbs/entity/client/CombustibleLemonRenderer.java +++ b/src/main/java/com/acethewildfire/acesbs/entity/client/CombustibleLemonRenderer.java @@ -7,13 +7,14 @@ import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.entity.EntityRendererFactory; +import net.minecraft.client.render.entity.state.EntityRenderState; import net.minecraft.client.render.item.ItemRenderer; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.util.Identifier; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RotationAxis; -public class CombustibleLemonRenderer extends EntityRenderer { +public class CombustibleLemonRenderer extends EntityRenderer { protected CombustibleLemonModel model; public CombustibleLemonRenderer(EntityRendererFactory.Context ctx) { @@ -22,30 +23,30 @@ public class CombustibleLemonRenderer extends EntityRenderer extends SinglePartEntityModel { +public class FrenModel extends EntityModel { public static final EntityModelLayer FREN = new EntityModelLayer(Identifier.of(AcesBS.MOD_ID, "fren"), "main"); private final ModelPart root; private final ModelPart leg3; @@ -21,6 +21,7 @@ public class FrenModel extends SinglePartEntityModel { private final ModelPart body; public FrenModel(ModelPart root) { + super(root); this.root = root.getChild("root"); this.leg3 = this.root.getChild("leg3"); this.leg4 = this.root.getChild("leg4"); @@ -48,23 +49,23 @@ public class FrenModel extends SinglePartEntityModel { return TexturedModelData.of(modelData, 64, 32); } - @Override - public void render(MatrixStack matrices, VertexConsumer vertexConsumer, int light, int overlay, int color) { - root.render(matrices, vertexConsumer, light, overlay, color); - } +// @Override +// public void render(MatrixStack matrices, VertexConsumer vertexConsumer, int light, int overlay, int color) { +// root.render(matrices, vertexConsumer, light, overlay, color); +// } +// +// @Override +// public ModelPart getPart() { +// return root; +// } @Override - public ModelPart getPart() { - return root; - } + public void setAngles(FrenState state) { + super.setAngles(state); + this.setHeadAngles(state.yawDegrees, state.pitch); - @Override - public void setAngles(FrenEntity entity, float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch) { - this.getPart().traverse().forEach(ModelPart::resetTransform); - this.setHeadAngles(headYaw, headPitch); - - this.animateMovement(FrenAnimations.ANIM_FREN_WALK, limbAngle, limbDistance, 2f, 2.5f); - this.updateAnimation(entity.idleAnimationState, FrenAnimations.ANIM_FREN_IDLE, animationProgress, 1f); + this.animateWalking(FrenAnimations.ANIM_FREN_WALK, state.limbFrequency, state.limbAmplitudeMultiplier, 2f, 2.5f); + this.animate(state.idleAnimationState, FrenAnimations.ANIM_FREN_IDLE, state.age, 1f); } private void setHeadAngles(float headYaw, float headPitch) { diff --git a/src/main/java/com/acethewildfire/acesbs/entity/client/FrenRenderer.java b/src/main/java/com/acethewildfire/acesbs/entity/client/FrenRenderer.java index 99a78f4..bbcf4c9 100644 --- a/src/main/java/com/acethewildfire/acesbs/entity/client/FrenRenderer.java +++ b/src/main/java/com/acethewildfire/acesbs/entity/client/FrenRenderer.java @@ -8,25 +8,36 @@ import net.minecraft.client.render.entity.MobEntityRenderer; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.util.Identifier; -public class FrenRenderer extends MobEntityRenderer> { +public class FrenRenderer extends MobEntityRenderer { public FrenRenderer(EntityRendererFactory.Context context) { - super(context, new FrenModel<>(context.getPart(FrenModel.FREN)), 0.75f); + super(context, new FrenModel(context.getPart(FrenModel.FREN)), 0.75f); } @Override - public Identifier getTexture(FrenEntity entity) { + public Identifier getTexture(FrenState state) { return Identifier.of(AcesBS.MOD_ID, "textures/entity/fren/fren.png"); } @Override - public void render(FrenEntity livingEntity, float f, float g, MatrixStack matrixStack, + public void render(FrenState state, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) { - if(livingEntity.isBaby()) { + if(state.baby) { matrixStack.scale(0.5f, 0.5f, 0.5f); } else { matrixStack.scale(1f, 1f, 1f); } - super.render(livingEntity, f, g, matrixStack, vertexConsumerProvider, i); + super.render(state, matrixStack, vertexConsumerProvider, i); + } + + @Override + public FrenState createRenderState() { + return new FrenState(); + } + + @Override + public void updateRenderState(FrenEntity livingEntity, FrenState livingEntityRenderState, float f) { + super.updateRenderState(livingEntity, livingEntityRenderState, f); + livingEntityRenderState.idleAnimationState.copyFrom(livingEntity.idleAnimationState); } } \ No newline at end of file diff --git a/src/main/java/com/acethewildfire/acesbs/entity/client/FrenState.java b/src/main/java/com/acethewildfire/acesbs/entity/client/FrenState.java new file mode 100644 index 0000000..eab2e0d --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/entity/client/FrenState.java @@ -0,0 +1,8 @@ +package com.acethewildfire.acesbs.entity.client; + +import net.minecraft.client.render.entity.state.LivingEntityRenderState; +import net.minecraft.entity.AnimationState; + +public class FrenState extends LivingEntityRenderState { + public static final AnimationState idleAnimationState = new AnimationState(); +} diff --git a/src/main/java/com/acethewildfire/acesbs/entity/custom/BurningWizard.java b/src/main/java/com/acethewildfire/acesbs/entity/custom/BurningWizard.java deleted file mode 100644 index 9bf3289..0000000 --- a/src/main/java/com/acethewildfire/acesbs/entity/custom/BurningWizard.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.acethewildfire.acesbs.entity.custom; - -public class BurningWizard { -} diff --git a/src/main/java/com/acethewildfire/acesbs/entity/custom/CombustibleLemonEntity.java b/src/main/java/com/acethewildfire/acesbs/entity/custom/CombustibleLemonEntity.java index 2682662..6911b0b 100644 --- a/src/main/java/com/acethewildfire/acesbs/entity/custom/CombustibleLemonEntity.java +++ b/src/main/java/com/acethewildfire/acesbs/entity/custom/CombustibleLemonEntity.java @@ -38,10 +38,6 @@ public class CombustibleLemonEntity extends PersistentProjectileEntity { return rotation; } - public boolean isGrounded() { - return inGround; - } - @Override protected void onEntityHit(EntityHitResult entityHitResult) { super.onEntityHit(entityHitResult); diff --git a/src/main/java/com/acethewildfire/acesbs/entity/custom/FrenEntity.java b/src/main/java/com/acethewildfire/acesbs/entity/custom/FrenEntity.java index 8181269..2b97631 100644 --- a/src/main/java/com/acethewildfire/acesbs/entity/custom/FrenEntity.java +++ b/src/main/java/com/acethewildfire/acesbs/entity/custom/FrenEntity.java @@ -4,6 +4,7 @@ import com.acethewildfire.acesbs.entity.ModEntities; import com.acethewildfire.acesbs.item.ModItems; import net.minecraft.entity.AnimationState; import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnReason; import net.minecraft.entity.ai.goal.*; import net.minecraft.entity.attribute.DefaultAttributeContainer; import net.minecraft.entity.attribute.EntityAttributes; @@ -43,10 +44,11 @@ public class FrenEntity extends AnimalEntity { public static DefaultAttributeContainer.Builder createAttributes() { return MobEntity.createMobAttributes() - .add(EntityAttributes.GENERIC_MAX_HEALTH, 18) - .add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.25) - .add(EntityAttributes.GENERIC_ATTACK_DAMAGE, 0) // No damage - .add(EntityAttributes.GENERIC_FOLLOW_RANGE, 20); + .add(EntityAttributes.MAX_HEALTH, 18) + .add(EntityAttributes.MOVEMENT_SPEED, 0.25) + .add(EntityAttributes.ATTACK_DAMAGE, 0) // No damage + .add(EntityAttributes.FOLLOW_RANGE, 20) + .add(EntityAttributes.TEMPT_RANGE, 12); } private void setupAnimationStates() { @@ -69,7 +71,7 @@ public class FrenEntity extends AnimalEntity { @Override public @Nullable PassiveEntity createChild(ServerWorld world, PassiveEntity entity) { - return ModEntities.FREN.create(world); + return ModEntities.FREN.create(world, SpawnReason.BREEDING); } @Override diff --git a/src/main/java/com/acethewildfire/acesbs/item/AshenSteelItems.java b/src/main/java/com/acethewildfire/acesbs/item/AshenSteelItems.java index f8c15c7..6e25c7c 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/AshenSteelItems.java +++ b/src/main/java/com/acethewildfire/acesbs/item/AshenSteelItems.java @@ -4,49 +4,39 @@ import com.acethewildfire.acesbs.AcesBS; import com.acethewildfire.acesbs.item.custom.HammerItem; import com.acethewildfire.acesbs.item.custom.ModArmorItem; import net.minecraft.item.*; +import net.minecraft.item.equipment.EquipmentType; import net.minecraft.resource.featuretoggle.FeatureFlags; import net.minecraft.util.Identifier; public class AshenSteelItems { - public static final Item ASHEN_STEEL = ModItems.registerItem("ashen_steel", new Item(new Item.Settings())); + public static final Item ASHEN_STEEL = ModItems.registerItem("ashen_steel", Item::new); public static final Item ASHEN_STEEL_SWORD = ModItems.registerItem("ashen_steel_sword", - new SwordItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings() - .attributeModifiers(SwordItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 3, -2.4f)))); + setting -> new SwordItem(ModToolMaterials.ASHEN_STEEL, 3, -2.4f, setting)); public static final Item ASHEN_STEEL_SHOVEL = ModItems.registerItem("ashen_steel_shovel", - new ShovelItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings() - .attributeModifiers(ShovelItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 1.5F, -3.0F))) - ); + setting -> new ShovelItem(ModToolMaterials.ASHEN_STEEL, 1.5F, -3.0F, setting)); public static final Item ASHEN_STEEL_PICKAXE = ModItems.registerItem("ashen_steel_pickaxe", - new PickaxeItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings() - .attributeModifiers(PickaxeItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 1.0F, -2.8F))) - ); + setting -> new PickaxeItem(ModToolMaterials.ASHEN_STEEL, 1.0F, -2.8F, setting)); public static final Item ASHEN_STEEL_HAMMER = ModItems.registerItem("ashen_steel_hammer", - new HammerItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings() - .attributeModifiers(PickaxeItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 7.0F, -3.4F))) - ); + setting -> new HammerItem(ModToolMaterials.ASHEN_STEEL, 7.0F, -3.4F, setting)); public static final Item ASHEN_STEEL_AXE = ModItems.registerItem("ashen_steel_axe", - new AxeItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings() - .attributeModifiers(AxeItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, 6.0F, -3.1F))) - ); + setting -> new AxeItem(ModToolMaterials.ASHEN_STEEL, 6.0F, -3.1F, setting)); public static final Item ASHEN_STEEL_HOE = ModItems.registerItem("ashen_steel_hoe", - new HoeItem(ModToolMaterials.ASHEN_STEEL, new Item.Settings() - .attributeModifiers(HoeItem.createAttributeModifiers(ModToolMaterials.ASHEN_STEEL, -2.0F, -1.0F))) - ); + setting -> new HoeItem(ModToolMaterials.ASHEN_STEEL, -2.0F, -1.0F, setting)); public static final Item ASHEN_STEEL_HELMET = ModItems.registerItem("ashen_steel_helmet", - new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, ArmorItem.Type.HELMET, new Item.Settings() - .maxDamage(ArmorItem.Type.HELMET.getMaxDamage(15)))); + setting -> new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, EquipmentType.HELMET, setting + .maxDamage(EquipmentType.HELMET.getMaxDamage(15)))); public static final Item ASHEN_STEEL_CHESTPLATE = ModItems.registerItem("ashen_steel_chestplate", - new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, ArmorItem.Type.CHESTPLATE, new Item.Settings() - .maxDamage(ArmorItem.Type.CHESTPLATE.getMaxDamage(15)))); + setting -> new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, EquipmentType.CHESTPLATE, setting + .maxDamage(EquipmentType.CHESTPLATE.getMaxDamage(15)))); public static final Item ASHEN_STEEL_LEGGINGS = ModItems.registerItem("ashen_steel_leggings", - new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, ArmorItem.Type.LEGGINGS, new Item.Settings() - .maxDamage(ArmorItem.Type.LEGGINGS.getMaxDamage(15)))); + setting -> new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, EquipmentType.LEGGINGS, setting + .maxDamage(EquipmentType.LEGGINGS.getMaxDamage(15)))); public static final Item ASHEN_STEEL_BOOTS = ModItems.registerItem("ashen_steel_boots", - new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, ArmorItem.Type.BOOTS, new Item.Settings() - .maxDamage(ArmorItem.Type.BOOTS.getMaxDamage(15)))); + setting -> new ModArmorItem(ModArmorMaterials.ASHEN_STEEL_ARMOR_MATERIAL, EquipmentType.BOOTS, setting + .maxDamage(EquipmentType.BOOTS.getMaxDamage(15)))); public static final Item ASHEN_SMITHING_TEMPLATE = ModItems.registerItem("ashen_armor_trim_smithing_template", - SmithingTemplateItem.of(Identifier.of(AcesBS.MOD_ID, "ashen"), FeatureFlags.VANILLA)); + SmithingTemplateItem::of); public static void registerAshenItems() { // Do nothing, this just makes sure the items get registered diff --git a/src/main/java/com/acethewildfire/acesbs/item/ModArmorMaterials.java b/src/main/java/com/acethewildfire/acesbs/item/ModArmorMaterials.java index 9535612..ec84983 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/ModArmorMaterials.java +++ b/src/main/java/com/acethewildfire/acesbs/item/ModArmorMaterials.java @@ -1,9 +1,12 @@ package com.acethewildfire.acesbs.item; import com.acethewildfire.acesbs.AcesBS; +import com.acethewildfire.acesbs.util.ModTags; import net.minecraft.item.ArmorItem; -import net.minecraft.item.ArmorMaterial; import net.minecraft.item.Items; +import net.minecraft.item.equipment.ArmorMaterial; +import net.minecraft.item.equipment.EquipmentModel; +import net.minecraft.item.equipment.EquipmentType; import net.minecraft.recipe.Ingredient; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -17,59 +20,65 @@ import java.util.List; import java.util.function.Supplier; public class ModArmorMaterials { + public static EquipmentModel PRISMA = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "prisma_steel")).build(); + public static EquipmentModel ASHEN = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "ashen_steel")).build(); + public static EquipmentModel WILDFIRE = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "wildfire")).build(); + public static EquipmentModel PLATES = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "plates")).build(); + public static EquipmentModel BERSERKERS = EquipmentModel.builder().addHumanoidLayers(Identifier.of(AcesBS.MOD_ID, "berserkers")).build(); - public static final RegistryEntry PRISMA_STEEL_ARMOR_MATERIAL = registerArmorMaterial("prisma_steel", - () -> new ArmorMaterial(Util.make(new EnumMap<>(ArmorItem.Type.class), map -> { - map.put(ArmorItem.Type.BOOTS, 2); - map.put(ArmorItem.Type.LEGGINGS, 4); - map.put(ArmorItem.Type.CHESTPLATE, 6); - map.put(ArmorItem.Type.HELMET, 2); - map.put(ArmorItem.Type.BODY, 4); - }), 20, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, () -> Ingredient.ofItems(PrismaSteelItems.PRISMA_STEEL), - List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "prisma_steel"))), 0, 0)); + public static final ArmorMaterial PRISMA_STEEL_ARMOR_MATERIAL = new ArmorMaterial( + 500, + Util.make(new EnumMap<>(EquipmentType.class), map -> { + map.put(EquipmentType.BOOTS, 2); + map.put(EquipmentType.LEGGINGS, 4); + map.put(EquipmentType.CHESTPLATE, 6); + map.put(EquipmentType.HELMET, 2); + map.put(EquipmentType.BODY, 4); + }), 20, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 0, 0, ModTags.Items.PRISMA_REPAIR, + Identifier.of(AcesBS.MOD_ID, "prisma_steel")); - public static final RegistryEntry ASHEN_STEEL_ARMOR_MATERIAL = registerArmorMaterial("ashen_steel", - () -> new ArmorMaterial(Util.make(new EnumMap<>(ArmorItem.Type.class), map -> { - map.put(ArmorItem.Type.BOOTS, 2); - map.put(ArmorItem.Type.LEGGINGS, 4); - map.put(ArmorItem.Type.CHESTPLATE, 6); - map.put(ArmorItem.Type.HELMET, 2); - map.put(ArmorItem.Type.BODY, 4); - }), 20, SoundEvents.ITEM_ARMOR_EQUIP_IRON, () -> Ingredient.ofItems(AshenSteelItems.ASHEN_STEEL), - List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "ashen_steel"))), 0, 0)); + public static final ArmorMaterial ASHEN_STEEL_ARMOR_MATERIAL = new ArmorMaterial( + 500, + Util.make(new EnumMap<>(EquipmentType.class), map -> { + map.put(EquipmentType.BOOTS, 2); + map.put(EquipmentType.LEGGINGS, 4); + map.put(EquipmentType.CHESTPLATE, 6); + map.put(EquipmentType.HELMET, 2); + map.put(EquipmentType.BODY, 4); + }), 20, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 0, 0, ModTags.Items.ASHEN_REPAIR, + Identifier.of(AcesBS.MOD_ID, "ashen_steel")); - public static final RegistryEntry WILDFIRE_ARMOR_MATERIAL = registerArmorMaterial("wildfire", - () -> new ArmorMaterial(Util.make(new EnumMap<>(ArmorItem.Type.class), map -> { - map.put(ArmorItem.Type.BOOTS, 3); - map.put(ArmorItem.Type.LEGGINGS, 6); - map.put(ArmorItem.Type.CHESTPLATE, 8); - map.put(ArmorItem.Type.HELMET, 3); - map.put(ArmorItem.Type.BODY, 11); - }), 20, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, () -> Ingredient.ofItems(ModItems.INFERNAL_ASHES), - List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "wildfire"))), 0, 0)); + public static final ArmorMaterial WILDFIRE_ARMOR_MATERIAL = new ArmorMaterial( + 500, + Util.make(new EnumMap<>(EquipmentType.class), map -> { + map.put(EquipmentType.BOOTS, 3); + map.put(EquipmentType.LEGGINGS, 6); + map.put(EquipmentType.CHESTPLATE, 8); + map.put(EquipmentType.HELMET, 3); + map.put(EquipmentType.BODY, 11); + }), 20, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0, 0, ModTags.Items.WILDFIRE_REPAIR, + Identifier.of(AcesBS.MOD_ID, "wildfire")); - public static final RegistryEntry PLATES = registerArmorMaterial("plates", - () -> new ArmorMaterial(Util.make(new EnumMap<>(ArmorItem.Type.class), map -> { - map.put(ArmorItem.Type.BOOTS, 0); - map.put(ArmorItem.Type.LEGGINGS, 0); - map.put(ArmorItem.Type.CHESTPLATE, 0); - map.put(ArmorItem.Type.HELMET, 0); - map.put(ArmorItem.Type.BODY, 0); - }), 20, SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE, () -> Ingredient.ofItems(PrismaSteelItems.PRISMA_STEEL), - List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "plates"))), 0, 0)); + public static final ArmorMaterial PLATES_ARMOR_MATERIAL = new ArmorMaterial( + 500, + Util.make(new EnumMap<>(EquipmentType.class), map -> { + map.put(EquipmentType.BOOTS, 0); + map.put(EquipmentType.LEGGINGS, 0); + map.put(EquipmentType.CHESTPLATE, 0); + map.put(EquipmentType.HELMET, 0); + map.put(EquipmentType.BODY, 0); + }), 20, SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE, 0, 0, ModTags.Items.PLATES_REPAIR, + Identifier.of(AcesBS.MOD_ID, "plates")); - public static final RegistryEntry BERSERKERS = registerArmorMaterial("berserkers", - () -> new ArmorMaterial(Util.make(new EnumMap<>(ArmorItem.Type.class), map -> { - map.put(ArmorItem.Type.BOOTS, 2); - map.put(ArmorItem.Type.LEGGINGS, 4); - map.put(ArmorItem.Type.CHESTPLATE, 6); - map.put(ArmorItem.Type.HELMET, 2); - map.put(ArmorItem.Type.BODY, 4); - }), 20, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, () -> Ingredient.ofItems(Items.LEATHER), - List.of(new ArmorMaterial.Layer(Identifier.of(AcesBS.MOD_ID, "berserkers"))), 0, 0)); + public static final ArmorMaterial BERSERKERS_ARMOR_MATERIAL = new ArmorMaterial( + 500, + Util.make(new EnumMap<>(EquipmentType.class), map -> { + map.put(EquipmentType.BOOTS, 2); + map.put(EquipmentType.LEGGINGS, 4); + map.put(EquipmentType.CHESTPLATE, 6); + map.put(EquipmentType.HELMET, 2); + map.put(EquipmentType.BODY, 4); + }), 20, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0, 0, ModTags.Items.BERSERKERS_REPAIR, + Identifier.of(AcesBS.MOD_ID, "berserkers")); - public static RegistryEntry registerArmorMaterial(String name, Supplier material){ - - return Registry.registerReference(Registries.ARMOR_MATERIAL, Identifier.of(AcesBS.MOD_ID, name), material.get()); - } } diff --git a/src/main/java/com/acethewildfire/acesbs/item/ModFoodComponent.java b/src/main/java/com/acethewildfire/acesbs/item/ModFoodComponent.java index 9c809a2..abdb338 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/ModFoodComponent.java +++ b/src/main/java/com/acethewildfire/acesbs/item/ModFoodComponent.java @@ -1,15 +1,17 @@ package com.acethewildfire.acesbs.item; import com.acethewildfire.acesbs.effect.ModEffects; +import net.minecraft.component.type.ConsumableComponent; +import net.minecraft.component.type.ConsumableComponents; import net.minecraft.component.type.FoodComponent; import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.item.consume.ApplyEffectsConsumeEffect; public class ModFoodComponent { public static final FoodComponent LEMON = new FoodComponent.Builder() .nutrition(3) .saturationModifier(0.25f) - .statusEffect(new StatusEffectInstance(ModEffects.LEMON, 200), 0.8f) .build(); public static final FoodComponent COOKED_LEMON = new FoodComponent.Builder() .nutrition(6) @@ -19,19 +21,28 @@ public class ModFoodComponent { public static final FoodComponent INFERNAL_BEEF = new FoodComponent.Builder() .nutrition(20) .saturationModifier(0.5f) - .statusEffect(new StatusEffectInstance(ModEffects.INFERNAL_FIRE, 200), 0.2f) .alwaysEdible() .build(); public static final FoodComponent BRICKED_UP = new FoodComponent.Builder() .nutrition(0) .saturationModifier(0f) - .statusEffect(new StatusEffectInstance(ModEffects.BRICKED_UP, 160), 1f) .alwaysEdible() .build(); public static final FoodComponent CIGARETTE = new FoodComponent.Builder() .nutrition(0) .saturationModifier(0f) - .statusEffect(new StatusEffectInstance(ModEffects.CIGARETTE, 6000), 1f) .alwaysEdible() .build(); + + public static final ConsumableComponent LEMON_EFFECT = ConsumableComponents.food() + .consumeEffect(new ApplyEffectsConsumeEffect(new StatusEffectInstance(ModEffects.LEMON, 200), 0.8f)).build(); + + public static final ConsumableComponent INFERNAL_FIRE_EFFECT = ConsumableComponents.food() + .consumeEffect(new ApplyEffectsConsumeEffect(new StatusEffectInstance(ModEffects.INFERNAL_FIRE, 200), 0.2f)).build(); + + public static final ConsumableComponent BRICKED_UP_EFFECT = ConsumableComponents.food() + .consumeEffect(new ApplyEffectsConsumeEffect(new StatusEffectInstance(ModEffects.BRICKED_UP, 160), 1f)).build(); + + public static final ConsumableComponent CIGARETTE_EFFECT = ConsumableComponents.food() + .consumeEffect(new ApplyEffectsConsumeEffect(new StatusEffectInstance(ModEffects.CIGARETTE, 6000), 1f)).build(); } diff --git a/src/main/java/com/acethewildfire/acesbs/item/ModItems.java b/src/main/java/com/acethewildfire/acesbs/item/ModItems.java index e430acf..fe825d6 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/ModItems.java +++ b/src/main/java/com/acethewildfire/acesbs/item/ModItems.java @@ -9,6 +9,7 @@ import com.acethewildfire.acesbs.potion.ModPotions; import com.acethewildfire.acesbs.sounds.ModSounds; import net.fabricmc.fabric.api.event.player.AttackEntityCallback; import net.minecraft.client.gui.screen.Screen; +import net.minecraft.component.ComponentType; import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.*; import net.minecraft.entity.LivingEntity; @@ -17,9 +18,12 @@ import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffects; import net.minecraft.item.*; +import net.minecraft.item.equipment.EquipmentType; import net.minecraft.item.tooltip.TooltipType; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.RegistryKeys; import net.minecraft.text.Text; import net.minecraft.util.ActionResult; import net.minecraft.util.Formatting; @@ -27,18 +31,19 @@ import net.minecraft.util.Identifier; import java.util.List; import java.util.Objects; +import java.util.function.Function; public class ModItems { - public static final Item ORACLE_LEMON = registerItem("oracle_lemon", new OracleLemon(new Item.Settings().component(DataComponentTypes.POTION_CONTENTS, new PotionContentsComponent(ModPotions.LEMON)))); - public static final Item WAND = registerItem("wand", new Wand(new Item.Settings().maxDamage(32))); - public static final Item RAW_ENTROPY = registerItem("raw_entropy", new Item(new Item.Settings())); - public static final Item STABLE_ENTROPY = registerItem("stable_entropy", new Item(new Item.Settings())); - public static final Item RAW_ENDTROPY = registerItem("raw_endtropy", new Item(new Item.Settings())); - public static final Item STABLE_ENDTROPY = registerItem("stable_endtropy", new Item(new Item.Settings())); - public static final Item INFERNAL_ASHES = registerItem("infernal_ashes", new Item(new Item.Settings())); + public static final Item ORACLE_LEMON = registerItem("oracle_lemon", setting -> new OracleLemon(setting.component(DataComponentTypes.POTION_CONTENTS, new PotionContentsComponent(ModPotions.LEMON)))); + public static final Item WAND = registerItem("wand", setting -> new Wand(setting.maxDamage(32))); + public static final Item RAW_ENTROPY = registerItem("raw_entropy", Item::new); + public static final Item STABLE_ENTROPY = registerItem("stable_entropy", Item::new); + public static final Item RAW_ENDTROPY = registerItem("raw_endtropy", Item::new); + public static final Item STABLE_ENDTROPY = registerItem("stable_endtropy", Item::new); + public static final Item INFERNAL_ASHES = registerItem("infernal_ashes", Item::new); public static final Item INFERNAL_BEEF = registerItem("infernal_beef", - new Item(new Item.Settings() - .food(ModFoodComponent.INFERNAL_BEEF) + setting -> new Item(setting + .food(ModFoodComponent.INFERNAL_BEEF, ModFoodComponent.INFERNAL_FIRE_EFFECT) .fireproof() .component(DataComponentTypes.LORE, new LoreComponent( List.of( @@ -48,8 +53,8 @@ public class ModItems { )) )); public static final Item BRICKED_UP = registerItem("bricked_up", - new Item(new Item.Settings() - .food(ModFoodComponent.BRICKED_UP) + setting -> new Item(setting + .food(ModFoodComponent.BRICKED_UP, ModFoodComponent.BRICKED_UP_EFFECT) .component(DataComponentTypes.LORE, new LoreComponent( List.of( Text.literal("Straight to God").formatted(Formatting.GOLD, Formatting.ITALIC) @@ -58,7 +63,7 @@ public class ModItems { )); public static final Item COMBUSTIBLE_LEMON = registerItem("combustible_lemon", - new CombustibleLemon(new Item.Settings().maxCount(16)){ + setting -> new CombustibleLemon(setting.maxCount(16)){ @Override public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { tooltip.add(Text.translatable("tooltip.acesbs.combustible_lemon1")); @@ -67,9 +72,9 @@ public class ModItems { } }); - public static final Item LEMON = registerItem("lemon", new Item(new Item.Settings().food(ModFoodComponent.LEMON))); - public static final Item COOKED_LEMON = registerItem("cooked_lemon", new Item(new Item.Settings().food(ModFoodComponent.COOKED_LEMON))); - public static final Item GREEN_BRICKS = registerItem("green_bricks", new Item(new Item.Settings()) { + public static final Item LEMON = registerItem("lemon", setting -> new Item(setting.food(ModFoodComponent.LEMON, ModFoodComponent.LEMON_EFFECT))); + public static final Item COOKED_LEMON = registerItem("cooked_lemon", setting -> new Item(setting.food(ModFoodComponent.COOKED_LEMON))); + public static final Item GREEN_BRICKS = registerItem("green_bricks", setting -> new Item(setting) { @Override public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { if(!Screen.hasShiftDown()){ @@ -82,31 +87,31 @@ public class ModItems { } }); - public static final Item MOTE_OF_ORDER = registerItem("mote_of_order", new Item(new Item.Settings()) { + public static final Item MOTE_OF_ORDER = registerItem("mote_of_order", setting -> new Item(setting) { public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { tooltip.add(Text.translatable("tooltip.acesbs.mote_of_order")); super.appendTooltip(stack, context, tooltip, type); } }); - public static final Item DUST_OF_ORDER = registerItem("dust_of_order", new Item(new Item.Settings()) { + public static final Item DUST_OF_ORDER = registerItem("dust_of_order", setting -> new Item(setting) { public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { tooltip.add(Text.translatable("tooltip.acesbs.dust_of_order")); super.appendTooltip(stack, context, tooltip, type); } }); - public static final Item INGOT_OF_ORDER = registerItem("ingot_of_order", new Item(new Item.Settings()) { + public static final Item INGOT_OF_ORDER = registerItem("ingot_of_order", setting -> new Item(setting) { public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { tooltip.add(Text.translatable("tooltip.acesbs.ingot_of_order")); super.appendTooltip(stack, context, tooltip, type); } }); - public static final Item COMMAND_CORE = registerItem("command_core", new CommandCore(new Item.Settings().maxCount(1))); + public static final Item COMMAND_CORE = registerItem("command_core", setting -> new CommandCore(setting.maxCount(1))); public static final Item KAUPEN_BOW = registerItem("kaupen_bow", - new BowItem(new Item.Settings().maxDamage(500)) { + setting -> new BowItem(setting.maxDamage(500)) { @Override public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { @@ -122,29 +127,27 @@ public class ModItems { }); public static final Item THOT_BEGONE = ModItems.registerItem("thot_begone", - new SwordItem(ToolMaterials.WOOD, new Item.Settings() - .attributeModifiers(SwordItem.createAttributeModifiers(ToolMaterials.WOOD, 0, -1.4f)) - .attributeModifiers(AttributeModifiersComponent.builder() - .add(EntityAttributes.GENERIC_ATTACK_KNOCKBACK, - new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.attack_knockback"), 25, EntityAttributeModifier.Operation.ADD_VALUE), AttributeModifierSlot.MAINHAND) - .add(EntityAttributes.GENERIC_ATTACK_DAMAGE, - new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.attack_damage"), -0.999, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL), AttributeModifierSlot.MAINHAND) - .build()) - - )); + setting -> new SwordItem(ToolMaterial.WOOD, 0, -1.4f, setting.attributeModifiers( + AttributeModifiersComponent.builder() + .add(EntityAttributes.ATTACK_KNOCKBACK, new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "attack.attack_knockback"), 25, EntityAttributeModifier.Operation.ADD_VALUE), AttributeModifierSlot.MAINHAND) + .add(EntityAttributes.ATTACK_DAMAGE, new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.attack_damage"), -0.999, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL), AttributeModifierSlot.MAINHAND) + .build() + ))); public static final Item CRAB_RAVE_MUSIC_DISC = registerItem("crab_rave_music_disc", - new Item(new Item.Settings().jukeboxPlayable(ModSounds.CRAB_RAVE_KEY).maxCount(1))); + setting -> new Item(setting.jukeboxPlayable(ModSounds.CRAB_RAVE_KEY).maxCount(1))); + + public static final Item BERSERKERS_PAULDRON = registerItem("berserkers_pauldron", - new ModArmorItem(ModArmorMaterials.BERSERKERS, ArmorItem.Type.CHESTPLATE, new Item.Settings() - .maxDamage(ArmorItem.Type.CHESTPLATE.getMaxDamage(15)) + setting -> new ModArmorItem(ModArmorMaterials.BERSERKERS_ARMOR_MATERIAL, EquipmentType.CHESTPLATE, setting + .maxDamage(EquipmentType.CHESTPLATE.getMaxDamage(15)) .attributeModifiers(AttributeModifiersComponent.builder() - .add(EntityAttributes.GENERIC_MAX_HEALTH, + .add(EntityAttributes.MAX_HEALTH, new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.max_health"), 20, EntityAttributeModifier.Operation.ADD_VALUE), AttributeModifierSlot.CHEST) - .add(EntityAttributes.GENERIC_ARMOR, + .add(EntityAttributes.ARMOR, new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.armor"), -20, EntityAttributeModifier.Operation.ADD_VALUE), AttributeModifierSlot.CHEST) - .add(EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE, + .add(EntityAttributes.KNOCKBACK_RESISTANCE, new EntityAttributeModifier(Identifier.of(AcesBS.MOD_ID, "generic.knockback_resistance"), 1.0f, EntityAttributeModifier.Operation.ADD_VALUE), AttributeModifierSlot.CHEST) .build())){ @Override @@ -163,7 +166,7 @@ public class ModItems { ); public static final Item SOVS_PLATE_CARRIER = ModItems.registerItem("sovs_plate_carrier", - new SovsPlateCarrierArmorItem(ModArmorMaterials.PLATES, ArmorItem.Type.CHESTPLATE, new Item.Settings() + setting -> new SovsPlateCarrierArmorItem(ModArmorMaterials.PLATES_ARMOR_MATERIAL, EquipmentType.CHESTPLATE, setting .maxDamage(6)){ @Override public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { @@ -181,8 +184,8 @@ public class ModItems { }); public static final Item WILDFIRE_BOOTS = registerItem("wildfire_boots", - new WildfireArmorItem(ModArmorMaterials.WILDFIRE_ARMOR_MATERIAL, ArmorItem.Type.BOOTS, new Item.Settings() - .maxDamage(ArmorItem.Type.BOOTS.getMaxDamage(15))){ + setting -> new WildfireArmorItem(ModArmorMaterials.WILDFIRE_ARMOR_MATERIAL, EquipmentType.BOOTS, setting + .maxDamage(EquipmentType.BOOTS.getMaxDamage(15))){ @Override public void appendTooltip(ItemStack stack, TooltipContext context, List tooltip, TooltipType type) { if(!Screen.hasShiftDown()){ @@ -198,25 +201,26 @@ public class ModItems { } ); - public static final Item TOBACCO_SEEDS = registerItem("tobacco_seeds", new AliasedBlockItem(ModBlocks.TOBACCO_CROP, new Item.Settings())); + public static final Item TOBACCO_SEEDS = registerItem("tobacco_seeds", setting -> new BlockItem(ModBlocks.TOBACCO_CROP, setting)); - public static final Item TOBACCO = registerItem("tobacco", new Item(new Item.Settings())); + public static final Item TOBACCO = registerItem("tobacco", setting -> new Item(setting)); - public static final Item CIGARETTE = registerItem("cigarette", new Cigarette(new Item.Settings().maxCount(20))); - public static final Item CIGARETTE_LEMON = registerItem("cigarette_lemon", new CigaretteLemon(new Item.Settings().maxCount(20))); - public static final Item CIGARETTE_FUNNY = registerItem("cigarette_funny", new CigaretteFunny(new Item.Settings().maxCount(20))); - public static final Item BUBBLE_PIPE = registerItem("bubble_pipe", new BubblePipe(new Item.Settings().maxCount(1))); - public static final Item AQUARIUM_GRAVEL = registerItem("aquarium_gravel", new AquariumGravel(new Item.Settings().maxCount(1))); + public static final Item CIGARETTE = registerItem("cigarette", setting -> new Cigarette(setting.maxCount(20))); + public static final Item CIGARETTE_LEMON = registerItem("cigarette_lemon", setting -> new CigaretteLemon(setting.maxCount(20))); + public static final Item CIGARETTE_FUNNY = registerItem("cigarette_funny", setting -> new CigaretteFunny(setting.maxCount(20))); + public static final Item BUBBLE_PIPE = registerItem("bubble_pipe", setting -> new BubblePipe(setting.maxCount(1))); + public static final Item AQUARIUM_GRAVEL = registerItem("aquarium_gravel", setting -> new AquariumGravel(setting.maxCount(1))); public static final Item FREN_SPAWN_EGG = registerItem("fren_spawn_egg", - new SpawnEggItem(ModEntities.FREN, 894731, 0, new Item.Settings())); + setting -> new SpawnEggItem(ModEntities.FREN, 894731, 0, setting)); public static final Item VULGAR_BONES_SPAWN_EGG = registerItem("vulgar_bones_spawn_egg", - new SpawnEggItem(ModEntities.VULGAR_BONES, 13082270, 0, new Item.Settings())); + setting -> new SpawnEggItem(ModEntities.VULGAR_BONES, 13082270, 0, setting)); - public static Item registerItem(String name, Item item){ - return Registry.register(Registries.ITEM, Identifier.of(AcesBS.MOD_ID, name), item); + public static Item registerItem(String name, Function function) { + return Registry.register(Registries.ITEM, Identifier.of(AcesBS.MOD_ID, name), + function.apply(new Item.Settings().registryKey(RegistryKey.of(RegistryKeys.ITEM, Identifier.of(AcesBS.MOD_ID, name))))); } public static void registerModItems() { diff --git a/src/main/java/com/acethewildfire/acesbs/item/ModToolMaterials.java b/src/main/java/com/acethewildfire/acesbs/item/ModToolMaterials.java index b9d4837..9919c16 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/ModToolMaterials.java +++ b/src/main/java/com/acethewildfire/acesbs/item/ModToolMaterials.java @@ -9,99 +9,11 @@ import net.minecraft.registry.tag.TagKey; import java.util.function.Supplier; -public enum ModToolMaterials implements ToolMaterial { -// WOOD(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 59, 2.0F, 0.0F, 15, () -> Ingredient.fromTag(ItemTags.PLANKS)), -// STONE(BlockTags.INCORRECT_FOR_STONE_TOOL, 131, 4.0F, 1.0F, 5, () -> Ingredient.fromTag(ItemTags.STONE_TOOL_MATERIALS)), -// IRON(BlockTags.INCORRECT_FOR_IRON_TOOL, 250, 6.0F, 2.0F, 14, () -> Ingredient.ofItems(Items.IRON_INGOT)), -// DIAMOND(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 1561, 8.0F, 3.0F, 10, () -> Ingredient.ofItems(Items.DIAMOND)), -// GOLD(BlockTags.INCORRECT_FOR_GOLD_TOOL, 32, 12.0F, 0.0F, 22, () -> Ingredient.ofItems(Items.GOLD_INGOT)), -// NETHERITE(BlockTags.INCORRECT_FOR_NETHERITE_TOOL, 2031, 9.0F, 4.0F, 15, () -> Ingredient.ofItems(Items.NETHERITE_INGOT)); +public class ModToolMaterials { -// public static ToolMaterial PRISMA_STEEL = new ToolMaterial(ModTags.Blocks.INCORRECT_FOR_PRISMA_STEEL_TOOL, 750, 8.0F, 2.0F, 22, ModTags.Items.PRISMA_REPAIR) { -// @Override -// public int getDurability() { -// return 0; -// } -// -// @Override -// public float getMiningSpeedMultiplier() { -// return 0; -// } -// -// @Override -// public float getAttackDamage() { -// return 0; -// } -// -// @Override -// public TagKey getInverseTag() { -// return null; -// } -// -// @Override -// public int getEnchantability() { -// return 0; -// } -// -// @Override -// public Ingredient getRepairIngredient() { -// return null; -// } -// }; + public static ToolMaterial PRISMA_STEEL = new ToolMaterial(ModTags.Blocks.INCORRECT_FOR_PRISMA_STEEL_TOOL, + 750, 8.0F, 2.0F, 22, ModTags.Items.PRISMA_REPAIR); + public static ToolMaterial ASHEN_STEEL = new ToolMaterial(ModTags.Blocks.INCORRECT_FOR_ASHEN_STEEL_TOOL, + 750, 8.0F, 2.0F, 22, ModTags.Items.ASHEN_REPAIR); - PRISMA_STEEL(ModTags.Blocks.INCORRECT_FOR_PRISMA_STEEL_TOOL, 750, 8.0F, 2.0F, 22, () -> Ingredient.ofItems(PrismaSteelItems.PRISMA_STEEL)), - ASHEN_STEEL(ModTags.Blocks.INCORRECT_FOR_PRISMA_STEEL_TOOL, 750, 8.0F, 2.0F, 22, () -> Ingredient.ofItems(AshenSteelItems.ASHEN_STEEL)); - - private final TagKey inverseTag; - private final int itemDurability; - private final float miningSpeed; - private final float attackDamage; - private final int enchantability; - private final Supplier repairIngredient; - - private ModToolMaterials( - final TagKey inverseTag, - final int itemDurability, - final float miningSpeed, - final float attackDamage, - final int enchantability, - final Supplier repairIngredient - ) { - this.inverseTag = inverseTag; - this.itemDurability = itemDurability; - this.miningSpeed = miningSpeed; - this.attackDamage = attackDamage; - this.enchantability = enchantability; - this.repairIngredient = Suppliers.memoize(repairIngredient::get); - } - - @Override - public int getDurability() { - return this.itemDurability; - } - - @Override - public float getMiningSpeedMultiplier() { - return this.miningSpeed; - } - - @Override - public float getAttackDamage() { - return this.attackDamage; - } - - @Override - public TagKey getInverseTag() { - return this.inverseTag; - } - - @Override - public int getEnchantability() { - return this.enchantability; - } - - @Override - public Ingredient getRepairIngredient() { - return this.repairIngredient.get(); - } } diff --git a/src/main/java/com/acethewildfire/acesbs/item/PrismaSteelItems.java b/src/main/java/com/acethewildfire/acesbs/item/PrismaSteelItems.java index 11147db..b90a9c9 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/PrismaSteelItems.java +++ b/src/main/java/com/acethewildfire/acesbs/item/PrismaSteelItems.java @@ -1,52 +1,40 @@ package com.acethewildfire.acesbs.item; -import com.acethewildfire.acesbs.AcesBS; import com.acethewildfire.acesbs.item.custom.HammerItem; import com.acethewildfire.acesbs.item.custom.ModArmorItem; import net.minecraft.item.*; -import net.minecraft.resource.featuretoggle.FeatureFlags; -import net.minecraft.util.Identifier; +import net.minecraft.item.equipment.EquipmentType; + public class PrismaSteelItems { - public static final Item PRISMA_STEEL = ModItems.registerItem("prisma_steel", new Item(new Item.Settings())); + public static final Item PRISMA_STEEL = ModItems.registerItem("prisma_steel", Item::new); public static final Item PRISMA_STEEL_SWORD = ModItems.registerItem("prisma_steel_sword", - new SwordItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings() - .attributeModifiers(SwordItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 3, -2.4f)))); + setting -> new SwordItem(ModToolMaterials.PRISMA_STEEL, 3, -2.4f, setting)); public static final Item PRISMA_STEEL_SHOVEL = ModItems.registerItem("prisma_steel_shovel", - new ShovelItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings() - .attributeModifiers(ShovelItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 1.5F, -3.0F))) - ); + setting -> new ShovelItem(ModToolMaterials.PRISMA_STEEL, 1.5F, -3.0F, setting)); public static final Item PRISMA_STEEL_PICKAXE = ModItems.registerItem("prisma_steel_pickaxe", - new PickaxeItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings() - .attributeModifiers(PickaxeItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 1.0F, -2.8F))) - ); + setting -> new PickaxeItem(ModToolMaterials.PRISMA_STEEL, 1.0F, -2.8F, setting)); public static final Item PRISMA_STEEL_HAMMER = ModItems.registerItem("prisma_steel_hammer", - new HammerItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings() - .attributeModifiers(PickaxeItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 7.0F, -3.4F))) - ); + setting -> new HammerItem(ModToolMaterials.PRISMA_STEEL, 7.0F, -3.4F, setting)); public static final Item PRISMA_STEEL_AXE = ModItems.registerItem("prisma_steel_axe", - new AxeItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings() - .attributeModifiers(AxeItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, 6.0F, -3.1F))) - ); + setting -> new AxeItem(ModToolMaterials.PRISMA_STEEL, 6.0F, -3.1F, setting)); public static final Item PRISMA_STEEL_HOE = ModItems.registerItem("prisma_steel_hoe", - new HoeItem(ModToolMaterials.PRISMA_STEEL, new Item.Settings() - .attributeModifiers(HoeItem.createAttributeModifiers(ModToolMaterials.PRISMA_STEEL, -2.0F, -1.0F))) - ); + setting -> new HoeItem(ModToolMaterials.PRISMA_STEEL, -2.0F, -1.0F, setting)); public static final Item PRISMA_STEEL_HELMET = ModItems.registerItem("prisma_steel_helmet", - new ModArmorItem(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, ArmorItem.Type.HELMET, new Item.Settings() - .maxDamage(ArmorItem.Type.HELMET.getMaxDamage(15)))); + setting -> new ModArmorItem(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, EquipmentType.HELMET, setting + .maxDamage(EquipmentType.HELMET.getMaxDamage(15)))); public static final Item PRISMA_STEEL_CHESTPLATE = ModItems.registerItem("prisma_steel_chestplate", - new ModArmorItem(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, ArmorItem.Type.CHESTPLATE, new Item.Settings() - .maxDamage(ArmorItem.Type.CHESTPLATE.getMaxDamage(15)))); + setting -> new ModArmorItem(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, EquipmentType.CHESTPLATE, setting + .maxDamage(EquipmentType.CHESTPLATE.getMaxDamage(15)))); public static final Item PRISMA_STEEL_LEGGINGS = ModItems.registerItem("prisma_steel_leggings", - new ModArmorItem(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, ArmorItem.Type.LEGGINGS, new Item.Settings() - .maxDamage(ArmorItem.Type.LEGGINGS.getMaxDamage(15)))); + setting -> new ModArmorItem(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, EquipmentType.LEGGINGS, setting + .maxDamage(EquipmentType.LEGGINGS.getMaxDamage(15)))); public static final Item PRISMA_STEEL_BOOTS = ModItems.registerItem("prisma_steel_boots", - new ModArmorItem(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, ArmorItem.Type.BOOTS, new Item.Settings() - .maxDamage(ArmorItem.Type.BOOTS.getMaxDamage(15)))); + setting -> new ModArmorItem(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, EquipmentType.BOOTS, setting + .maxDamage(EquipmentType.BOOTS.getMaxDamage(15)))); public static final Item PRISMA_SMITHING_TEMPLATE = ModItems.registerItem("prisma_armor_trim_smithing_template", - SmithingTemplateItem.of(Identifier.of(AcesBS.MOD_ID, "prisma"), FeatureFlags.VANILLA)); + SmithingTemplateItem::of); public static void registerPrismaItems() { // Do nothing, this just makes sure the items get registered diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/AquariumGravel.java b/src/main/java/com/acethewildfire/acesbs/item/custom/AquariumGravel.java index 68f7027..78ab774 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/AquariumGravel.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/AquariumGravel.java @@ -1,24 +1,15 @@ package com.acethewildfire.acesbs.item.custom; -import com.acethewildfire.acesbs.component.ModDataComponentTypes; -import com.acethewildfire.acesbs.effect.ModEffects; import com.acethewildfire.acesbs.sounds.ModSounds; import com.acethewildfire.acesbs.sounds.PlayerAttachedSound; -import com.acethewildfire.acesbs.util.ModStats; -import net.minecraft.client.MinecraftClient; import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.particle.ParticleTypes; +import net.minecraft.item.consume.UseAction; import net.minecraft.sound.SoundCategory; -import net.minecraft.sound.SoundEvent; -import net.minecraft.sound.SoundEvents; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; -import net.minecraft.util.UseAction; -import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; public class AquariumGravel extends Item { @@ -30,12 +21,12 @@ public class AquariumGravel extends Item { private static PlayerAttachedSound activeSound; @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { + public ActionResult use(World world, PlayerEntity user, Hand hand) { ItemStack stack = user.getStackInHand(hand); user.setCurrentHand(hand); - return TypedActionResult.consume(stack); + return ActionResult.CONSUME; } @Override @@ -43,11 +34,6 @@ public class AquariumGravel extends Item { return UseAction.EAT; } - @Override - public SoundEvent getEatSound() { - return ModSounds.CRUNCH; - } - @Override public int getMaxUseTime(ItemStack stack, LivingEntity user) { return 32; // basically infinite hold @@ -60,6 +46,16 @@ public class AquariumGravel extends Item { @Override public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user) { + world.playSound( + null, + user.getX(), + user.getY(), + user.getZ(), + ModSounds.CRUNCH, + SoundCategory.PLAYERS, + 1.0F, + 1.0F + ); return stack; } } diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/BubblePipe.java b/src/main/java/com/acethewildfire/acesbs/item/custom/BubblePipe.java index 7c7e4d5..7144181 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/BubblePipe.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/BubblePipe.java @@ -1,10 +1,7 @@ package com.acethewildfire.acesbs.item.custom; -import com.acethewildfire.acesbs.AcesBS; import com.acethewildfire.acesbs.component.ModDataComponentTypes; import com.acethewildfire.acesbs.effect.ModEffects; -import com.acethewildfire.acesbs.item.ModItems; -import com.acethewildfire.acesbs.sounds.ModSounds; import com.acethewildfire.acesbs.sounds.PlayerAttachedSound; import com.acethewildfire.acesbs.util.ModStats; import net.minecraft.client.MinecraftClient; @@ -13,48 +10,37 @@ import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.consume.UseAction; import net.minecraft.particle.ParticleTypes; -import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; -import net.minecraft.stat.Stats; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; -import net.minecraft.util.UseAction; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import static com.acethewildfire.acesbs.util.ModStats.grantAdvancement; - public class BubblePipe extends Item { public BubblePipe(Settings settings) { super(settings); } - // Store the currently playing sound (client only) - private static PlayerAttachedSound activeSound; - @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { - if (!user.getItemCooldownManager().isCoolingDown(this)) { + public ActionResult use(World world, PlayerEntity user, Hand hand) { + if (!user.getItemCooldownManager().isCoolingDown(user.getStackInHand(hand))) { user.setCurrentHand(hand); user.getStackInHand(hand).set(ModDataComponentTypes.SMOKING, true); - return TypedActionResult.consume(user.getStackInHand(hand)); + return ActionResult.CONSUME; } - return TypedActionResult.fail(user.getStackInHand(hand)); + return ActionResult.FAIL; } @Override - public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { + public boolean onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { super.onStoppedUsing(stack, world, user, remainingUseTicks); - if (activeSound != null) { - MinecraftClient.getInstance().getSoundManager().stop(activeSound); - activeSound = null; - } - stack.set(ModDataComponentTypes.SMOKING, false); + return false; } @Override @@ -62,11 +48,6 @@ public class BubblePipe extends Item { return UseAction.TOOT_HORN; } - @Override - public SoundEvent getEatSound() { - return SoundEvents.INTENTIONALLY_EMPTY; - } - @Override public int getMaxUseTime(ItemStack stack, LivingEntity user) { return 72000; // basically infinite hold @@ -126,7 +107,7 @@ public class BubblePipe extends Item { )); stack.set(ModDataComponentTypes.SMOKING, false); if (user instanceof PlayerEntity player) { - player.getItemCooldownManager().set(this, 2400); + player.getItemCooldownManager().set(stack, 2400); stack.decrement(1); if (!world.isClient) { diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/Cigarette.java b/src/main/java/com/acethewildfire/acesbs/item/custom/Cigarette.java index 47d7e44..f1d5990 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/Cigarette.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/Cigarette.java @@ -9,15 +9,15 @@ import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.consume.UseAction; import net.minecraft.particle.ParticleTypes; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; import net.minecraft.stat.Stats; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; -import net.minecraft.util.UseAction; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; @@ -29,19 +29,20 @@ public class Cigarette extends Item { } @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { - if (!user.getItemCooldownManager().isCoolingDown(this)) { + public ActionResult use(World world, PlayerEntity user, Hand hand) { + if (!user.getItemCooldownManager().isCoolingDown(user.getStackInHand(hand))) { user.setCurrentHand(hand); user.getStackInHand(hand).set(ModDataComponentTypes.SMOKING, true); - return TypedActionResult.consume(user.getStackInHand(hand)); + return ActionResult.CONSUME; } - return TypedActionResult.fail(user.getStackInHand(hand)); + return ActionResult.FAIL; } @Override - public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { + public boolean onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { super.onStoppedUsing(stack, world, user, remainingUseTicks); stack.set(ModDataComponentTypes.SMOKING, false); + return false; } @Override @@ -49,11 +50,6 @@ public class Cigarette extends Item { return UseAction.TOOT_HORN; } - @Override - public SoundEvent getEatSound() { - return SoundEvents.INTENTIONALLY_EMPTY; - } - @Override public int getMaxUseTime(ItemStack stack, LivingEntity user) { return 50; @@ -117,7 +113,7 @@ public class Cigarette extends Item { )); stack.set(ModDataComponentTypes.SMOKING, false); if (user instanceof PlayerEntity player) { - player.getItemCooldownManager().set(this, 2400); + player.getItemCooldownManager().set(stack, 2400); stack.decrement(1); if (!world.isClient) { diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/CigaretteFunny.java b/src/main/java/com/acethewildfire/acesbs/item/custom/CigaretteFunny.java index 96b921e..9d39898 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/CigaretteFunny.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/CigaretteFunny.java @@ -13,14 +13,14 @@ import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.consume.UseAction; import net.minecraft.particle.ParticleTypes; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; import net.minecraft.stat.Stats; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; -import net.minecraft.util.UseAction; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; @@ -35,17 +35,17 @@ public class CigaretteFunny extends Item { private static PlayerAttachedSound activeSound; @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { - if (!user.getItemCooldownManager().isCoolingDown(this)) { + public ActionResult use(World world, PlayerEntity user, Hand hand) { + if (!user.getItemCooldownManager().isCoolingDown(user.getStackInHand(hand))) { user.setCurrentHand(hand); user.getStackInHand(hand).set(ModDataComponentTypes.SMOKING, true); - return TypedActionResult.consume(user.getStackInHand(hand)); + return ActionResult.CONSUME; } - return TypedActionResult.fail(user.getStackInHand(hand)); + return ActionResult.FAIL; } @Override - public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { + public boolean onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { super.onStoppedUsing(stack, world, user, remainingUseTicks); if (activeSound != null) { @@ -68,6 +68,7 @@ public class CigaretteFunny extends Item { } stack.set(ModDataComponentTypes.SMOKING, false); + return false; } @Override @@ -75,10 +76,6 @@ public class CigaretteFunny extends Item { return UseAction.TOOT_HORN; } - @Override - public SoundEvent getEatSound() { - return SoundEvents.INTENTIONALLY_EMPTY; - } @Override public int getMaxUseTime(ItemStack stack, LivingEntity user) { @@ -149,7 +146,7 @@ public class CigaretteFunny extends Item { )); stack.set(ModDataComponentTypes.SMOKING, false); if (user instanceof PlayerEntity player) { - player.getItemCooldownManager().set(this, 2400); + player.getItemCooldownManager().set(stack, 2400); stack.decrement(1); if (!world.isClient) { diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/CigaretteLemon.java b/src/main/java/com/acethewildfire/acesbs/item/custom/CigaretteLemon.java index 8e01003..cb31b0c 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/CigaretteLemon.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/CigaretteLemon.java @@ -7,15 +7,16 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.consume.UseAction; import net.minecraft.particle.ParticleTypes; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; import net.minecraft.stat.Stats; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; -import net.minecraft.util.UseAction; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraft.world.explosion.Explosion; @@ -28,13 +29,13 @@ public class CigaretteLemon extends Item { } @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { - if (!user.getItemCooldownManager().isCoolingDown(this)) { + public ActionResult use(World world, PlayerEntity user, Hand hand) { + if (!user.getItemCooldownManager().isCoolingDown(user.getStackInHand(hand))) { user.setCurrentHand(hand); user.getStackInHand(hand).set(ModDataComponentTypes.SMOKING, true); - return TypedActionResult.consume(user.getStackInHand(hand)); + return ActionResult.CONSUME; } - return TypedActionResult.fail(user.getStackInHand(hand)); + return ActionResult.FAIL; } @Override @@ -43,14 +44,10 @@ public class CigaretteLemon extends Item { } @Override - public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { + public boolean onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { super.onStoppedUsing(stack, world, user, remainingUseTicks); stack.set(ModDataComponentTypes.SMOKING, false); - } - - @Override - public SoundEvent getEatSound() { - return SoundEvents.INTENTIONALLY_EMPTY; + return false; } @Override @@ -126,24 +123,27 @@ public class CigaretteLemon extends Item { ); } stack.set(ModDataComponentTypes.SMOKING, false); - Explosion explosion = new Explosion( - world, + + world.createExplosion( user, user.getX(), user.getY(), user.getZ(), 4.0f, false, - Explosion.DestructionType.KEEP + World.ExplosionSourceType.NONE + ); + + user.damage( + (ServerWorld) world, + user.getDamageSources().explosion(user, user), + 20F ); - explosion.collectBlocksAndDamageEntities(); - user.damage(user.getDamageSources().explosion(user, user), 20F); - explosion.affectWorld(true); if (user instanceof PlayerEntity player) { - player.getItemCooldownManager().set(this, 2400); + player.getItemCooldownManager().set(stack, 2400); stack.decrement(1); if (!world.isClient) { diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/CombustibleLemon.java b/src/main/java/com/acethewildfire/acesbs/item/custom/CombustibleLemon.java index 9b0ca41..9482594 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/CombustibleLemon.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/CombustibleLemon.java @@ -7,8 +7,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.stat.Stats; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; import net.minecraft.world.World; public class CombustibleLemon extends Item { @@ -17,7 +17,7 @@ public class CombustibleLemon extends Item { } @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { + public ActionResult use(World world, PlayerEntity user, Hand hand) { ItemStack itemStack = user.getStackInHand(hand); world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5f, 0.4f / (world.getRandom().nextFloat() * 0.4f + 0.8f)); if (!world.isClient) { @@ -31,6 +31,6 @@ public class CombustibleLemon extends Item { itemStack.decrement(1); } - return TypedActionResult.success(itemStack, world.isClient()); + return ActionResult.SUCCESS; } } diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/CommandCore.java b/src/main/java/com/acethewildfire/acesbs/item/custom/CommandCore.java index 75db31d..2c738ca 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/CommandCore.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/CommandCore.java @@ -14,8 +14,8 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.tooltip.TooltipType; import net.minecraft.text.Text; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; import net.minecraft.world.World; import java.util.List; @@ -26,7 +26,7 @@ public class CommandCore extends Item { } @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { + public ActionResult use(World world, PlayerEntity user, Hand hand) { ItemStack itemStack = user.getStackInHand(hand); if (user.isInSneakingPose()){ @@ -47,7 +47,7 @@ public class CommandCore extends Item { } - return TypedActionResult.success(user.getStackInHand(hand)); + return ActionResult.SUCCESS; } @Override diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/HammerItem.java b/src/main/java/com/acethewildfire/acesbs/item/custom/HammerItem.java index 25e44f9..13d1461 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/HammerItem.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/HammerItem.java @@ -14,8 +14,8 @@ import java.util.List; public class HammerItem extends MiningToolItem { - public HammerItem(ToolMaterial material, Settings settings) { - super(material, BlockTags.PICKAXE_MINEABLE, settings); + public HammerItem(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) { + super(material, BlockTags.PICKAXE_MINEABLE, attackDamage, attackSpeed, settings); } public static List getBlocksToBeDestroyed(int range, BlockPos initalBlockPos, ServerPlayerEntity player) { diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/ModArmorItem.java b/src/main/java/com/acethewildfire/acesbs/item/custom/ModArmorItem.java index 2dee79d..ba5baa5 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/ModArmorItem.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/ModArmorItem.java @@ -2,22 +2,24 @@ package com.acethewildfire.acesbs.item.custom; import com.acethewildfire.acesbs.item.ModArmorMaterials; import com.google.common.collect.ImmutableMap; +import net.minecraft.component.DataComponentTypes; +import net.minecraft.component.type.EquippableComponent; import net.minecraft.entity.Entity; import net.minecraft.entity.effect.StatusEffectInstance; import net.minecraft.entity.effect.StatusEffects; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ArmorItem; -import net.minecraft.item.ArmorMaterial; import net.minecraft.item.ItemStack; -import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.item.equipment.ArmorMaterial; +import net.minecraft.item.equipment.EquipmentType; import net.minecraft.world.World; import java.util.List; import java.util.Map; public class ModArmorItem extends ArmorItem { - private static final Map, List> MATERIAL_TO_EFFECT_MAP = - (new ImmutableMap.Builder, List>()) + private static final Map> MATERIAL_TO_EFFECT_MAP = + (new ImmutableMap.Builder>()) .put(ModArmorMaterials.PRISMA_STEEL_ARMOR_MATERIAL, List.of(new StatusEffectInstance(StatusEffects.SPEED, 400, 1, false, false), new StatusEffectInstance(StatusEffects.JUMP_BOOST, 400, 0, false, false))) @@ -27,7 +29,7 @@ public class ModArmorItem extends ArmorItem { // new StatusEffectInstance(StatusEffects.JUMP_BOOST, 400, 1, false, false))) .build(); - public ModArmorItem(RegistryEntry material, Type type, Settings settings) { + public ModArmorItem(ArmorMaterial material, EquipmentType type, Settings settings) { super(material, type, settings); } @@ -45,8 +47,8 @@ public class ModArmorItem extends ArmorItem { } private void evaluateArmorEffects(PlayerEntity player) { - for (Map.Entry, List> entry : MATERIAL_TO_EFFECT_MAP.entrySet()) { - RegistryEntry mapArmorMaterial = entry.getKey(); + for (Map.Entry> entry : MATERIAL_TO_EFFECT_MAP.entrySet()) { + ArmorMaterial mapArmorMaterial = entry.getKey(); List mapStatusEffects = entry.getValue(); if(hasCorrectArmorOn(mapArmorMaterial, player)) { @@ -55,7 +57,7 @@ public class ModArmorItem extends ArmorItem { } } - private void addStatusEffectForMaterial(PlayerEntity player, RegistryEntry mapArmorMaterial, List mapStatusEffect) { + private void addStatusEffectForMaterial(PlayerEntity player, ArmorMaterial mapArmorMaterial, List mapStatusEffect) { boolean hasPlayerEffect = mapStatusEffect.stream().allMatch(statusEffectInstance -> player.hasStatusEffect(statusEffectInstance.getEffectType())); if(!hasPlayerEffect) { @@ -76,7 +78,7 @@ public class ModArmorItem extends ArmorItem { && !leggings.isEmpty() && !boots.isEmpty(); } - private boolean hasCorrectArmorOn(RegistryEntry material, PlayerEntity player) { + private boolean hasCorrectArmorOn(ArmorMaterial material, PlayerEntity player) { for (ItemStack armorStack: player.getInventory().armor) { if(!(armorStack.getItem() instanceof ArmorItem)) { return false; @@ -88,7 +90,12 @@ public class ModArmorItem extends ArmorItem { ArmorItem breastplate = ((ArmorItem)player.getInventory().getArmorStack(2).getItem()); ArmorItem helmet = ((ArmorItem)player.getInventory().getArmorStack(3).getItem()); - return helmet.getMaterial() == material && breastplate.getMaterial() == material && - leggings.getMaterial() == material && boots.getMaterial() == material; + EquippableComponent equippableComponentBoots = boots.getComponents().get(DataComponentTypes.EQUIPPABLE); + EquippableComponent equippableComponentLeggings = leggings.getComponents().get(DataComponentTypes.EQUIPPABLE); + EquippableComponent equippableComponentBreastplate = breastplate.getComponents().get(DataComponentTypes.EQUIPPABLE); + EquippableComponent equippableComponentHelmet = helmet.getComponents().get(DataComponentTypes.EQUIPPABLE); + + return equippableComponentBoots.model().get().equals(material.modelId()) && equippableComponentLeggings.model().get().equals(material.modelId()) && + equippableComponentBreastplate.model().get().equals(material.modelId()) && equippableComponentHelmet.model().get().equals(material.modelId()); } } \ No newline at end of file diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/OracleLemon.java b/src/main/java/com/acethewildfire/acesbs/item/custom/OracleLemon.java index a4c10e9..4e3b272 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/OracleLemon.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/OracleLemon.java @@ -1,13 +1,15 @@ package com.acethewildfire.acesbs.item.custom; +import net.minecraft.entity.EntityType; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.projectile.thrown.PotionEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.SplashPotionItem; +import net.minecraft.server.world.ServerWorld; import net.minecraft.stat.Stats; +import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; import net.minecraft.world.World; public class OracleLemon extends SplashPotionItem { @@ -17,18 +19,21 @@ public class OracleLemon extends SplashPotionItem { } @Override - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { + public ActionResult use(World world, PlayerEntity user, Hand hand) { ItemStack itemStack = user.getStackInHand(hand); - if (!world.isClient) { - PotionEntity potionEntity = new PotionEntity(world, user); + if (world instanceof ServerWorld serverWorld) { + PotionEntity potionEntity = new PotionEntity(EntityType.POTION, serverWorld); + + potionEntity.setOwner(user); potionEntity.setItem(itemStack); potionEntity.setVelocity(user, user.getPitch(), user.getYaw(), 0F, 2.5F, 1.0F); - world.spawnEntity(potionEntity); + + serverWorld.spawnEntity(potionEntity); } user.incrementStat(Stats.USED.getOrCreateStat(this)); itemStack.decrementUnlessCreative(1, user); - return TypedActionResult.success(itemStack, world.isClient()); + return ActionResult.SUCCESS; } } diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/SovsPlateCarrierArmorItem.java b/src/main/java/com/acethewildfire/acesbs/item/custom/SovsPlateCarrierArmorItem.java index ae45cb5..3fb5af6 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/SovsPlateCarrierArmorItem.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/SovsPlateCarrierArmorItem.java @@ -6,14 +6,15 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.LivingEntity; import net.minecraft.item.ArmorItem; -import net.minecraft.item.ArmorMaterial; import net.minecraft.item.ItemStack; +import net.minecraft.item.equipment.ArmorMaterial; +import net.minecraft.item.equipment.EquipmentType; import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; public class SovsPlateCarrierArmorItem extends ArmorItem { - public SovsPlateCarrierArmorItem(RegistryEntry material, Type type, Settings settings) { + public SovsPlateCarrierArmorItem(ArmorMaterial material, EquipmentType type, Settings settings) { super(material, type, settings); } diff --git a/src/main/java/com/acethewildfire/acesbs/item/custom/WildfireArmorItem.java b/src/main/java/com/acethewildfire/acesbs/item/custom/WildfireArmorItem.java index e30e47c..cfb478c 100644 --- a/src/main/java/com/acethewildfire/acesbs/item/custom/WildfireArmorItem.java +++ b/src/main/java/com/acethewildfire/acesbs/item/custom/WildfireArmorItem.java @@ -5,8 +5,9 @@ import com.acethewildfire.acesbs.particle.ModParticles; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ArmorItem; -import net.minecraft.item.ArmorMaterial; import net.minecraft.item.ItemStack; +import net.minecraft.item.equipment.ArmorMaterial; +import net.minecraft.item.equipment.EquipmentType; import net.minecraft.network.packet.s2c.play.ParticleS2CPacket; import net.minecraft.particle.ParticleTypes; import net.minecraft.registry.entry.RegistryEntry; @@ -20,7 +21,7 @@ public class WildfireArmorItem extends ArmorItem { int tick = 0; - public WildfireArmorItem(RegistryEntry material, Type type, Settings settings) { + public WildfireArmorItem(ArmorMaterial material, EquipmentType type, Settings settings) { super(material, type, settings); } diff --git a/src/main/java/com/acethewildfire/acesbs/mixin/AbstractClientPlayerEntityMixin.java b/src/main/java/com/acethewildfire/acesbs/mixin/AbstractClientPlayerEntityMixin.java deleted file mode 100644 index 53955d3..0000000 --- a/src/main/java/com/acethewildfire/acesbs/mixin/AbstractClientPlayerEntityMixin.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.acethewildfire.acesbs.mixin; - -import com.acethewildfire.acesbs.item.ModItems; -import com.mojang.authlib.GameProfile; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.network.AbstractClientPlayerEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -// With help from https://github.com/Globox1997/MedievalWeapons/blob/1.21/src/main/java/net/medievalweapons/mixin/client/AbstractClientPlayerEntityMixin.java -// Under MIT License! -@Mixin(AbstractClientPlayerEntity.class) -public abstract class AbstractClientPlayerEntityMixin extends PlayerEntity { - public AbstractClientPlayerEntityMixin(World world, BlockPos pos, float yaw, GameProfile gameProfile) { - super(world, pos, yaw, gameProfile); - } - - @Inject(method = "getFovMultiplier", at = @At(value = "TAIL"), locals = LocalCapture.CAPTURE_FAILSOFT, cancellable = true) - private void getFovMultiplierMixin(CallbackInfoReturnable info, float f) { - Item item = this.getActiveItem().getItem(); - ItemStack itemStack = this.getActiveItem(); - if (this.isUsingItem() && itemStack.isOf(ModItems.KAUPEN_BOW)) { - int i = this.getItemUseTime(); - float g = (float)i / 20.0f; - g = g > 1.0f ? 1.0f : g * g; - f *= 1.0f - g * 0.15f; - info.setReturnValue(MathHelper.lerp(MinecraftClient.getInstance().options.getFovEffectScale().getValue().floatValue(), 1.0f, f)); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/acethewildfire/acesbs/mixin/CreeperTickMixin.java b/src/main/java/com/acethewildfire/acesbs/mixin/CreeperTickMixin.java index 69cf0b2..5aa9a3e 100644 --- a/src/main/java/com/acethewildfire/acesbs/mixin/CreeperTickMixin.java +++ b/src/main/java/com/acethewildfire/acesbs/mixin/CreeperTickMixin.java @@ -2,6 +2,7 @@ package com.acethewildfire.acesbs.mixin; import com.acethewildfire.acesbs.entity.ModEntities; import com.acethewildfire.acesbs.util.CreeperTransformAccess; +import net.minecraft.entity.SpawnReason; import net.minecraft.entity.mob.CreeperEntity; import net.minecraft.entity.mob.MobEntity; import net.minecraft.particle.ParticleTypes; @@ -61,7 +62,7 @@ public class CreeperTickMixin { ); // spawn new mob - MobEntity newMob = ModEntities.FREN.create(world); + MobEntity newMob = ModEntities.FREN.create(world, SpawnReason.TRIGGERED); if (newMob != null) { newMob.refreshPositionAndAngles( creeper.getX(), diff --git a/src/main/java/com/acethewildfire/acesbs/mixin/GameRendererMixin.java b/src/main/java/com/acethewildfire/acesbs/mixin/GameRendererMixin.java new file mode 100644 index 0000000..df98c7e --- /dev/null +++ b/src/main/java/com/acethewildfire/acesbs/mixin/GameRendererMixin.java @@ -0,0 +1,36 @@ +package com.acethewildfire.acesbs.mixin; + +import com.acethewildfire.acesbs.item.ModItems; +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.render.Camera; +import net.minecraft.client.render.GameRenderer; +import net.minecraft.item.ItemStack; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(GameRenderer.class) +public class GameRendererMixin { + + @Inject(method = "getFov", at = @At("RETURN"), cancellable = true) + private void modifyBowFov(Camera camera, float tickDelta, boolean changingFov, CallbackInfoReturnable cir) { + MinecraftClient client = MinecraftClient.getInstance(); + + if (client.player == null) return; + + ItemStack itemStack = client.player.getActiveItem(); + + if (client.player.isUsingItem() && itemStack.isOf(ModItems.KAUPEN_BOW)) { + float fov = cir.getReturnValue(); + + int i = client.player.getItemUseTime(); + float g = (float)i / 20.0F; + g = g > 1.0F ? 1.0F : g * g; + + fov *= 1.0F - g * 0.15F; + + cir.setReturnValue(fov); + } + } +} diff --git a/src/main/java/com/acethewildfire/acesbs/mixin/ItemStackMixin.java b/src/main/java/com/acethewildfire/acesbs/mixin/ItemStackMixin.java deleted file mode 100644 index 75cb638..0000000 --- a/src/main/java/com/acethewildfire/acesbs/mixin/ItemStackMixin.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.acethewildfire.acesbs.mixin; - -import com.acethewildfire.acesbs.item.custom.SovsPlateCarrierArmorItem; -import net.minecraft.entity.EquipmentSlot; -import net.minecraft.entity.LivingEntity; -import net.minecraft.item.ItemStack; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -@Mixin(ItemStack.class) -public abstract class ItemStackMixin { - - @Inject(method = "damage", at = @At("HEAD"), cancellable = true) - private void preventChestplateBreak( - int amount, - LivingEntity entity, - EquipmentSlot slot, - CallbackInfo cir - ) { - ItemStack stack = (ItemStack)(Object)this; - - if (stack.getItem() instanceof SovsPlateCarrierArmorItem) { - - int newDamage = stack.getDamage() + amount; - - if (newDamage >= stack.getMaxDamage()) { - stack.setDamage(stack.getMaxDamage()); - cir.cancel(); // cancel breaking - } - } - } -} diff --git a/src/main/java/com/acethewildfire/acesbs/mixin/PlayerEntityMixin.java b/src/main/java/com/acethewildfire/acesbs/mixin/PlayerEntityMixin.java index f30a558..2fce556 100644 --- a/src/main/java/com/acethewildfire/acesbs/mixin/PlayerEntityMixin.java +++ b/src/main/java/com/acethewildfire/acesbs/mixin/PlayerEntityMixin.java @@ -8,6 +8,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; import net.minecraft.text.Text; @@ -32,11 +33,10 @@ public abstract class PlayerEntityMixin{ @Shadow public abstract Text getName(); @Inject(method = "damage", at = @At(value = "TAIL"), locals = LocalCapture.CAPTURE_FAILSOFT, cancellable = true) - private void damageMixin(DamageSource source, float amount, CallbackInfoReturnable cir) { + private void damageMixin(ServerWorld world, DamageSource source, float amount, CallbackInfoReturnable cir) { Item chestplate = this.inventory.getArmorStack(2).getItem(); if (chestplate == ModItems.BERSERKERS_PAULDRON && Objects.equals(this.getName().getLiteralString(), "Tennocraft12")){ PlayerEntity player = (PlayerEntity) (Object) this; - World world = player.getWorld(); if (!world.isClient()) { world.playSound(null, player.getX(),player.getY(), player.getZ(), SoundEvents.ENTITY_SKELETON_HURT, SoundCategory.PLAYERS, 2f, 1f); } diff --git a/src/main/java/com/acethewildfire/acesbs/potion/ModPotions.java b/src/main/java/com/acethewildfire/acesbs/potion/ModPotions.java index ecdfd94..e5d8f24 100644 --- a/src/main/java/com/acethewildfire/acesbs/potion/ModPotions.java +++ b/src/main/java/com/acethewildfire/acesbs/potion/ModPotions.java @@ -12,8 +12,8 @@ import net.minecraft.util.Identifier; public class ModPotions { - public static final RegistryEntry BLINDNESS = registerPotion("blindness", new Potion(new StatusEffectInstance(StatusEffects.BLINDNESS, 1200, 0))); - public static final RegistryEntry LEMON = registerPotion("lemon", new Potion(new StatusEffectInstance(ModEffects.LEMON, 1200, 0))); + public static final RegistryEntry BLINDNESS = registerPotion("blindness", new Potion("blindness", new StatusEffectInstance(StatusEffects.BLINDNESS, 1200, 0))); + public static final RegistryEntry LEMON = registerPotion("lemon", new Potion("lemon", new StatusEffectInstance(ModEffects.LEMON, 1200, 0))); private static RegistryEntry registerPotion(String name, Potion potion){ return Registry.registerReference(Registries.POTION, Identifier.of(AcesBS.MOD_ID, name), potion); diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEntanglerRecipe.java b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEntanglerRecipe.java index f386ba8..a38cf0e 100644 --- a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEntanglerRecipe.java +++ b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEntanglerRecipe.java @@ -5,17 +5,18 @@ import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.item.ItemStack; import net.minecraft.network.RegistryByteBuf; import net.minecraft.network.codec.PacketCodec; -import net.minecraft.recipe.Ingredient; -import net.minecraft.recipe.Recipe; -import net.minecraft.recipe.RecipeSerializer; -import net.minecraft.recipe.RecipeType; +import net.minecraft.recipe.*; +import net.minecraft.recipe.book.RecipeBookCategories; +import net.minecraft.recipe.book.RecipeBookCategory; import net.minecraft.registry.RegistryWrapper; import net.minecraft.util.collection.DefaultedList; import net.minecraft.world.World; +import java.util.List; +import java.util.Optional; + public record EntropicEntanglerRecipe(Ingredient inputItem, Ingredient inputItem2, ItemStack output) implements Recipe { - @Override public DefaultedList getIngredients() { DefaultedList list = DefaultedList.of(); list.add(this.inputItem); @@ -46,29 +47,29 @@ public record EntropicEntanglerRecipe(Ingredient inputItem, Ingredient inputItem } @Override - public boolean fits(int width, int height) { - return true; - } - - @Override - public ItemStack getResult(RegistryWrapper.WrapperLookup registriesLookup) { - return output; - } - - @Override - public RecipeSerializer getSerializer() { + public RecipeSerializer> getSerializer() { return ModRecipies.ENTROPIC_ENTANGLER_SERIALIZER; } @Override - public RecipeType getType() { + public RecipeType> getType() { return ModRecipies.ENTROPIC_ENTANGLER_TYPE; } + @Override + public IngredientPlacement getIngredientPlacement() { + return IngredientPlacement.forMultipleSlots(List.of(Optional.of(inputItem), Optional.of(inputItem2))); + } + + @Override + public RecipeBookCategory getRecipeBookCategory() { + return RecipeBookCategories.CRAFTING_MISC; + } + public static class Serializer implements RecipeSerializer { public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(inst -> inst.group( - Ingredient.DISALLOW_EMPTY_CODEC.fieldOf("ingredient").forGetter(EntropicEntanglerRecipe::inputItem), - Ingredient.DISALLOW_EMPTY_CODEC.fieldOf("ingredient2").forGetter(EntropicEntanglerRecipe::inputItem2), + Ingredient.CODEC.fieldOf("ingredient").forGetter(EntropicEntanglerRecipe::inputItem), + Ingredient.CODEC.fieldOf("ingredient2").forGetter(EntropicEntanglerRecipe::inputItem2), ItemStack.CODEC.fieldOf("result").forGetter(EntropicEntanglerRecipe::output) ).apply(inst, EntropicEntanglerRecipe::new)); diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEntanglerRecipeInput.java b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEntanglerRecipeInput.java index 123f8d5..dba150c 100644 --- a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEntanglerRecipeInput.java +++ b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEntanglerRecipeInput.java @@ -14,7 +14,7 @@ public record EntropicEntanglerRecipeInput(ItemStack input, ItemStack input2) im } @Override - public int getSize() { + public int size() { return 2; } } diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipe.java b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipe.java index b9f470d..4d16cbf 100644 --- a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipe.java +++ b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipe.java @@ -5,17 +5,15 @@ import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.item.ItemStack; import net.minecraft.network.RegistryByteBuf; import net.minecraft.network.codec.PacketCodec; -import net.minecraft.recipe.Ingredient; -import net.minecraft.recipe.Recipe; -import net.minecraft.recipe.RecipeSerializer; -import net.minecraft.recipe.RecipeType; +import net.minecraft.recipe.*; +import net.minecraft.recipe.book.RecipeBookCategories; +import net.minecraft.recipe.book.RecipeBookCategory; import net.minecraft.registry.RegistryWrapper; import net.minecraft.util.collection.DefaultedList; import net.minecraft.world.World; public record EntropicEvisceratorRecipe(Ingredient inputItem, ItemStack output) implements Recipe { - @Override public DefaultedList getIngredients() { DefaultedList list = DefaultedList.of(); list.add(this.inputItem); @@ -40,28 +38,28 @@ public record EntropicEvisceratorRecipe(Ingredient inputItem, ItemStack output) } @Override - public boolean fits(int width, int height) { - return true; - } - - @Override - public ItemStack getResult(RegistryWrapper.WrapperLookup registriesLookup) { - return output; - } - - @Override - public RecipeSerializer getSerializer() { + public RecipeSerializer> getSerializer() { return ModRecipies.ENTROPIC_EVISCERATOR_SERIALIZER; } @Override - public RecipeType getType() { + public RecipeType> getType() { return ModRecipies.ENTROPIC_EVISCERATOR_TYPE; } + @Override + public IngredientPlacement getIngredientPlacement() { + return IngredientPlacement.forSingleSlot(inputItem); + } + + @Override + public RecipeBookCategory getRecipeBookCategory() { + return RecipeBookCategories.CRAFTING_MISC; + } + public static class Serializer implements RecipeSerializer { public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(inst -> inst.group( - Ingredient.DISALLOW_EMPTY_CODEC.fieldOf("ingredient").forGetter(EntropicEvisceratorRecipe::inputItem), + Ingredient.CODEC.fieldOf("ingredient").forGetter(EntropicEvisceratorRecipe::inputItem), ItemStack.CODEC.fieldOf("result").forGetter(EntropicEvisceratorRecipe::output) ).apply(inst, EntropicEvisceratorRecipe::new)); diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipeInput.java b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipeInput.java index 9e29f27..39de17c 100644 --- a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipeInput.java +++ b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicEvisceratorRecipeInput.java @@ -10,7 +10,7 @@ public record EntropicEvisceratorRecipeInput(ItemStack input) implements RecipeI } @Override - public int getSize() { - return 2; + public int size() { + return 1; } } diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicStabilizerRecipe.java b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicStabilizerRecipe.java index 5e35f4c..eb75e4f 100644 --- a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicStabilizerRecipe.java +++ b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicStabilizerRecipe.java @@ -5,17 +5,15 @@ import com.mojang.serialization.codecs.RecordCodecBuilder; import net.minecraft.item.ItemStack; import net.minecraft.network.RegistryByteBuf; import net.minecraft.network.codec.PacketCodec; -import net.minecraft.recipe.Ingredient; -import net.minecraft.recipe.Recipe; -import net.minecraft.recipe.RecipeSerializer; -import net.minecraft.recipe.RecipeType; +import net.minecraft.recipe.*; +import net.minecraft.recipe.book.RecipeBookCategories; +import net.minecraft.recipe.book.RecipeBookCategory; import net.minecraft.registry.RegistryWrapper; import net.minecraft.util.collection.DefaultedList; import net.minecraft.world.World; public record EntropicStabilizerRecipe(Ingredient inputItem, ItemStack output) implements Recipe { - @Override public DefaultedList getIngredients() { DefaultedList list = DefaultedList.of(); list.add(this.inputItem); @@ -40,28 +38,28 @@ public record EntropicStabilizerRecipe(Ingredient inputItem, ItemStack output) i } @Override - public boolean fits(int width, int height) { - return true; - } - - @Override - public ItemStack getResult(RegistryWrapper.WrapperLookup registriesLookup) { - return output; - } - - @Override - public RecipeSerializer getSerializer() { + public RecipeSerializer> getSerializer() { return ModRecipies.ENTROPIC_STABILIZER_SERIALIZER; } @Override - public RecipeType getType() { + public RecipeType> getType() { return ModRecipies.ENTROPIC_STABILIZER_TYPE; } + @Override + public IngredientPlacement getIngredientPlacement() { + return IngredientPlacement.forSingleSlot(inputItem); + } + + @Override + public RecipeBookCategory getRecipeBookCategory() { + return RecipeBookCategories.CRAFTING_MISC; + } + public static class Serializer implements RecipeSerializer { public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(inst -> inst.group( - Ingredient.DISALLOW_EMPTY_CODEC.fieldOf("ingredient").forGetter(EntropicStabilizerRecipe::inputItem), + Ingredient.CODEC.fieldOf("ingredient").forGetter(EntropicStabilizerRecipe::inputItem), ItemStack.CODEC.fieldOf("result").forGetter(EntropicStabilizerRecipe::output) ).apply(inst, EntropicStabilizerRecipe::new)); diff --git a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicStabilizerRecipeInput.java b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicStabilizerRecipeInput.java index 61864a4..a9dc4a8 100644 --- a/src/main/java/com/acethewildfire/acesbs/recipe/EntropicStabilizerRecipeInput.java +++ b/src/main/java/com/acethewildfire/acesbs/recipe/EntropicStabilizerRecipeInput.java @@ -10,7 +10,7 @@ public record EntropicStabilizerRecipeInput(ItemStack input) implements RecipeIn } @Override - public int getSize() { + public int size() { return 2; } } diff --git a/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEntanglerScreen.java b/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEntanglerScreen.java index a705c78..7ab1ecd 100644 --- a/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEntanglerScreen.java +++ b/src/main/java/com/acethewildfire/acesbs/screen/custom/EntropicEntanglerScreen.java @@ -5,6 +5,8 @@ import com.mojang.blaze3d.systems.RenderSystem; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.ingame.HandledScreen; import net.minecraft.client.render.GameRenderer; +import net.minecraft.client.render.RenderLayer; +import net.minecraft.client.render.RenderLayers; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.text.Text; import net.minecraft.util.Identifier; @@ -24,14 +26,11 @@ public class EntropicEntanglerScreen extends HandledScreen PRISMA_CONVERTABLE = createTag("prisma_convertable"); public static final TagKey PRISMA_REPAIR = createTag("prisma_repair"); public static final TagKey ASHEN_REPAIR = createTag("ashen_repair"); + public static final TagKey WILDFIRE_REPAIR = createTag("wildfire_repair"); + public static final TagKey PLATES_REPAIR = createTag("plates_repair"); + public static final TagKey BERSERKERS_REPAIR = createTag("berserkers_repair"); private static TagKey createTag(String name){ return TagKey.of(RegistryKeys.ITEM, Identifier.of(AcesBS.MOD_ID, name)); diff --git a/src/main/java/com/acethewildfire/acesbs/util/UpdateRecipies.java b/src/main/java/com/acethewildfire/acesbs/util/UpdateRecipies.java index 5838524..b9a6d53 100644 --- a/src/main/java/com/acethewildfire/acesbs/util/UpdateRecipies.java +++ b/src/main/java/com/acethewildfire/acesbs/util/UpdateRecipies.java @@ -7,6 +7,7 @@ import net.fabricmc.fabric.api.loot.v3.LootTableEvents; import net.minecraft.block.Blocks; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantments; +import net.minecraft.item.Item; import net.minecraft.item.ItemConvertible; import net.minecraft.item.Items; import net.minecraft.loot.LootPool; @@ -23,41 +24,46 @@ import net.minecraft.predicate.item.EnchantmentPredicate; import net.minecraft.predicate.item.EnchantmentsPredicate; import net.minecraft.predicate.item.ItemPredicate; import net.minecraft.predicate.item.ItemSubPredicateTypes; +import net.minecraft.registry.RegistryEntryLookup; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.RegistryWrapper; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.registry.entry.RegistryEntryList; +import net.minecraft.registry.tag.TagKey; import java.util.ArrayList; import java.util.List; +import java.util.Optional; public class UpdateRecipies { - private static LootCondition.Builder specialToolCondition(ItemConvertible... tools){ + public static LootCondition.Builder specialToolCondition(RegistryEntryLookup lookup, ItemConvertible... tools) { return MatchToolLootCondition.builder( ItemPredicate.Builder.create() - .items(tools) + .items(lookup, tools) ); } public static void updateVanilla(){ AcesBS.LOGGER.info("Updating vanilla Ore Drops for Prisma Steel"); - RegistryKey coalOreLootId = Blocks.COAL_ORE.getLootTableKey(); - RegistryKey copperOreLootId = Blocks.COPPER_ORE.getLootTableKey(); - RegistryKey ironOreLootId = Blocks.IRON_ORE.getLootTableKey(); - RegistryKey goldOreLootId = Blocks.GOLD_ORE.getLootTableKey(); - RegistryKey lapisOreLootId = Blocks.LAPIS_ORE.getLootTableKey(); - RegistryKey redstoneOreLootId = Blocks.REDSTONE_ORE.getLootTableKey(); - RegistryKey diamondOreLootId = Blocks.DIAMOND_ORE.getLootTableKey(); - RegistryKey emeraldOreLootId = Blocks.EMERALD_ORE.getLootTableKey(); + RegistryKey coalOreLootId = Blocks.COAL_ORE.getLootTableKey().get(); + RegistryKey copperOreLootId = Blocks.COPPER_ORE.getLootTableKey().get(); + RegistryKey ironOreLootId = Blocks.IRON_ORE.getLootTableKey().get(); + RegistryKey goldOreLootId = Blocks.GOLD_ORE.getLootTableKey().get(); + RegistryKey lapisOreLootId = Blocks.LAPIS_ORE.getLootTableKey().get(); + RegistryKey redstoneOreLootId = Blocks.REDSTONE_ORE.getLootTableKey().get(); + RegistryKey diamondOreLootId = Blocks.DIAMOND_ORE.getLootTableKey().get(); + RegistryKey emeraldOreLootId = Blocks.EMERALD_ORE.getLootTableKey().get(); - RegistryKey coalDeepslateOreLootId = Blocks.DEEPSLATE_COAL_ORE.getLootTableKey(); - RegistryKey copperDeepslateOreLootId = Blocks.DEEPSLATE_COPPER_ORE.getLootTableKey(); - RegistryKey ironDeepslateOreLootId = Blocks.DEEPSLATE_IRON_ORE.getLootTableKey(); - RegistryKey goldDeepslateOreLootId = Blocks.DEEPSLATE_GOLD_ORE.getLootTableKey(); - RegistryKey lapisDeepslateOreLootId = Blocks.DEEPSLATE_LAPIS_ORE.getLootTableKey(); - RegistryKey redstoneDeepslateOreLootId = Blocks.DEEPSLATE_REDSTONE_ORE.getLootTableKey(); - RegistryKey diamondDeepslateOreLootId = Blocks.DEEPSLATE_DIAMOND_ORE.getLootTableKey(); - RegistryKey emeraldDeepslateOreLootId = Blocks.DEEPSLATE_EMERALD_ORE.getLootTableKey(); + RegistryKey coalDeepslateOreLootId = Blocks.DEEPSLATE_COAL_ORE.getLootTableKey().get(); + RegistryKey copperDeepslateOreLootId = Blocks.DEEPSLATE_COPPER_ORE.getLootTableKey().get(); + RegistryKey ironDeepslateOreLootId = Blocks.DEEPSLATE_IRON_ORE.getLootTableKey().get(); + RegistryKey goldDeepslateOreLootId = Blocks.DEEPSLATE_GOLD_ORE.getLootTableKey().get(); + RegistryKey lapisDeepslateOreLootId = Blocks.DEEPSLATE_LAPIS_ORE.getLootTableKey().get(); + RegistryKey redstoneDeepslateOreLootId = Blocks.DEEPSLATE_REDSTONE_ORE.getLootTableKey().get(); + RegistryKey diamondDeepslateOreLootId = Blocks.DEEPSLATE_DIAMOND_ORE.getLootTableKey().get(); + RegistryKey emeraldDeepslateOreLootId = Blocks.DEEPSLATE_EMERALD_ORE.getLootTableKey().get(); List> ores = new ArrayList<>(); @@ -83,7 +89,9 @@ public class UpdateRecipies { LootTableEvents.MODIFY.register((key, tableBuilder, source, wrapperLookup) -> { - RegistryWrapper.Impl impl = wrapperLookup.getWrapperOrThrow(RegistryKeys.ENCHANTMENT); + RegistryWrapper.Impl impl = wrapperLookup.getOrThrow(RegistryKeys.ENCHANTMENT); + RegistryEntryLookup itemLookup = wrapperLookup.getOrThrow(RegistryKeys.ITEM); + LootCondition.Builder silkTouchCondition = MatchToolLootCondition.builder( ItemPredicate.Builder.create() .subPredicate( @@ -96,7 +104,7 @@ public class UpdateRecipies { LootPool.Builder extraPool = LootPool.builder() .rolls(UniformLootNumberProvider.create(1, 2)) .conditionally(InvertedLootCondition.builder(silkTouchCondition)) - .conditionally(specialToolCondition(PrismaSteelItems.PRISMA_STEEL_PICKAXE, PrismaSteelItems.PRISMA_STEEL_HAMMER)) + .conditionally(specialToolCondition(itemLookup, PrismaSteelItems.PRISMA_STEEL_PICKAXE, PrismaSteelItems.PRISMA_STEEL_HAMMER)) .with(ItemEntry.builder(Items.AIR).weight(460)) .with(ItemEntry.builder(Items.COAL).weight(12)) .with(ItemEntry.builder(Items.RAW_COPPER).weight(10)) diff --git a/src/main/java/com/acethewildfire/acesbs/util/YouMonsterEvent.java b/src/main/java/com/acethewildfire/acesbs/util/YouMonsterEvent.java index 0361791..cdc9ef3 100644 --- a/src/main/java/com/acethewildfire/acesbs/util/YouMonsterEvent.java +++ b/src/main/java/com/acethewildfire/acesbs/util/YouMonsterEvent.java @@ -17,7 +17,7 @@ public class YouMonsterEvent implements AttackEntityCallback { public ActionResult interact(PlayerEntity player, World world, Hand hand, Entity entity, @Nullable EntityHitResult hitResult) { if(entity instanceof SheepEntity && player.getMainHandStack().getItem() == Items.END_ROD && world.isClient()){ - player.sendMessage(Text.literal(player.getName().getLiteralString() + ", YOU SICK FUCKER!")); + player.sendMessage(Text.literal(player.getName().getLiteralString() + ", YOU SICK FUCKER!"), false); } return ActionResult.PASS; diff --git a/src/main/resources/acesbs.mixins.json b/src/main/resources/acesbs.mixins.json index 3de7ef8..846fb47 100644 --- a/src/main/resources/acesbs.mixins.json +++ b/src/main/resources/acesbs.mixins.json @@ -16,6 +16,6 @@ "defaultRequire": 1 }, "client": [ - "AbstractClientPlayerEntityMixin" + "GameRendererMixin" ] } \ No newline at end of file diff --git a/src/main/resources/assets/acesbs/models/equipment/ashen_steel.json b/src/main/resources/assets/acesbs/models/equipment/ashen_steel.json new file mode 100644 index 0000000..4b41066 --- /dev/null +++ b/src/main/resources/assets/acesbs/models/equipment/ashen_steel.json @@ -0,0 +1,24 @@ +{ + "layers": { + "wolf_body": [ + { + "texture": "acesbs:ashen_steel" + } + ], + "horse_body": [ + { + "texture": "acesbs:ashen_steel" + } + ], + "humanoid": [ + { + "texture": "acesbs:ashen_steel" + } + ], + "humanoid_leggings": [ + { + "texture": "acesbs:ashen_steel" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/acesbs/models/equipment/berserkers.json b/src/main/resources/assets/acesbs/models/equipment/berserkers.json new file mode 100644 index 0000000..ffd60bf --- /dev/null +++ b/src/main/resources/assets/acesbs/models/equipment/berserkers.json @@ -0,0 +1,24 @@ +{ + "layers": { + "wolf_body": [ + { + "texture": "acesbs:berserkers" + } + ], + "horse_body": [ + { + "texture": "acesbs:berserkers" + } + ], + "humanoid": [ + { + "texture": "acesbs:berserkers" + } + ], + "humanoid_leggings": [ + { + "texture": "acesbs:berserkers" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/acesbs/models/equipment/plates.json b/src/main/resources/assets/acesbs/models/equipment/plates.json new file mode 100644 index 0000000..da202bc --- /dev/null +++ b/src/main/resources/assets/acesbs/models/equipment/plates.json @@ -0,0 +1,24 @@ +{ + "layers": { + "wolf_body": [ + { + "texture": "acesbs:plates" + } + ], + "horse_body": [ + { + "texture": "acesbs:plates" + } + ], + "humanoid": [ + { + "texture": "acesbs:plates" + } + ], + "humanoid_leggings": [ + { + "texture": "acesbs:plates" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/acesbs/models/equipment/prisma_steel.json b/src/main/resources/assets/acesbs/models/equipment/prisma_steel.json new file mode 100644 index 0000000..e3fe04a --- /dev/null +++ b/src/main/resources/assets/acesbs/models/equipment/prisma_steel.json @@ -0,0 +1,24 @@ +{ + "layers": { + "wolf_body": [ + { + "texture": "acesbs:prisma_steel" + } + ], + "horse_body": [ + { + "texture": "acesbs:prisma_steel" + } + ], + "humanoid": [ + { + "texture": "acesbs:prisma_steel" + } + ], + "humanoid_leggings": [ + { + "texture": "acesbs:prisma_steel" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/acesbs/models/equipment/wildfire.json b/src/main/resources/assets/acesbs/models/equipment/wildfire.json new file mode 100644 index 0000000..09d18aa --- /dev/null +++ b/src/main/resources/assets/acesbs/models/equipment/wildfire.json @@ -0,0 +1,24 @@ +{ + "layers": { + "wolf_body": [ + { + "texture": "acesbs:wildfire" + } + ], + "horse_body": [ + { + "texture": "acesbs:wildfire" + } + ], + "humanoid": [ + { + "texture": "acesbs:wildfire" + } + ], + "humanoid_leggings": [ + { + "texture": "acesbs:wildfire" + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/acesbs/textures/models/armor/ashen_steel_layer_1.png b/src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/ashen_steel.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/models/armor/ashen_steel_layer_1.png rename to src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/ashen_steel.png diff --git a/src/main/resources/assets/acesbs/textures/models/armor/berserkers_layer_1.png b/src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/berserkers.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/models/armor/berserkers_layer_1.png rename to src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/berserkers.png diff --git a/src/main/resources/assets/acesbs/textures/models/armor/plates_layer_1.png b/src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/plates.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/models/armor/plates_layer_1.png rename to src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/plates.png diff --git a/src/main/resources/assets/acesbs/textures/models/armor/prisma_steel_layer_1.png b/src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/prisma_steel.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/models/armor/prisma_steel_layer_1.png rename to src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/prisma_steel.png diff --git a/src/main/resources/assets/acesbs/textures/models/armor/wildfire_layer_1.png b/src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/wildfire.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/models/armor/wildfire_layer_1.png rename to src/main/resources/assets/acesbs/textures/entity/equipment/humanoid/wildfire.png diff --git a/src/main/resources/assets/acesbs/textures/models/armor/ashen_steel_layer_2.png b/src/main/resources/assets/acesbs/textures/entity/equipment/humanoid_leggings/ashen_steel.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/models/armor/ashen_steel_layer_2.png rename to src/main/resources/assets/acesbs/textures/entity/equipment/humanoid_leggings/ashen_steel.png diff --git a/src/main/resources/assets/acesbs/textures/models/armor/prisma_steel_layer_2.png b/src/main/resources/assets/acesbs/textures/entity/equipment/humanoid_leggings/prisma_steel.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/models/armor/prisma_steel_layer_2.png rename to src/main/resources/assets/acesbs/textures/entity/equipment/humanoid_leggings/prisma_steel.png diff --git a/src/main/resources/assets/acesbs/textures/trims/models/armor/ashen.png b/src/main/resources/assets/acesbs/textures/trims/entity/humanoid/ashen.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/trims/models/armor/ashen.png rename to src/main/resources/assets/acesbs/textures/trims/entity/humanoid/ashen.png diff --git a/src/main/resources/assets/acesbs/textures/trims/models/armor/prisma.png b/src/main/resources/assets/acesbs/textures/trims/entity/humanoid/prisma.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/trims/models/armor/prisma.png rename to src/main/resources/assets/acesbs/textures/trims/entity/humanoid/prisma.png diff --git a/src/main/resources/assets/acesbs/textures/trims/models/armor/ashen_leggings.png b/src/main/resources/assets/acesbs/textures/trims/entity/humanoid_leggings/ashen.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/trims/models/armor/ashen_leggings.png rename to src/main/resources/assets/acesbs/textures/trims/entity/humanoid_leggings/ashen.png diff --git a/src/main/resources/assets/acesbs/textures/trims/models/armor/prisma_leggings.png b/src/main/resources/assets/acesbs/textures/trims/entity/humanoid_leggings/prisma.png similarity index 100% rename from src/main/resources/assets/acesbs/textures/trims/models/armor/prisma_leggings.png rename to src/main/resources/assets/acesbs/textures/trims/entity/humanoid_leggings/prisma.png diff --git a/src/main/resources/assets/minecraft/atlases/armor_trims.json b/src/main/resources/assets/minecraft/atlases/armor_trims.json index c8c90f6..3af8546 100644 --- a/src/main/resources/assets/minecraft/atlases/armor_trims.json +++ b/src/main/resources/assets/minecraft/atlases/armor_trims.json @@ -4,42 +4,42 @@ { "type": "paletted_permutations", "textures": [ - "trims/models/armor/coast", - "trims/models/armor/coast_leggings", - "trims/models/armor/sentry", - "trims/models/armor/sentry_leggings", - "trims/models/armor/dune", - "trims/models/armor/dune_leggings", - "trims/models/armor/wild", - "trims/models/armor/wild_leggings", - "trims/models/armor/ward", - "trims/models/armor/ward_leggings", - "trims/models/armor/eye", - "trims/models/armor/eye_leggings", - "trims/models/armor/vex", - "trims/models/armor/vex_leggings", - "trims/models/armor/tide", - "trims/models/armor/tide_leggings", - "trims/models/armor/snout", - "trims/models/armor/snout_leggings", - "trims/models/armor/rib", - "trims/models/armor/rib_leggings", - "trims/models/armor/spire", - "trims/models/armor/spire_leggings", - "trims/models/armor/wayfinder", - "trims/models/armor/wayfinder_leggings", - "trims/models/armor/shaper", - "trims/models/armor/shaper_leggings", - "trims/models/armor/silence", - "trims/models/armor/silence_leggings", - "trims/models/armor/raiser", - "trims/models/armor/raiser_leggings", - "trims/models/armor/host", - "trims/models/armor/host_leggings", - "acesbs:trims/models/armor/prisma", - "acesbs:trims/models/armor/prisma_leggings", - "acesbs:trims/models/armor/ashen", - "acesbs:trims/models/armor/ashen_leggings" + "trims/entity/humanoid/coast", + "trims/entity/humanoid_leggings/coast_leggings", + "trims/entity/humanoid/sentry", + "trims/entity/humanoid_leggings/sentry_leggings", + "trims/entity/humanoid/dune", + "trims/entity/humanoid_leggings/dune_leggings", + "trims/entity/humanoid/wild", + "trims/entity/humanoid_leggings/wild_leggings", + "trims/entity/humanoid/ward", + "trims/entity/humanoid_leggings/ward_leggings", + "trims/entity/humanoid/eye", + "trims/entity/humanoid_leggings/eye_leggings", + "trims/entity/humanoid/vex", + "trims/entity/humanoid_leggings/vex_leggings", + "trims/entity/humanoid/tide", + "trims/entity/humanoid_leggings/tide_leggings", + "trims/entity/humanoid/snout", + "trims/entity/humanoid_leggings/snout_leggings", + "trims/entity/humanoid/rib", + "trims/entity/humanoid_leggings/rib_leggings", + "trims/entity/humanoid/spire", + "trims/entity/humanoid_leggings/spire_leggings", + "trims/entity/humanoid/wayfinder", + "trims/entity/humanoid_leggings/wayfinder_leggings", + "trims/entity/humanoid/shaper", + "trims/entity/humanoid_leggings/shaper_leggings", + "trims/entity/humanoid/silence", + "trims/entity/humanoid_leggings/silence_leggings", + "trims/entity/humanoid/raiser", + "trims/entity/humanoid_leggings/raiser_leggings", + "trims/entity/humanoid/host", + "trims/entity/humanoid_leggings/host_leggings", + "acesbs:trims/entity/humanoid/prisma", + "acesbs:trims/entity/humanoid_leggings/prisma", + "acesbs:trims/entity/humanoid/ashen", + "acesbs:trims/entity/humanoid_leggings/ashen" ], "palette_key": "trims/color_palettes/trim_palette", diff --git a/src/main/resources/data/acesbs/recipe/aquarium_gravel_from_entropic_entangler.json b/src/main/resources/data/acesbs/recipe/aquarium_gravel_from_entropic_entangler.json index c676f37..b5b7cac 100644 --- a/src/main/resources/data/acesbs/recipe/aquarium_gravel_from_entropic_entangler.json +++ b/src/main/resources/data/acesbs/recipe/aquarium_gravel_from_entropic_entangler.json @@ -1,11 +1,7 @@ { "type": "acesbs:entropic_entangler", - "ingredient": { - "item": "minecraft:prismarine_crystals" - }, - "ingredient2": { - "item": "acesbs:stable_entropy" - }, + "ingredient": "minecraft:prismarine_crystals", + "ingredient2": "acesbs:stable_entropy", "result": { "count": 1, "id": "acesbs:aquarium_gravel" diff --git a/src/main/resources/data/acesbs/recipe/ashen_steel_ingot_from_entropic_entangler.json b/src/main/resources/data/acesbs/recipe/ashen_steel_ingot_from_entropic_entangler.json index 4d2efbe..82e3b3e 100644 --- a/src/main/resources/data/acesbs/recipe/ashen_steel_ingot_from_entropic_entangler.json +++ b/src/main/resources/data/acesbs/recipe/ashen_steel_ingot_from_entropic_entangler.json @@ -1,11 +1,7 @@ { "type": "acesbs:entropic_entangler", - "ingredient": { - "item": "minecraft:iron_ingot" - }, - "ingredient2": { - "item": "acesbs:infernal_ashes" - }, + "ingredient": "minecraft:iron_ingot", + "ingredient2": "acesbs:infernal_ashes", "result": { "count": 1, "id": "acesbs:ashen_steel" diff --git a/src/main/resources/data/acesbs/recipe/bricked_up_from_entropic_entangler.json b/src/main/resources/data/acesbs/recipe/bricked_up_from_entropic_entangler.json index 96925e2..fe149b7 100644 --- a/src/main/resources/data/acesbs/recipe/bricked_up_from_entropic_entangler.json +++ b/src/main/resources/data/acesbs/recipe/bricked_up_from_entropic_entangler.json @@ -1,11 +1,7 @@ { "type": "acesbs:entropic_entangler", - "ingredient": { - "item": "minecraft:brick" - }, - "ingredient2": { - "item": "acesbs:stable_endtropy" - }, + "ingredient": "minecraft:brick", + "ingredient2": "acesbs:stable_endtropy", "result": { "count": 1, "id": "acesbs:bricked_up" diff --git a/src/main/resources/data/acesbs/recipe/infernal_beef_from_entropic_entangler.json b/src/main/resources/data/acesbs/recipe/infernal_beef_from_entropic_entangler.json index 9977b6b..112d6f3 100644 --- a/src/main/resources/data/acesbs/recipe/infernal_beef_from_entropic_entangler.json +++ b/src/main/resources/data/acesbs/recipe/infernal_beef_from_entropic_entangler.json @@ -1,11 +1,7 @@ { "type": "acesbs:entropic_entangler", - "ingredient": { - "item": "minecraft:cooked_beef" - }, - "ingredient2": { - "item": "acesbs:infernal_ashes" - }, + "ingredient": "minecraft:cooked_beef", + "ingredient2": "acesbs:infernal_ashes", "result": { "count": 1, "id": "acesbs:infernal_beef" diff --git a/src/main/resources/data/acesbs/recipe/lemon_from_entropic_eviscerator.json b/src/main/resources/data/acesbs/recipe/lemon_from_entropic_eviscerator.json index 21fa58f..82a4b8e 100644 --- a/src/main/resources/data/acesbs/recipe/lemon_from_entropic_eviscerator.json +++ b/src/main/resources/data/acesbs/recipe/lemon_from_entropic_eviscerator.json @@ -1,8 +1,6 @@ { "type": "acesbs:entropic_eviscerator", - "ingredient": { - "item": "minecraft:apple" - }, + "ingredient": "minecraft:apple", "result": { "count": 1, "id": "acesbs:lemon" diff --git a/src/main/resources/data/acesbs/recipe/mote_of_order_from_entropic_eviscerator.json b/src/main/resources/data/acesbs/recipe/mote_of_order_from_entropic_eviscerator.json index 959a48c..e4316cf 100644 --- a/src/main/resources/data/acesbs/recipe/mote_of_order_from_entropic_eviscerator.json +++ b/src/main/resources/data/acesbs/recipe/mote_of_order_from_entropic_eviscerator.json @@ -1,8 +1,6 @@ { "type": "acesbs:entropic_eviscerator", - "ingredient": { - "item": "acesbs:prisma_steel_block" - }, + "ingredient": "acesbs:prisma_steel_block", "result": { "count": 1, "id": "acesbs:mote_of_order" diff --git a/src/main/resources/data/acesbs/recipe/prismasteel_ingot_from_entropic_entangler.json b/src/main/resources/data/acesbs/recipe/prismasteel_ingot_from_entropic_entangler.json index b764f79..649ab58 100644 --- a/src/main/resources/data/acesbs/recipe/prismasteel_ingot_from_entropic_entangler.json +++ b/src/main/resources/data/acesbs/recipe/prismasteel_ingot_from_entropic_entangler.json @@ -1,11 +1,7 @@ { "type": "acesbs:entropic_entangler", - "ingredient": { - "item": "minecraft:iron_ingot" - }, - "ingredient2": { - "item": "acesbs:stable_entropy" - }, + "ingredient": "minecraft:iron_ingot", + "ingredient2": "acesbs:stable_entropy", "result": { "count": 1, "id": "acesbs:prisma_steel" diff --git a/src/main/resources/data/acesbs/recipe/stable_endtropy_from_entropic_stabilizer.json b/src/main/resources/data/acesbs/recipe/stable_endtropy_from_entropic_stabilizer.json index a242032..790bb2d 100644 --- a/src/main/resources/data/acesbs/recipe/stable_endtropy_from_entropic_stabilizer.json +++ b/src/main/resources/data/acesbs/recipe/stable_endtropy_from_entropic_stabilizer.json @@ -1,8 +1,6 @@ { "type": "acesbs:entropic_stabilizer", - "ingredient": { - "item": "acesbs:raw_endtropy" - }, + "ingredient": "acesbs:raw_endtropy", "result": { "count": 1, "id": "acesbs:stable_endtropy" diff --git a/src/main/resources/data/acesbs/recipe/stable_endtropy_from_ore_in_entropic_stabilizer.json b/src/main/resources/data/acesbs/recipe/stable_endtropy_from_ore_in_entropic_stabilizer.json index ff3e07c..8e8a131 100644 --- a/src/main/resources/data/acesbs/recipe/stable_endtropy_from_ore_in_entropic_stabilizer.json +++ b/src/main/resources/data/acesbs/recipe/stable_endtropy_from_ore_in_entropic_stabilizer.json @@ -1,8 +1,6 @@ { "type": "acesbs:entropic_stabilizer", - "ingredient": { - "item": "acesbs:endtropy_ore" - }, + "ingredient": "acesbs:endtropy_ore", "result": { "count": 1, "id": "acesbs:stable_endtropy" diff --git a/src/main/resources/data/acesbs/recipe/stable_entropy_from_entropic_stabilizer.json b/src/main/resources/data/acesbs/recipe/stable_entropy_from_entropic_stabilizer.json index 62fae14..0e5da46 100644 --- a/src/main/resources/data/acesbs/recipe/stable_entropy_from_entropic_stabilizer.json +++ b/src/main/resources/data/acesbs/recipe/stable_entropy_from_entropic_stabilizer.json @@ -1,8 +1,6 @@ { "type": "acesbs:entropic_stabilizer", - "ingredient": { - "item": "acesbs:raw_entropy" - }, + "ingredient": "acesbs:raw_entropy", "result": { "count": 1, "id": "acesbs:stable_entropy" diff --git a/src/main/resources/data/acesbs/recipe/stable_entropy_from_ore_in_entropic_stabilizer.json b/src/main/resources/data/acesbs/recipe/stable_entropy_from_ore_in_entropic_stabilizer.json index 90bd9ff..92fc9bd 100644 --- a/src/main/resources/data/acesbs/recipe/stable_entropy_from_ore_in_entropic_stabilizer.json +++ b/src/main/resources/data/acesbs/recipe/stable_entropy_from_ore_in_entropic_stabilizer.json @@ -1,8 +1,6 @@ { "type": "acesbs:entropic_stabilizer", - "ingredient": { - "item": "acesbs:entropy_ore" - }, + "ingredient": "acesbs:entropy_ore", "result": { "count": 1, "id": "acesbs:stable_entropy" diff --git a/src/main/resources/data/acesbs/recipe/tobacco_seeds_from_entropic_eviscerator.json b/src/main/resources/data/acesbs/recipe/tobacco_seeds_from_entropic_eviscerator.json index 09225bc..ac27239 100644 --- a/src/main/resources/data/acesbs/recipe/tobacco_seeds_from_entropic_eviscerator.json +++ b/src/main/resources/data/acesbs/recipe/tobacco_seeds_from_entropic_eviscerator.json @@ -1,8 +1,6 @@ { "type": "acesbs:entropic_eviscerator", - "ingredient": { - "item": "minecraft:wheat_seeds" - }, + "ingredient": "minecraft:wheat_seeds", "result": { "count": 1, "id": "acesbs:tobacco_seeds" diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 4b32e9e..1a9a8ff 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,8 +33,8 @@ "acesbs.mixins.json" ], "depends": { - "fabricloader": ">=0.16.14", - "minecraft": "~1.21", + "fabricloader": ">=0.18.4", + "minecraft": "~1.21.3", "java": ">=21", "fabric-api": "*" }