Skip to content

Commit

Permalink
block/chest.go: Ensure that the block above the chest is transparent.
Browse files Browse the repository at this point in the history
Resolves #582.
  • Loading branch information
JustTalDevelops committed Jul 20, 2022
1 parent d8eb14e commit 8809101
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/block/chest.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ func (c Chest) RemoveViewer(v ContainerViewer, w *world.World, pos cube.Pos) {
}

// Activate ...
func (c Chest) Activate(pos cube.Pos, _ cube.Face, _ *world.World, u item.User) bool {
func (c Chest) Activate(pos cube.Pos, _ cube.Face, w *world.World, u item.User) bool {
if opener, ok := u.(ContainerOpener); ok {
opener.OpenBlockContainer(pos)
if d, ok := w.Block(pos.Side(cube.FaceUp)).(LightDiffuser); ok && d.LightDiffusionLevel() == 0 {
opener.OpenBlockContainer(pos)
}
return true
}
return false
Expand Down

0 comments on commit 8809101

Please sign in to comment.