Jump to content

ShaGTF

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by ShaGTF

  1. Thanks so much! I am sorry for my stupidity. Gotta go learn Java. Thank you again <3
  2. So, yeh, I know what that is. But I dont understand how can I use it in this case. Can u please help me? I would highly appreciate it!
  3. Ok, I get it. But how? I cant understand where should I write it
  4. Hello everyone! Started learning Java and coding Mod, and I faced this problem. So, this is my Pig Ore class (dont ask ) package com.shag.orebosses.init; import java.util.Random; import com.shag.orebosses.Info; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.toposort.TopologicalSort; public class Pig_Ore extends Block{ public Pig_Ore(Material material) { super(material); } public static Block pig_ore; public static void init() { pig_ore = new Block(Material.rock).setUnlocalizedName("pig_ore"); } public static void register() { GameRegistry.registerBlock(pig_ore, pig_ore.getUnlocalizedName().substring(5)); } public static void registerRenders(){ registerRender(pig_ore); } public static void registerRender(Block block){ Item item = Item.getItemFromBlock(block); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item,0, new ModelResourceLocation(Info.id + ":" + item.getUnlocalizedName().substring(5), "inventory")); } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random random) { return 1; } /** * Get the Item that this Block should drop when harvested. */ public Item getItemDropped(IBlockState state, Random rand, int fortune) { return Items.diamond; } } These lines should set the block's drop: public int quantityDropped(Random random) { return 1; } /** * Get the Item that this Block should drop when harvested. */ public Item getItemDropped(IBlockState state, Random rand, int fortune) { return Items.diamond; } } But, they dont! This is my main class: package com.shag.orebosses; import com.shag.orebosses.init.Pig_Ore; import com.shag.orebosses.proxy.CommonProxy; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod (modid = Info.id, name = Info.name, version = Info.version) public class MainClass { @SidedProxy (clientSide = Info.CLIENT_PROXY_CLASS, serverSide = Info.COMMON_PROXY_CLASS) public static CommonProxy proxy; @EventHandler public void preLoad(FMLPreInitializationEvent e) { Pig_Ore.init(); Pig_Ore.register(); Pig_Ore.pig_ore.setHardness(5F); Pig_Ore.pig_ore.setHarvestLevel("pickaxe", 1); } @EventHandler public void load(FMLInitializationEvent e) { proxy.registerRenders(); } @EventHandler public void postLoad(FMLPostInitializationEvent e) { } } Thanks! ~shag
  5. Thank you very much! Its working now! I love you
  6. I was watching MrCrayfish's tutorials.
  7. package com.timsworkshop.food.proxy; import com.timsworkshop.food.init.Items; public class ClientProxy extends CommonProxy { @Override public void registerRenders(){ Items.registerRenders(); } }
  8. Hello. First of, I wanna say that I am a really bad noob in Forge development. I was developing Bukkit stuff previously. But I know basics of Java. So, this is mah code: MainClass: package com.timsworkshop.food; import com.timsworkshop.food.init.ButcherKnifeClass; import com.timsworkshop.food.init.Items; import com.timsworkshop.food.proxy.CommonProxy; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item.ToolMaterial; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.LanguageRegistry; @Mod(modid = Info.MOD_ID, name = Info.MOD_NAME, version = Info.VERSION) public class MainClass { public static ToolMaterial bknife = EnumHelper.addToolMaterial("bknife", 0, 750, 3.0F, 2.0F, 10); @SidedProxy(clientSide = Info.CLIENT_PROXY_CLASS, serverSide = Info.SERVER_PROXY_CLASS) public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent e){ Items.items(); Items.register(); Items.butcher_knife.setCreativeTab(CreativeTabs.tabCombat); LanguageRegistry.addName(Items.butcher_knife, "Butcher Knife"); } @EventHandler public void init(FMLInitializationEvent e){ proxy.registerRenders(); } @EventHandler public void postInit(FMLPostInitializationEvent e){ } } Items.java: package com.timsworkshop.food.init; import com.timsworkshop.food.Info; import com.timsworkshop.food.MainClass; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.registry.GameRegistry; public class Items { //Items&ToolMaterials public static Item butcher_knife; public static void items(){ butcher_knife = new Item().setUnlocalizedName("butcher_knife"); } public static void register(){ GameRegistry.registerItem(butcher_knife = new ButcherKnifeClass("butcher_knife", MainClass.bknife), butcher_knife.getUnlocalizedName().substring(5)); } public static void registerRenders(){ registerRender(butcher_knife); } public static void registerRender(Item item){ Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Info.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } And, ButcherKnifeClass: package com.timsworkshop.food.init; import net.minecraft.item.ItemSword; public class ButcherKnifeClass extends ItemSword { public ButcherKnifeClass(String butcher_knife, ToolMaterial material) { super(material); this.setUnlocalizedName("butcher_knife"); } } Everything working just fine. But... Textures... Here is the path for texture json file: And, for actual texture: Here, what i wrote in json file: { "parent": "builtin/generated", "textures": { "layer0": "cf:butcher_knife/butcher_knife" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } Everything should work just fine. No mistakes. As I thought This is what happened when I start Minecraft: [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found. [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: DOMAIN cf [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------------------------------- [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: domain cf is missing 1 texture [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: domain cf has 1 location: [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: mod cf resources at T:\eclipse\Forge\bin [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: ------------------------- [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: The missing resources for domain cf are: [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: textures/butcher_knife/butcher_knife.png [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: ------------------------- [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: No other errors exist for domain cf [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: ================================================== [18:54:41] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= I am not sure what does it mean. Pls halp ;o Thanks, have a nice day!
  9. I am doing this! It's not working!
  10. I do not delete something
  11. Yes, it does. Post the exact steps you are taking, starting from downloading forge. I downloaded Forge 1.7.10 latest version, then I started gradle and wrote: gradlew setupDecompWorkspace eclipse, then I launched eclipse, pointed workspace to eclipse folder, and when I click to Minecraft folder in Eclipse it says: The project description file (.project) for 'Minecraft' is missing. This file contains important information about the project. The project will not function properly until this file is restored. It, doesn't work for me. Help
  12. It doesn't work
  13. Hi! I have on question. Answer please. When I try to write in cmd: gradlew setupDevWorkspace = it's ok, but when I write gradlew eclipse, it says: "assetDir is deprecated. Use runDir insted! runDir set to Eclipse/asssets" and when I start eclipse, and click on the "minecraft" folder, it says: The project description file (.project) for 'Minecraft' is missing. This file contains important information about the project. The project will not function properly until this file is restored. Windows 8.1 Path to JDK is ok. I am trying on 17.2 Forge. Halp, please ;-;
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.