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

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");

}

 

}

 

 

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.

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.