diff --git a/build.gradle b/build.gradle index a34eb01..91a34c5 100644 --- a/build.gradle +++ b/build.gradle @@ -133,6 +133,6 @@ project.plugins.withType(MavenPublishPlugin).all { } } - exec { - commandLine "echo", "##[set-output name=version;]${project.version}"; - } +// exec { +// commandLine "echo", "##[set-output name=version;]${project.version}"; +// } diff --git a/gradle.properties b/gradle.properties index 9be73f0..4d7a243 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ loader_version=0.14.21 #Fabric api fabric_version=0.82.0+1.19.4 # Mod Properties -mod_version=1.19.4-1.3.0 +mod_version=1.19.4-1.3.2 maven_group=io.github.codecraftplugin archives_base_name=registry-lib diff --git a/src/main/java/io/github/codecraftplugin/registrylib/RegisteryLib.java b/src/main/java/io/github/codecraftplugin/registrylib/RegisteryLib.java index e13acf0..50849ea 100644 --- a/src/main/java/io/github/codecraftplugin/registrylib/RegisteryLib.java +++ b/src/main/java/io/github/codecraftplugin/registrylib/RegisteryLib.java @@ -13,8 +13,5 @@ public class RegisteryLib implements ModInitializer { public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); @Override public void onInitialize() { - Item itemgroupicon = Registry.registerItems("itemgroupicon",MOD_ID,new Item(new FabricItemSettings()), ItemGroups.TOOLS); - ItemGroup testitemgroup = Registry.registerItemGroup("testitemgroup",MOD_ID,()->new ItemStack(itemgroupicon)); - Item registeritem = Registry.registerItems("registeritem",MOD_ID,new Item(new FabricItemSettings()), testitemgroup); } } diff --git a/src/main/java/io/github/codecraftplugin/registrylib/utils/RegistryRecipeProvider.java b/src/main/java/io/github/codecraftplugin/registrylib/utils/RegistryRecipeProvider.java index 2e83ac6..7bfec5d 100644 --- a/src/main/java/io/github/codecraftplugin/registrylib/utils/RegistryRecipeProvider.java +++ b/src/main/java/io/github/codecraftplugin/registrylib/utils/RegistryRecipeProvider.java @@ -88,4 +88,65 @@ public static void offerSwordRecipe(Consumer exporter, ItemC FabricRecipeProvider.conditionsFromItem(input)) .group("sword").offerTo(exporter); } + + /** + * for making a Chestplate recipe + * @param exporter the expoter + * @param output the output that is the Chestplate + * @param input the material the Chestplate is made up of (wood, stone, iron, gold, diamond, any modded material) + */ + public static void offerChestplateRecipe(Consumer exporter, ItemConvertible output, ItemConvertible input) { + ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, output).input(Character.valueOf('#'), input) + .pattern("# #") + .pattern("###") + .pattern("###") + .criterion(FabricRecipeProvider.hasItem(input), + FabricRecipeProvider.conditionsFromItem(input)) + .group("chestplate").offerTo(exporter); + } + /** + * for making a Boots recipe + * @param exporter the exporter + * @param output the output that is the Boots + * @param input the material the Boots is made up of (wood, stone, iron, gold, diamond, any modded material) + */ + public static void offerBootsRecipe(Consumer exporter, ItemConvertible output, ItemConvertible input) { + ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, output).input(Character.valueOf('#'), input) + .pattern(" ") + .pattern("# #") + .pattern("# #") + .criterion(FabricRecipeProvider.hasItem(input), + FabricRecipeProvider.conditionsFromItem(input)) + .group("boots").offerTo(exporter); + } + /** + * for making a Leggings recipe + * @param exporter the exporter + * @param output the output that is the Leggings + * @param input the material the Leggings is made up of (wood, stone, iron, gold, diamond, any modded material) + */ + public static void offerLeggingsRecipe(Consumer exporter, ItemConvertible output, ItemConvertible input) { + ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, output).input(Character.valueOf('#'), input) + .pattern("###") + .pattern("# #") + .pattern("# #") + .criterion(FabricRecipeProvider.hasItem(input), + FabricRecipeProvider.conditionsFromItem(input)) + .group("leggings").offerTo(exporter); + } + /** + * for making a Helmet recipe + * @param exporter the exporter + * @param output the output that is the Helmet + * @param input the material the Helmet is made up of (wood, stone, iron, gold, diamond, any modded material) + */ + public static void offerHelmetRecipe(Consumer exporter, ItemConvertible output, ItemConvertible input) { + ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, output).input(Character.valueOf('#'), input) + .pattern("###") + .pattern("# #") + .pattern(" ") + .criterion(FabricRecipeProvider.hasItem(input), + FabricRecipeProvider.conditionsFromItem(input)) + .group("helmet").offerTo(exporter); + } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index b4f3f59..80ec721 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "id": "registrylib", "version": "${version}", - "name": "RegisteryLib", + "name": "Registery Lib", "description": "it is a registery libary for my ease of work", "authors": [ "CodeCraft"