Jump to content

Recommended Posts

Posted

Soo err.. I'm trying to create a block and the texture isn't loading. Error is: Using missing texture, unable to load: jadencraft:textures/blocks/Amethyst.png

 

package jadenCraft.block;

import jadenCraft.Tutorial;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;

public class BlockAmethyst extends Block {

public BlockAmethyst(int par1, Material par2Material) {
	super(par1, par2Material);
	this.setCreativeTab(CreativeTabs.tabBlock);
	this.setHardness(6);
	this.setResistance(5);
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IconRegister iconRegister) {
	blockIcon = iconRegister.registerIcon("JadenCraft" + ":" + "Amethyst");
}
}

 

edit: More info. Here's the path: mod\mcp\src\minecraft\assets\jadencraft\blocks\Amethyst.png. Saved 16px by 16px. 32 bit.

 

Posted

First i saw that:

mod\mcp\src\minecraft\assets\jadencraft\blocks\Amethyst.png

What is normally must be in

src/main/resources/assets/modid/...

 

Question 2: are you in 1.6.4? in 1.7.2? in 1.7.10? in 1.8?

case 1.6.4: sorry i can't help you.

case 1.7.2 & 1.7.10: if yours block has same texture on all sides in

public BlockAmethyst(int par1, Material par2Material) {
	super(par1, par2Material);
	this.setCreativeTab(CreativeTabs.tabBlock);
	this.setHardness(6);
	this.setResistance(5);
}

add

this.setTextureName("JadenCraft:Amethyst")

case 1.8: now there is no IIcons and setTextureName. In folder assets/modid/models/block create file with name of your block .json. Inside write:

{
    "parent": "block/cube_all",
    "textures": {
        "all": "JadenCraft:Amethyst"
    }
}

Create file in assets/modid/models/item/yours_block.json . Write inside:

{
    "parent": "JadenCraft:block/Amethyst",
    "display": {
        "thirdperson": {
            "rotation": [ 10, -45, 170 ],
            "translation": [ 0, 1.5, -2.75 ],
            "scale": [ 0.375, 0.375, 0.375 ]
        }
    }
}

create file assets/modid/blockstates/yours_block.json and write inside:

{
    "variants": {
        "normal": { "model": "JadenCraft:Amethyst" }
    }
}

WARNING: fml 1.8 is alpha, bugs can appear.

 

if all didn't work, check if folder JadenCraft has the same name like in code.

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.