Mojira Archive
MC-266877

(Trap-)Doors never occlude light (event if opaque)

The following block states do not occlude light event though, they are fully opaque (which is contrary to the expectation):

Trapdoors:

spruce, birch, dark oak

 

Doors:

spruce, birch, dark oak, mangrove, warped, crimson

as well as all lower halves except acacia and cherry (cherry only due to two texels)

 

Resolution:

According to my own untested analysis (off mojang+yarn-spigot deobfuscated server code), this issue should be resolved, by not calling .noOcclusion() on the specified trapdoors and doors in the Blocks class,
as well as adding:

```
public boolean useShapeForLightOcclusion(BlockState state)

{ return true; }

```

to the DoorBlock and TrapDoorBlock classes.

 

Additionally (at least for the doors that need only one half corrected)

```
public VoxelShape getOcclusionShape(BlockState state, BlockGetter world, BlockPos pos);
```

has to be overwritten to return Shapes.empty() if the half includes transparency.

 

Duplicate

MoritzR200

2023-11-20, 11:17 AM

2023-11-20, 03:46 PM

2023-11-20, 03:45 PM

0

2

Unconfirmed

(Unassigned)

1.20.2, 23w46a

-