SecretRoomsMod

SecretRoomsMod

10M Downloads

[1.14.4] Deactivated one-way glass texture does not render slab-connected side.

fuzzyweapon opened this issue ยท 3 comments

commented
app version
MC 1.14.4
Forge 28.1.61
SR 6.0.5

Steps

  1. Set down some secret glass (but do not right click a face with an empty hand, aka, don't activate camo)
  2. Place a slab against the side of the secret glass (vanilla slab is fine and placement can be top or bottom)
  3. Observe the glass texture for the side that the slab is placed on

Observed Results

The texture of the side of deactivated one-way glass doesn't render on the side to which the slab is connected.

Extra Notes

  • this also occurs with vertical slabs (used ones from Quark)
  • activating a side while the slab is connected (or before connecting) renders the texture correctly
  • bug occurring with or without latest stable Optifine (1.14.4_HD_U_F4)

Screenshots

Activated

image

Deactivated

image

commented

That's certainly an interesting bug. One way glass is a tricky one as there's so many different use cases and scenarios. I reckon it's being caused here:

public VoxelShape getRenderShape(BlockState state, IBlockReader worldIn, BlockPos pos) {
Optional<BlockState> mirror = getMirrorState(worldIn, pos);
return state.get(SOLID) && mirror.isPresent() ?
VoxelShapes.or(VoxelShapes.empty(),
Arrays.stream(Direction.values())
.filter(value -> !state.get(SixWayBlock.FACING_TO_PROPERTY_MAP.get(value)) && Block.hasSolidSide(mirror.get(), worldIn, pos.offset(value), value.getOpposite()))
.map(FACING_TO_SHAPE_MAP::get)
.toArray(VoxelShape[]::new)
)
: VoxelShapes.empty();
, where the rendering shape doesn't get set correctly when there are no glass shapes present. Returning the empty voxel shape means that all culling should take place.

A few questions to help diagnose:

  • Does the same happen when the slab is a bottom slab, rather than a top slab?
  • Also, could you place the one way glass on some stained glass and if the slab stops it being rendered it, then place the glass on a cake and test the same.
commented

Finding more (different) edge cases with this further testing XD, but I'll put those in separately after further testing.

  • yes it happens when the slab is in the bottom position.
  • [stained glass] + [deactivated one way glass] + [slab] in this horizontal configuration = does trigger bug on the slab side
  • deactivated glass with cake (tested cake on all sides) = triggers bug for all sides

Additional unasked for testing:

  • I also found out that this happens on the top with secret room items if, say, you put a secret redstone door on top (which I think bodes well for this bug bc that means it's predictable).
commented

Does this still occur