update dragonfly

This commit is contained in:
olebeck 2023-03-05 20:44:04 +01:00
parent c93cf7d0f9
commit e8062430e7
3 changed files with 5 additions and 1 deletions

2
go.mod
View File

@ -6,7 +6,7 @@ go 1.19
replace github.com/sandertv/gophertunnel => github.com/olebeck/gophertunnel v1.27.4-1
//replace github.com/df-mc/dragonfly => ./dragonfly
replace github.com/df-mc/dragonfly => github.com/olebeck/dragonfly v0.9.2-1
replace github.com/df-mc/dragonfly => github.com/olebeck/dragonfly v0.9.3-1
require (
github.com/cloudfoundry-attic/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21

View File

@ -50,6 +50,7 @@ func (w *WorldState) processLevelChunk(pk *packet.LevelChunk) {
for _, sub := range ch.Sub() {
if !sub.Empty() {
empty = false
break
}
}
if empty {

View File

@ -20,6 +20,9 @@ func blockColorAt(c *chunk.Chunk, x uint8, y int16, z uint8) (blockColor color.R
} else {
b, found := world.BlockByRuntimeID(rid)
if found {
if d, ok := b.(block.LightDiffuser); ok && d.LightDiffusionLevel() == 0 && y > int16(c.Range().Min()) {
return blockColorAt(c, x, y-1, z)
}
if _, ok := b.(block.Water); ok {
y2 := c.HeightMap().At(x, z)
depth := y - y2