Shadowing inside 0 light opacity transperent block

Started by onneim on

Topic category: Troubleshooting, bugs, and solutions

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Shadowing inside 0 light opacity transperent block
Thu, 08/28/2025 - 09:57 (edited)

I created my own custom glass block and when I turn on Smooth Lighting option in game it has ugly shadow inside, that isn't suppose to happen, vanilla glass doesn't have it, how do i remove it and make the block look similar to glass, light opacity was set to 0

1

on left vanilla, on right custom glass

Edited by onneim on Thu, 08/28/2025 - 09:57
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok I figured it out, u need…
Thu, 08/28/2025 - 11:18

ok I figured it out, u need to add these two lines of code to your glass block java file and it will remove that ugly shadow inside

first this if u don't have it already

    @Override

public boolean propagatesSkylightDown(BlockState state, BlockGetter reader, BlockPos pos) {
return true;
}

then most importantly this

   
@Override
public float getShadeBrightness(BlockState state, BlockGetter level, BlockPos pos) {
return 1.0F;
}