Jump to content

Textures Not Showing


Astronaut

Recommended Posts

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)

  {

           

  }

 

}

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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