Skip to content

Commit a321f03

Browse files
committed
block/block.go: Allow more blocks to support gravity affected blocks
1 parent 389cab2 commit a321f03

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

server/block/block.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package block
33
import (
44
"github.com/df-mc/dragonfly/server/block/cube"
55
"github.com/df-mc/dragonfly/server/block/customblock"
6-
"github.com/df-mc/dragonfly/server/block/model"
76
"github.com/df-mc/dragonfly/server/item"
87
"github.com/df-mc/dragonfly/server/world"
98
"github.com/df-mc/dragonfly/server/world/sound"
@@ -224,9 +223,7 @@ func (g gravityAffected) Solidifies(cube.Pos, *world.Tx) bool {
224223

225224
// fall spawns a falling block entity at the given position.
226225
func (g gravityAffected) fall(b world.Block, pos cube.Pos, tx *world.Tx) {
227-
_, air := tx.Block(pos.Side(cube.FaceDown)).Model().(model.Empty)
228-
_, liquid := tx.Liquid(pos.Side(cube.FaceDown))
229-
if air || liquid {
226+
if replaceableWith(tx, pos.Side(cube.FaceDown), b) {
230227
tx.SetBlock(pos, nil, nil)
231228
opts := world.EntitySpawnOpts{Position: pos.Vec3Centre()}
232229
tx.AddEntity(tx.World().EntityRegistry().Config().FallingBlock(opts, b))

0 commit comments

Comments
 (0)