Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block/vine.go: Do not allow overwriting existing vine blocks
Browse files Browse the repository at this point in the history
DaPigGuy committed Dec 20, 2024
1 parent cf60e08 commit 02bfd1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/block/vine.go
Original file line number Diff line number Diff line change
@@ -118,6 +118,10 @@ func (v Vines) UseOnBlock(pos cube.Pos, face cube.Face, _ mgl64.Vec3, tx *world.
if !used {
return false
}
if _, ok := tx.Block(pos).(Vines); ok {
// Do not overwrite existing vine block.
return false
}
//noinspection GoAssignmentToReceiver
v = v.SetAttachment(face.Direction().Opposite(), true)

0 comments on commit 02bfd1b

Please sign in to comment.