Jump to content

Recommended Posts

Posted

I'm trying to make a pane to go along with my glass block but the top half of the texture doesn't show up as shown below:

sp88eq.jpg

 

The console log from the start of the error:

http://pastebin.com/qNyvUFm5

 

This is the code I'm using:

package com.starlight.blocks;

import java.util.List;

import com.starlight.main.StarlightMain;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPane;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemDye;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;

public class volcanicGlassPane extends BlockPane {

    private static final IIcon[] volcanicGlass_1 = new IIcon[16];
    private static final IIcon[] volcanicGlass_2 = new IIcon[16];

public volcanicGlassPane()
{
	super("volcanicGlass", "volcanicGlass_sidep", Material.glass, false);	
	this.setStepSound(soundTypeGlass);
	this.setBlockTextureName("starlight:volcanicGlass");
	this.setLightOpacity(5);
}

@SideOnly(Side.CLIENT)
public boolean isOpaqueCube()
{
return false;
}

    @SideOnly(Side.CLIENT)
    public int getRenderBlockPass()
    {
        return 1;
    }

@SideOnly(Side.CLIENT)
    public IIcon func_149735_b(int p_149735_1_, int p_149735_2_)
    {
        return volcanicGlass_1[p_149735_2_ % volcanicGlass_2.length];
    }

    @SideOnly(Side.CLIENT)
    public IIcon func_150104_b(int p_150104_1_)
    {
        return volcanicGlass_2[~p_150104_1_ & 15];
    }

    @SideOnly(Side.CLIENT)
    public IIcon getIcon(int p_149691_1_, int p_149691_2_)
    {
        return this.func_149735_b(p_149691_1_, ~p_149691_2_ & 15);
    }

    @SideOnly(Side.CLIENT)
    public void registerBlockIcons(IIconRegister p_149651_1_)
    {
        super.registerBlockIcons(p_149651_1_);

        for (int i = 0; i < volcanicGlass_1.length; ++i)
        {
        	volcanicGlass_1[i] = p_149651_1_.registerIcon("starlight:volcanicGlass" + "");
        	volcanicGlass_2[i] = p_149651_1_.registerIcon("starlight:volcanicGlass" + "_side");
        }
    }
}

Posted

Hi

 

" Using missing texture, unable to load " is a very common error and it means your texture name doesn't match the filename / location.

 

If you search this forum for "tgg using missing texture" you'll find a few answers.

 

-TGG

Posted

I'm trying to make a pane to go along with my glass block but the top half of the texture doesn't show up as shown below:

sp88eq.jpg

 

The console log from the start of the error:

http://pastebin.com/qNyvUFm5

 

This is the code I'm using:

package com.starlight.blocks;

import java.util.List;

import com.starlight.main.StarlightMain;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPane;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemDye;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;

public class volcanicGlassPane extends BlockPane {

    private static final IIcon[] volcanicGlass_1 = new IIcon[16];
    private static final IIcon[] volcanicGlass_2 = new IIcon[16];

public volcanicGlassPane()
{
	super("volcanicGlass", "volcanicGlass_sidep", Material.glass, false);	
	this.setStepSound(soundTypeGlass);
	this.setBlockTextureName("starlight:volcanicGlass");
	this.setLightOpacity(5);
}

@SideOnly(Side.CLIENT)
public boolean isOpaqueCube()
{
return false;
}

    @SideOnly(Side.CLIENT)
    public int getRenderBlockPass()
    {
        return 1;
    }

@SideOnly(Side.CLIENT)
    public IIcon func_149735_b(int p_149735_1_, int p_149735_2_)
    {
        return volcanicGlass_1[p_149735_2_ % volcanicGlass_2.length];
    }

    @SideOnly(Side.CLIENT)
    public IIcon func_150104_b(int p_150104_1_)
    {
        return volcanicGlass_2[~p_150104_1_ & 15];
    }

    @SideOnly(Side.CLIENT)
    public IIcon getIcon(int p_149691_1_, int p_149691_2_)
    {
        return this.func_149735_b(p_149691_1_, ~p_149691_2_ & 15);
    }

    @SideOnly(Side.CLIENT)
    public void registerBlockIcons(IIconRegister p_149651_1_)
    {
        super.registerBlockIcons(p_149651_1_);

        for (int i = 0; i < volcanicGlass_1.length; ++i)
        {
        	volcanicGlass_1[i] = p_149651_1_.registerIcon("starlight:volcanicGlass" + "");
        	volcanicGlass_2[i] = p_149651_1_.registerIcon("starlight:volcanicGlass" + "_side");
        }
    }
}

 

Remove

 super.registerBlockIcons(p_149651_1_);

as you don't need it (since you register your own icons anyway) and it actually causes said error.

 

Then see if you still get the texture error.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

 

Remove

 super.registerBlockIcons(p_149651_1_);

as you don't need it (since you register your own icons anyway) and it actually causes said error.

 

Then see if you still get the texture error.

 

Doing that makes me crash when I place it.

http://pastebin.com/RMSpg5ai

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.