H_SerhatY Posted August 4, 2018 Share Posted August 4, 2018 (edited) Hello. I'm making an mod and I need help. I need to make a pickaxe is already enchanted with Fortune. How can I do it? Edit: I'm using 1.7.10 Edited August 4, 2018 by H_SerhatY I forgot to write version of Minecraft. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
MairwunNx Posted August 4, 2018 Share Posted August 4, 2018 Simple enchantment effect? or e.g power, durability? 1 hour ago, H_SerhatY said: Hello. I'm making an mod and I need help. I need to make a pickaxe is already enchanted with Fortune. How can I do it? Edit: I'm using 1.7.10 Quote Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 2 hours ago, MairwunNx said: Simple enchantment effect? or e.g power, durability? I need Fortune effect for pickaxe and Looting for sword. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
MairwunNx Posted August 4, 2018 Share Posted August 4, 2018 2 minutes ago, H_SerhatY said: I need Fortune effect for pickaxe and Looting for sword. Maybe addEnchantment(Enchantment.looting, 2); Quote Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 (edited) 1 minute ago, MairwunNx said: Maybe addEnchantment(Enchantment.looting, 2); I will try it. Edit: Doesn't works Edited August 4, 2018 by H_SerhatY Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
MairwunNx Posted August 4, 2018 Share Posted August 4, 2018 1 minute ago, H_SerhatY said: I will try it. Edit: Doesn't works How you it used? Quote Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 (edited) 1 minute ago, MairwunNx said: How you it used? How I use it? Edit: I add it to there: RWPMK1Sword = new ItemRWPMK1Sword(RWPMK1ToolMaterial).setUnlocalizedName("RWPMK1Sword").setTextureName("mstm:reinforced_wooden_sword_mk1").setCreativeTab(tabMSTM); Edited August 4, 2018 by H_SerhatY Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 If I need to update the version for use this, I will take the latest version. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 4, 2018 Share Posted August 4, 2018 4 hours ago, H_SerhatY said: If I need to update the version for use this, I will take the latest version. Update to 1.12.2, this thread is going to be locked by a forums moderator later if your don't. 1.7.10 is not supported on this forum and 1.8.9 support is going away soon. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 28 minutes ago, Animefan8888 said: Update to 1.12.2, this thread is going to be locked by a forums moderator later if your don't. 1.7.10 is not supported on this forum and 1.8.9 support is going away soon. Okey, I have update it but I need to make the items first Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 4, 2018 Share Posted August 4, 2018 52 minutes ago, H_SerhatY said: Okey, I have update it but I need to make the items first Then to do this you will want to create a custom implementation of IRecipeFactory and read a modified recipe json that applies an enchantment or multiple enchantments. And then return an IRecipe that has the result with the enchantment. And then for the creative tab Item you need to call setHasSubtypes(true) in your Items constructor. And then override getSubItems() which will add an ItemStack that has the enchantment on it, and only adds it if the creative tab matches. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 34 minutes ago, Animefan8888 said: Then to do this you will want to create a custom implementation of IRecipeFactory and read a modified recipe json that applies an enchantment or multiple enchantments. And then return an IRecipe that has the result with the enchantment. And then for the creative tab Item you need to call setHasSubtypes(true) in your Items constructor. And then override getSubItems() which will add an ItemStack that has the enchantment on it, and only adds it if the creative tab matches. Okey. I need help for doing this. I want very much to do this without help but I need help. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 4, 2018 Share Posted August 4, 2018 2 minutes ago, H_SerhatY said: Okey. I need help for doing this. I want very much to do this without help but I need help. I'm gonna need more information than "I need help", post your code/what you have. And what you specifically need help with. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 1 minute ago, Animefan8888 said: I'm gonna need more information than "I need help", post your code/what you have. And what you specifically need help with. Okey. You are say to create custom implementation but I don't have an idea to where is I create this implementation. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 4, 2018 Share Posted August 4, 2018 1 minute ago, H_SerhatY said: Okey. You are say to create custom implementation but I don't have an idea to where is I create this implementation. Java Creating an Implementation Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 I don't ask how create an implementation. I know that. I asked WHERE I create this custom implementation. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 4, 2018 Share Posted August 4, 2018 1 minute ago, H_SerhatY said: I don't ask how create an implementation. I know that. I asked WHERE I create this custom implementation. Where ever you want...anywhere in your workspace. You can make a class anywhere you want and extend or implement what ever you want. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 Thank you for helping to a man that's noob. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 38 minutes ago, Animefan8888 said: Where ever you want...anywhere in your workspace. You can make a class anywhere you want and extend or implement what ever you want. In I say before, I need to remake the items. But I'm taking errors. [22:27:49] [main/ERROR] [FML]: Exception loading model for variant mstm:reinforced_iron_ingot_mk1#inventory for item "mstm:reinforced_iron_ingot_mk1", normal location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model mstm:item/reinforced_iron_ingot_mk1 with loader VanillaLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:304) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:153) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_181] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_181] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 3 column 6 path $.parent at com.google.gson.internal.Streams.parse(Streams.java:60) ~[Streams.class:?] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:65) ~[TreeTypeAdapter.class:?] at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:435) ~[JsonUtils.class:?] at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:51) ~[ModelBlock.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:338) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.access$1600(ModelLoader.java:117) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:870) ~[ModelLoader$VanillaLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 20 more Caused by: com.google.gson.stream.MalformedJsonException: Unterminated object at line 3 column 6 path $.parent at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559) ~[JsonReader.class:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:491) ~[JsonReader.class:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:414) ~[JsonReader.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:738) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714) ~[TypeAdapters$29.class:?] at com.google.gson.internal.Streams.parse(Streams.java:48) ~[Streams.class:?] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:65) ~[TreeTypeAdapter.class:?] at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:435) ~[JsonUtils.class:?] at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:51) ~[ModelBlock.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:338) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.access$1600(ModelLoader.java:117) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:870) ~[ModelLoader$VanillaLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 20 more [22:27:49] [main/ERROR] [FML]: Exception loading model for variant mstm:reinforced_iron_ingot_mk1#inventory for item "mstm:reinforced_iron_ingot_mk1", blockstate location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model mstm:reinforced_iron_ingot_mk1#inventory with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:312) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:153) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_181] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_181] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1182) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 20 more Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 { "parent": "item/generated" "textures": { "layer0": "mstm:items/reinforced_iron_ingot_mk1" } } This is my JSON file. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 4, 2018 Share Posted August 4, 2018 3 minutes ago, H_SerhatY said: { "parent": "item/generated" "textures": { "layer0": "mstm:items/reinforced_iron_ingot_mk1" } } This is my JSON file. You forgot the comma at the end of your parent tag. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 { "parent": "item/generated", "textures": { "layer0": "mstm:items/reinforced_iron_ingot_mk1" } } Like that? Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 4, 2018 Share Posted August 4, 2018 2 minutes ago, H_SerhatY said: Like that? Does it still print the error? Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator. Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 2 minutes ago, Animefan8888 said: Does it still print the error? Oh, man. This is like cold water in the desert (I'm only joking. Thank you ) Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
H_SerhatY Posted August 4, 2018 Author Share Posted August 4, 2018 Ouch. I can't make the BaseBlock class. This is my class: package com.H_SerhatY.MoreStrenghtenedToolsMod.blocks; import com.H_SerhatY.MoreStrenghtenedToolsMod.Main; import com.H_SerhatY.MoreStrenghtenedToolsMod.init.ModBlocks; import com.H_SerhatY.MoreStrenghtenedToolsMod.init.ModItems; import com.H_SerhatY.MoreStrenghtenedToolsMod.util.IHasModel; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class BlockBase extends Block implements IHasModel { public BlockBase(String name, Material material) { super(material); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(CreativeTabs.BUILDING_BLOCKS); ModBlocks.BLOCKS.add(this); ModItems.ITEMS.add(itemBlock(this).setRegistryName(this.getRegistryName())); } @Override public void registerModels() { Main.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory"); } } I know I need to import the itemBlock but I can't do it. Quote My Mods: More Strenghtened Tools Mod: https://www.curseforge.com/minecraft/mc-mods/mstm Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.