Jump to content

impavelow

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by impavelow

  1. Okay so i added the rendering thing to ClientProxy: public class ClientProxy extends ServerProxy{ public void registerRenderInfo() { Item PavelowOre = GameRegistry.findItem("pavelow", "PavelowOre"); ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation("pavelow:PavelowOre", "inventory"); final int DEFAULT_ITEM_SUBTYPE = 0; Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(PavelowOre, DEFAULT_ITEM_SUBTYPE, itemModelResourceLocation); } } And add proxy.registerRenderInfo() to Init but i still get an error when i start up Minecraft.
  2. Okay, so i am having troubles with adding in a texture for my block. This is the code i have for the block: package com.pavelow.main; import com.pavelow.lib.RefStrings; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.EnumWorldBlockLayer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class PavelowOre extends Block { public PavelowOre (Material material) { super(material); setUnlocalizedName("PavelowOre"); setHardness(4.0f); setStepSound(Block.soundTypeStone); setCreativeTab(CreativeTabs.tabBlock); setHarvestLevel("pickaxe",3); } And that works i guess but i think the problem comes down to the main file: @Mod(modid = RefStrings.MODID , name = RefStrings.NAME, version = RefStrings.VERSION) public class mainRegistry { @SidedProxy(clientSide = RefStrings.CLIENTSiDE , serverSide = RefStrings.SERVERSIDE) public static ServerProxy proxy; public final static Block PavelowOre = new PavelowOre(Material.rock); @EventHandler public static void PreLoad(FMLPreInitializationEvent PreEvent) { proxy.registerRenderInfo(); GameRegistry.registerBlock(PavelowOre, "PavelowOre"); } @EventHandler public static void Load(FMLInitializationEvent event) { if(event.getSide() == Side.CLIENT) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(PavelowOre), 0, new ModelResourceLocation(RefStrings.MODID + ":" + PavelowOre.getUnlocalizedName().substring(5), "inventory")); } I have the json files all in the right place and have the right things in it, but i again i think the problem lies in the main files.
  3. Okay new question, easy way to texture the ore? I tried looking at the link you gave me but it didn't make any sense at all. EDIT: i already have the texture made and its located at src/main/resources/assets/textures/blocks/PavelowOre.png
  4. Ok i got it, i was being dumb and thought there was an already made file that i was supposed to add, i realized i had to make my own when i saw the modid part. And i have another question about this. When i do "gradlew build" will that file be included. EDIT: It does indead.
  5. Yeah i typed that in wrong, but what am i supposed to add tot the folder?
  6. Okay i will try and look at the files that are already there but the problem is that when i look in the package manager, under src/main/java/resources the only thing there is mcmod.info
  7. Okay i did all of this but when i load into the game i get tile.Pavelow Ore.name Block PavelowOre = new PavelowOre(Material.rock); GameRegistry.registerBlock(PavelowOre, "PavelowOre"); .... setUnlocalizedName("Pavelow Ore"); Did i put something in the wrong place?
  8. Okay well i really did forgot that minecraft wasn't going to be using ids anymore and i do remember somewhere that the setUnlocalizedName is to be used in 1.7+ instead of setBlockName. And thanks for the help!
  9. Okay so i ran into a two issues, one is given my block an certain id, the other is setting the in game name, before i updated to 1.7 the setBlockName was a valid method but didn't work. Now after i updated to 1.8 its no longer a valid method and i have no clue what to do about naming the block. package com.pavelow.main; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class PavelowOre extends Block { public PavelowOre (int id, Material material) { //This shows up as an error super(id, material); setHardness(4.0f); setStepSound(Block.soundTypeStone); setCreativeTab(CreativeTabs.tabBlock); setHarvestLevel("pickaxe",3); } }
×
×
  • Create New...

Important Information

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