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

Sometimes my textures don't load when I test my mod in Eclipse.

 

I have to stress the Sometimes part.

 

Here's what's happening:

1.) I click Run, everything loads up, no errors. Textures work great.

2.) I close Minecraft (using the Close button at the top or doing exit, if that matters, sometimes using the stop button in the console).

3.) I do Absolutely Nothing to my code.

4.) Click Run again, error's for missing textures everywhere.

5.) Repeat 2 & 3

6.) Sometimes Some of the textures load, Sometimes All the textures load, but mostly, they don't load.

 

Relevant Code:

 

Main:

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.t1junox.alpoh.block.AlpohBlocks;
import net.t1junox.alpoh.item.AlpohItems;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;


@Mod(modid = Alpoh.MODID, name = Alpoh.NAME, version = Alpoh.VERSION, acceptedMinecraftVersions = "[1.7.10]")
public class Alpoh {

@SidedProxy(clientSide = "net.t1junox.alpoh.ClientProxy", serverSide = "net.t1junox.alpoh.CommonProxy")
public static CommonProxy proxy;

public static final String MODID = "t1junox_alpoh";
public static final String NAME = "A Little Piece of Haven";
public static final String VERSION = "v0.0.1";

@Instance(MODID)
public static Alpoh instance;

public static CreativeTabs alpohTabs;

AlpohBlocks alpohBlocks = new AlpohBlocks();
AlpohItems alpohItems = new AlpohItems();

@EventHandler
public void PreInit(FMLPreInitializationEvent preEvent){
	alpohTabs = new CreativeTabs(MODID){
		@SideOnly(Side.CLIENT)
		public Item getTabIconItem(){
			return Items.apple;
		}
	};

	alpohBlocks.loadBlocks();
	alpohItems.loadItems();

}

 

BlocksClass:

import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraftforge.common.MinecraftForge;
import net.t1junox.alpoh.Alpoh;

public class AlpohBlocks{

//Ore Blocks
public static Block oreCopper; //textured

public void loadBlocks(){
	oreCopper = new AlpohBlockOre("oreCopper");
	registerBlock(oreCopper);

}

public void registerBlock(Block block){
	GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));
}

}

 

BlockOre Class

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.t1junox.alpoh.Alpoh;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class AlpohBlockOre extends Block{

public AlpohBlockOre(String name) {
	super(Material.rock);
	this.setHardness(3F);
	this.setResistance(5.0F);
	this.setBlockName(name);
	this.setCreativeTab(Alpoh.alpohTabs); 

}

@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister){
	this.blockIcon = iconRegister.registerIcon(Alpoh.MODID + ":" + this.getUnlocalizedName().substring(5));
	System.out.println(Alpoh.MODID + ".Block Registered: " + Alpoh.MODID + ":" + this.getUnlocalizedName().substring(5));
}

}

 

The Error I SOMETIMES get in the Console (Error occurs During loading up minecraft before the title screen):

[16:50:31] [Client thread/ERROR]: Using missing texture, unable to load t1junox_alpoh:textures/blocks/oreCopper.png
java.io.FileNotFoundException: t1junox_alpoh:textures/blocks/oreCopper.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:592) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:941) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_10]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_10]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_10]
at java.lang.reflect.Method.invoke(Method.java:601) ~[?:1.7.0_10]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_10]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_10]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_10]
at java.lang.reflect.Method.invoke(Method.java:601) ~[?:1.7.0_10]
at GradleStart.bounce(GradleStart.java:107) [start/:?]
at GradleStart.startClient(GradleStart.java:100) [start/:?]
at GradleStart.main(GradleStart.java:55) [start/:?]

 

There are no other Error Messages besides these (I Have more than 1 block/item, I just posted the one for the sample). All the other Errors are Identical except its the name of my other block/item textures.

 

And my textures are saved in: src/main/resources/assets/t1junox_alpoh/textures/blocks

And named correctly.

 

My only idea of what it could be is:

1.) Because I pass a string into my Block Ore Class its messing things up.

2.) I Use two different classes to load/register my Items and Blocks separately.

(However I have tried loading a block or two into the preinit, before calling my blockloads, like any normal block tutorial would do, and still have the same issue.)

 

I quit for a week because it was giving me a headache and for the life of me couldn't find anything wrong.

 

I can not stress enough that SOMETIMES they work.

  • 1 year later...

Did you have the "new" loading screen on?  This is still an issue.

Written by me, executed by me, dead to me.

Guest
This topic is now closed to further replies.

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.