Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello

 

Alright, I'm trying to make a transparent block. I know about creating blocks etc, and I have done the usual thing. I made a texture with transparency in PAINT.NET, and this is what I did inside my BlockCompactGlass:

 

public class BlockCompactGlass extends Block {
public BlockCompactGlass(int par1, Material par2Material) {
	super(par1, par2Material);
	this.setCreativeTab(CCMain.compactTab);
}

public int quantityDropped(Random par1Random) {
	return 0;
}

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


@Override
public boolean renderAsNormalBlock() {
	return false;
}

@Override
    public int getRenderBlockPass()
{
            return 1;
}
protected boolean canSilkHarvest() {
	return true;
}

public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess,
		int par2, int par3, int par4, int par5)

{

	int i = par1IBlockAccess.getBlockId(par2, par3, par4);

	return i == blockID ? false : true;
}


}

 

 

And this is what it looks like ingame:

 

 

sbxgK9d.png

 

 

As you can see the block on the left is mine, and it does not render water. It also does not show up as transparent in the hotbar.

 

Any help with my issue would be appreciated. I am using forge (build number 7.7.0.604).

 

Thanks,

Moony22

Compact Crafting-The best way to store all your excess items!

  • Author

Alright, thanks for the link. How do I use this with my mod(I'm new to github)? Also, is there any fix for the hot bar as well?

Compact Crafting-The best way to store all your excess items!

  • Author

Oh Okay, thanks. But how is Minecraft Glass transparent in the hotbar? I've looked at the code for BlockGlass.

Compact Crafting-The best way to store all your excess items!

  • Author

Hmm, oh well, I'll just live without it for now.

Compact Crafting-The best way to store all your excess items!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.