Jump to content

[1.7.10]: Using missing texture, unable to load


alven

Recommended Posts

Hi, I have problem with loading texture for my custom block. Console keep saying : Using missing texture, unable to load... and I cant solve it. I think i have textures in right folder but they still dont work. What is strange is that my language file works.

Here is BlockrockBrick.java:

 

package com.alven4;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.*;

 

public class BlockrockBrick extends Block {

public BlockrockBrick(Material rock) {

super(Material.rock);

setBlockName("rockBrick");

setBlockTextureName(MOD.MODID+":"+"rockBrick");

setCreativeTab(CreativeTabs.tabBlock);

// TODO Auto-generated constructor stub

}}

 

My folder system looks:

 

src/main/

            java

                  com/alven4

                              MOD.java

                              BlockrockBrick.java

           

            resources/assets/MOD

                                          lang/en_US.lang

                                          textures/blocks/rockBrick.png

 

And here my main code:

 

package com.alven4;

 

import java.io.File;

 

import net.minecraft.block.Block;

import net.minecraft.init.Blocks;

import net.minecraft.init.Items;

import net.minecraft.item.ItemStack;

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.event.FMLPreInitializationEvent;

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

 

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

public class MOD

{

    public static final String MODID = "MOD";

    public static final String VERSION = "4.0";

   

    public static Block rockBrick;

   

 

@EventHandler

    public void preinit(FMLPreInitializationEvent event)

    {

    rockBrick  = new BlockrockBrick(null);

   

    GameRegistry.registerBlock(rockBrick, "rockBrick");

   

    ItemStack starStack = new ItemStack(Items.nether_star);

GameRegistry.addRecipe(new ItemStack(Blocks.command_block,1), new Object[]{"121","212","121",

'1',starStack,'2',new ItemStack(Blocks.bedrock)});

 

GameRegistry.addShapelessRecipe(new ItemStack(Items.iron_ingot,1), new Object[]{

new ItemStack(Blocks.rail),new ItemStack(Blocks.rail),new ItemStack(Blocks.rail),new ItemStack(Blocks.rail)

});

 

GameRegistry.addSmelting(Blocks.diamond_block, new ItemStack(Blocks.lava), (float) 0.001);

GameRegistry.addRecipe(new ItemStack(Blocks.bedrock), new Object[]{

"LLL","LLL","LLL",'L',new ItemStack(Blocks.lava)

});

    }

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

// some example code

        System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName());

    }

}

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.