Jump to content

Texture Register Error


SantacreeperLP

Recommended Posts

I've coded an multi-textured-block in 1.7.2 , but it doesn't work . Here is the code:

package DETheLegendOfGaming.RedPow0rReloaded;

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.block.Block;

import net.minecraft.block.BlockLog;

import net.minecraft.block.BlockRotatedPillar;

import net.minecraft.block.material.Material;

import net.minecraft.client.renderer.texture.IIconRegister;

import net.minecraft.util.IIcon;

import net.minecraft.world.IBlockAccess;

 

public class blockRubberWood extends BlockRotatedPillar {

@SideOnly(Side.CLIENT)

    protected IIcon[] blockRubberWood_top;

    @SideOnly(Side.CLIENT)

    protected IIcon[] blockRubberWood_side;

    private static final String __OBFID = "CL_00000266";

   

    public blockRubberWood(Material p_i45394_1_) {

super(p_i45394_1_);

// TODO Auto-generated constructor stub

this.setCreativeTab(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.tabProjectRedAddon);

this.setHardness(2.0F);

        this.setStepSound(soundTypeWood);

        this.setBlockTextureName(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood_up");

}

   

    @SideOnly(Side.CLIENT)

    public static IIcon topIcon;

    @SideOnly(Side.CLIENT)

    public static IIcon bottomIcon;

    @SideOnly(Side.CLIENT)

    public static IIcon sideIcon;

   

public int getRenderType()

    {

        return 31;

    }

 

@SideOnly(Side.CLIENT)

public void registerIcons(IIconRegister icon) {

topIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_up");

bottomIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_up");

sideIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_side");

 

}

 

 

public static void init() {

 

}

 

 

 

 

 

    @Override

    public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z)

    {

        return true;

    }

 

    @Override

    public boolean isWood(IBlockAccess world, int x, int y, int z)

    {

        return true;

    }

 

@Override

public IIcon getSideIcon(int var1) {

// TODO Auto-generated method stub

return sideIcon;

 

}

public IIcon getTopIcon(int var1) {

// TODO Auto-generated method stub

return topIcon;

 

}

public IIcon getBottomIcon(int var1) {

// TODO Auto-generated method stub

return bottomIcon;

 

}

 

 

 

 

}

 

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.

Announcements



×
×
  • Create New...

Important Information

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