Jump to content

Recommended Posts

Posted

Hi there

 

wondering if someone can help.

 

i made a model block with a techne model. its works fine. but problem is when i try to add a icon to the block the icon overlaps the rendered block and doesnt work as the icon.  I'm happy to show code if required.

 

regards

Jeremy

Posted

Do you want to add a icon so that the particles are correct, or do you actually want it to render the icon at the side of the block?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

i want to render the icon in the inventory not on the block as i have a render model already on the block which is working fine..

 

at the moment if i set

 

 

	public void registerIcons(IconRegister IconRegister){
	blockIcon = IconRegister.registerIcon(Basicinfo.ID.toLowerCase() + ":lighthanging");
}

 

it overlaps the blcoks rendered texture. and in the invertory it shows a block which the icon i wanted. but not icon only. i can show screen shot if need be

Posted

Look in the block class for the method 'shouldSideBeRendered()' and overridetat method to return false. That way the block doesn't render the icon in the world, but it is in the inventory.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

i found this

 

@SideOnly(Side.CLIENT)
    /**
     * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
     * coordinates.  Args: blockAccess, x, y, z, side
     */
    public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
        return par5 == 0 && this.minY > 0.0D ? true : (par5 == 1 && this.maxY < 1.0D ? true : (par5 == 2 && this.minZ > 0.0D ? true : (par5 == 3 && this.maxZ < 1.0D ? true : (par5 == 4 && this.minX > 0.0D ? true : (par5 == 5 && this.maxX < 1.0D ? true : !par1IBlockAccess.isBlockOpaqueCube(par2, par3, par4))))));
    }

 

i put it in with a override and ran with no success and i couldnt find anything about overridetat

Posted

Look in the block class for the method 'shouldSideBeRendered()' and overridetat method to return false. That way the block doesn't render the icon in the world, but it is in the inventory.

 

Above is a spelling fail! The words are actually, "override that". Please read it again the proper way.

Posted

sequituri  do you mean this?

 

@override
@SideOnly(Side.CLIENT)
    /**
     * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
     * coordinates.  Args: blockAccess, x, y, z, side
     */
    public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
        return par5 == 0 && this.minY > 0.0D ? true : (par5 == 1 && this.maxY < 1.0D ? true : (par5 == 2 && this.minZ > 0.0D ? true : (par5 == 3 && this.maxZ < 1.0D ? true : (par5 == 4 && this.minX > 0.0D ? true : (par5 == 5 && this.maxX < 1.0D ? true : !par1IBlockAccess.isBlockOpaqueCube(par2, par3, par4))))));
    }

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.