Jump to content

My mod texture don't work :(


pieterx12

Recommended Posts

Hi everyone,

I have a problem with my code for my mod. The block texture will not show on my minecraft screen and the console gives this error:

unable to load basic:textures/blocks/meteorblock.png

can someone help me this is my code :

 

Basic.java :

package tutorial.basic;

 

 

 

import tutorial.basic.blocks.ModBlocks;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.init.Blocks;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

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

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

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

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

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

 

@Mod(modid="basic", name="basic", version="1.0.0")

 

public class basic {

    public final static String NAME = "basic";

       

   

        @Instance("basic")

        public static basic instance;

     

        // Says where the client and server 'proxy' code is loaded.

        @SidedProxy(clientSide="tutorial.basic.client.ClientProxy", serverSide="tutorial.basic.CommonProxy")

        public static CommonProxy proxy;

     

 

        @EventHandler

        public void load(FMLInitializationEvent event) {

                proxy.registerRenderers();

                ItemStack dirt = new ItemStack(Blocks.dirt);

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

                "yyy" ,

                "yxy" ,

                "yyy" ,

                'y', Blocks.sponge, 'x', Blocks.bedrock, 'z', Items.arrow

                });

                GameRegistry.addSmelting(Blocks.bedrock, new ItemStack(Blocks.obsidian), 20F); 

   

        }

       

    @EventHandler

        public void preInit(FMLPreInitializationEvent event) {

             

      ModBlocks.init();

        }

     

}

 

And

MeteorBlock.java :

package tutorial.basic.blocks;

 

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

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

 

public class MeteorBlock extends Block {

 

public MeteorBlock(){

super(Material.rock);

setBlockName("meteorblock");

setCreativeTab(CreativeTabs.tabBlock);

GameRegistry.registerBlock(this, "meteorblock");

setBlockTextureName("basic:meteorblock");

}

 

}

 

 

Link to comment
Share on other sites

You should move this to Mod Support!

 

In eclipse (which I am assuming you use) create a package in the src folder called "src/main/resources" and call it "assets.YOURMODID.textures.blocks" where you replace YOURMODID with suprise your modid! Just add the meteorblock.png file in this package and it shoud load!

 

(PS If any mod can move this to mod support please DO!)

I try not to be mean about your english (as my own isn't the best either) but sometimes I can't help myself!

If you get mad at me for this or any other reason, please look at the profile picture so you'll feel better (and pretier) than me!

Thanks.

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.

×
×
  • Create New...

Important Information

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