Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

TylerCraft10

Members
  • Joined

  • Last visited

Everything posted by TylerCraft10

  1. .

    TylerCraft10 posted a topic in Modder Support
    .
  2. That doesn't seem to work for me. My modid is "darkgems" The file is named "darkgems.png" here is the code I used. darkb = new Darkblock(4002, "darkblock").setUnlocalizedName("dark_block").setHardness(1.5F).setStepSound(Block.soundMetalFootstep).setResistance(10.0F).setTextureName("darkgems:darkgem");;
  3. Hey! I was wondering, how do I add textures to blocks? I'm using 1.6.4 forge, latest one. I have the textures in the right place. I tried it out with items and it works. Can someone tell me the code please ?
  4. Thanks! I just switched the @Init to @EventHandler and now it works! Thanks!
  5. Hey guys! I am new to making forge mods and I need some help. I cannot import the "Init" items. import cpw.mods.fml.common.Mod.Init; I cannot import any items using Init. It says it can not be resolved. If you want my code for the item I am making: My darkgems.java package com.example.Darkgemsmod; /* * Basic importing */ import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; ; /* * Basic needed forge stuff */ @Mod(modid="ModTutorial",name="Mod Tutorial",version="v1") @NetworkMod(clientSideRequired=true,serverSideRequired=false) public class darkgems { /* * ToolMaterial */ //Telling forge that we are creating these //items public static Item darkgem; //tools //Declaring Init @Init public void load(FMLInitializationEvent event){ // define items darkgem = new Darkgem(2000).setUnlocalizedName("darkgem"); // define blocks //adding names //items LanguageRegistry.addName(darkgem, "Dark Gem"); //blocks //crafting } } The Darkgem.java package com.example.Darkgemsmod; import net.minecraft.item.Item; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.*; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; public class Darkgem extends Item { public Darkgem(int par1) { super(par1); //Returns super constructor: par1 is ID setCreativeTab(CreativeTabs.tabMaterials); }//Tells the game what creative mode tab it goes in public void registerIcons(IconRegister reg) { // Make sure to import IconRegister! if (itemID == darkgems.darkgem.itemID) { this.itemIcon = reg.registerIcon("darkgem"); // You can also replace blockID and blockIcon with itemID and itemIcon } } }

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.