Started by
gwagwa77777
on
Topic category: Help with Minecraft modding (Java Edition)
hi!! I know that custom 3D models for blocks allows light through by default, but is there any way to disable this? My custom block is being used for the ground layer of a biome and I don't want caves underneath to have light coming through when there shouldn't be.
I've tried changing the transparency types and light opacity levels, it didn't make a difference.
nevermind all i had to do was set the light opacity to 15 LOL
i guess if anyone else is having this issue, set it to 15 instead of 255 like i did
....nevermind again, every time i set it to 15 it just forces itself back to 0.
any ideas on what to do here?
maybe you'll need to lock the block, et in the files, and in one of them (which is a .json) you should find light opacity, put it back to 15
Have you saved the block? Pretty sure X'ing out of the block without pressing the save button doesn't save your block.
it doesnt work for custom models blocks, the opacity resets to 0 its even described on the 'transparent parts' checkbox and the checkbox is locked if the model is custom, this is very annoying tbh, and makes you have to lock the code to change for your custom windows for example.. i wonder why its made like this
i cant find any 'opacity' reference on any of the files of the block, very frustating not even manually i can create windows that actually block light?
these 2 lines u can change:
@Override
public int getLightBlock(BlockState state, BlockGetter world, BlockPos pos) {
return 15; // full light block
}
@Override
public boolean propagatesSkylightDown(BlockState state, BlockGetter reader, BlockPos pos) {
return false;
}
this will make the custom block block the light BUT if u have another source of light near the block will turn pitch black ugly bugged unfortunly