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.

Featured Replies

Posted

Does anyone know why my textures aren't showing?

 

I'm running Forge 1.7.2

 

Screenshot of Package Explorer:

 

M6A03Ip.png

 

 

Code:

 

 

package net.drlc.iridiumforest;

 

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.registry.GameRegistry;

 

@Mod(modid= BaseMod.MODID, version = BaseMod.VERSION)

public class BaseMod

{

  public static final String MODID = "iridiumforest";

  public static final String VERSION = "Oatmeal";

 

  public static Block iridiumBlock;

  public static Item iridiumIngot;

 

  public static CreativeTabs iridiumTab = new CreativeTabs("iridiumTab"){

  public Item getTabIconItem() {

  return Items.baked_potato;

  }

 

  };

 

  @EventHandler

  public void preInit(FMLInitializationEvent event)

  {

    iridiumIngot = new Item().setCreativeTab(iridiumTab).setUnlocalizedName("iridiumIngot").setTextureName(MODID + ":iridiumBar");

    GameRegistry.registerItem(iridiumIngot, "iridiumIngot");

 

    iridiumBlock = new IridiumBlock().func_149647_a(iridiumTab).func_149663_c("iridiumBlock").func_149658_d(MODID + ":iridiumBlock");

    GameRegistry.registerBlock(iridiumBlock, "iridiumBlock");

  }

 

  @EventHandler

  public void init(FMLInitializationEvent event)

  {

           

  }

 

}

 

in my opinion it's easier to have the setTexture etc in the specific Item or Block class

 

Item Example:

public ApprenticeMystStone(){
	super();
	this.setUnlocalizedName("apprenticemystStone");
	this.setTextureName(text);
}

        private String text = mystcrops.MODID + ":apprenticemystStone";

 

Block Example:

private String texture = "CrystalRevolution:crystal_ore";

public OreCrystal(Material mat) {
	super(mat);
	this.setBlockName("OreCrystal");
	this.setBlockTextureName(texture);
}

 

i'm using it like this because it's easier. Hope this helped u

  • Author

in my opinion it's easier to have the setTexture etc in the specific Item or Block class

 

Item Example:

public ApprenticeMystStone(){
	super();
	this.setUnlocalizedName("apprenticemystStone");
	this.setTextureName(text);
}

        private String text = mystcrops.MODID + ":apprenticemystStone";

 

Block Example:

private String texture = "CrystalRevolution:crystal_ore";

public OreCrystal(Material mat) {
	super(mat);
	this.setBlockName("OreCrystal");
	this.setBlockTextureName(texture);
}

 

i'm using it like this because it's easier. Hope this helped u

 

I don't think it changes anything, all that is being done is instead of passing in the String, you're passing in a variable that stores the same String...

  • Author

Which tutorial are you following? This guy needs his face beaten up. Seriously.

I have seen this so many times now.

Code goes into src/main/java ONLY.

Textures and assets go into src/main/resources ONLY.

Do NOT make another source folder (e.g. src/whatever), do not pass go, do not collect $200.

 

So the classes should go in the default package?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.