Jump to content

Recommended Posts

Posted

My textures dont work for some reason, and I am seeing this error keep coming up.

 

 

[12:31:05] [Client thread/ERROR]: Using missing texture, unable to load spiritcraft:textures/blocks/SampleBlock.png

 

 

And the textures in game are the checkerboard errored textures.

 

 

My Code

 

package com.example.SpiritCraft;

 

import com.example.SpiritCraft.block.MysteriousOreClass;

import com.example.SpiritCraft.generation.OreGenerationClass;

import com.example.SpiritCraft.items.MysteriousCrystalClass;

import com.example.SpiritCraft.proxy.ProxyCommon;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

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.registry.GameRegistry;

 

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

public class SpiritCraft

{

    public static final String MODID = "spiritcraft";

    public static final String VERSION = "1.0";

   

   

    @Instance(value = MODID)

    public static SpiritCraft instance;

   

    @SidedProxy(clientSide = "com.example.SpiritCraft.proxy.ProxyClient", serverSide = "com.example.SpiritCraft.proxy.ProxyCommon")

    public static ProxyCommon proxy;

   

    //----------------------

   

    //Blocks

    public static Block MysteriousOre = new MysteriousOreClass(Material.rock).setBlockName("MysteriousOre").setCreativeTab(CreativeTabs.tabBlock);

   

    //Items

    public static Item MysteriousCrystal = new MysteriousCrystalClass().setUnlocalizedName("MysteriousCrystal");

   

    //Generation

    public static OreGenerationClass OreGen = new OreGenerationClass();

   

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

    //Crafting

    GameRegistry.addShapelessRecipe(new ItemStack(Blocks.farmland, 10), Blocks.dirt, Items.stone_hoe);

    //Smelting

    GameRegistry.addSmelting(Blocks.coal_block, new ItemStack(Items.diamond), 0.1f);

    }

    @EventHandler

    public void load (FMLInitializationEvent event) {

    proxy.registerRenderers();

    }

   

    public SpiritCraft() {

    GameRegistry.registerBlock(MysteriousOre, "MysteriousOre");

    GameRegistry.registerItem(MysteriousCrystal, "MysteriousCrystal");

    //World Generation

    GameRegistry.registerWorldGenerator(OreGen, 1);

    }

   

}

 

 

Block Code

 

package com.example.SpiritCraft.block;

 

import java.util.Random;

 

import com.example.SpiritCraft.SpiritCraft;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.item.Item;

 

public class MysteriousOreClass extends Block{

 

public MysteriousOreClass(Material p_i45394_1_) {

super(p_i45394_1_);

setHardness(9F);

setResistance(6F);

setBlockTextureName(SpiritCraft.MODID + ":MysteriousOre");

// TODO Auto-generated constructor stub

}

@Override

public Item getItemDropped(int par1, Random par2Random, int par3){

return SpiritCraft.MysteriousCrystal;

}

 

}

 

 

 

Item Code

 

package com.example.SpiritCraft.items;

 

import com.example.SpiritCraft.SpiritCraft;

 

import net.minecraft.item.Item;

 

public class MysteriousCrystalClass extends Item {

 

public MysteriousCrystalClass() {

setTextureName(SpiritCraft.MODID + ":MysteriousCrystal");

}

 

}

 

 

 

 

 

Here is how I have everything arranged.

ezimba16640687239700.png

 

 

Everything else works fine. The ores generate and drop the item, but just the textures dont appear.

 

I have also seen that this is a very common problem people struggle with. If anyone could help me to get my textures to work than it would be great.

Posted

Okay, now my arrangment looks like this C:\Users\alex\Desktop\SpiritCraft\src\main\resources\assets\spiritcraft\textures\block

 

ANd I changed my assets to this

ezimba16640615754600.png

 

 

 

Still doesnt work  :-[

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.