update to fix accidentally pushed broken code
This commit is contained in:
parent
a18548ffc2
commit
fd02dd5d16
2
go.mod
2
go.mod
|
@ -6,7 +6,7 @@ go 1.20
|
||||||
replace github.com/sandertv/gophertunnel => github.com/olebeck/gophertunnel v1.29.0-1
|
replace github.com/sandertv/gophertunnel => github.com/olebeck/gophertunnel v1.29.0-1
|
||||||
|
|
||||||
//replace github.com/df-mc/dragonfly => ./dragonfly
|
//replace github.com/df-mc/dragonfly => ./dragonfly
|
||||||
replace github.com/df-mc/dragonfly => github.com/olebeck/dragonfly v0.9.4-13
|
replace github.com/df-mc/dragonfly => github.com/olebeck/dragonfly v0.9.4-14
|
||||||
|
|
||||||
//replace gioui.org => ./gio
|
//replace gioui.org => ./gio
|
||||||
replace gioui.org => github.com/olebeck/gio v0.0.0-20230427194143-c9c9d8bc704d
|
replace gioui.org => github.com/olebeck/gio v0.0.0-20230427194143-c9c9d8bc704d
|
||||||
|
|
|
@ -39,7 +39,7 @@ func (s *secondaryUser) processLevelChunk(pk *packet.LevelChunk) {
|
||||||
subChunkCount = int(pk.SubChunkCount)
|
subChunkCount = int(pk.SubChunkCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
ch, blockNBTs, err := chunk.NetworkDecode(world.AirRID(), pk.RawPayload, subChunkCount, s.dimension.Range(), s.ispre118, s.hasCustomBlocks)
|
ch, blockNBTs, err := chunk.NetworkDecode(world.AirRID(), pk.RawPayload, subChunkCount, s.ispre118, s.dimension.Range())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Error(err)
|
logrus.Error(err)
|
||||||
return
|
return
|
||||||
|
|
|
@ -37,7 +37,7 @@ func (w *worldsHandler) processLevelChunk(pk *packet.LevelChunk) {
|
||||||
subChunkCount = int(pk.SubChunkCount)
|
subChunkCount = int(pk.SubChunkCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
ch, blockNBTs, err := chunk.NetworkDecode(world.AirRID(), pk.RawPayload, subChunkCount, w.worldState.dimension.Range(), w.serverState.ispre118, w.bp.HasBlocks())
|
ch, blockNBTs, err := chunk.NetworkDecode(world.AirRID(), pk.RawPayload, subChunkCount, w.serverState.ispre118, w.worldState.dimension.Range())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Error(err)
|
logrus.Error(err)
|
||||||
return
|
return
|
||||||
|
|
|
@ -205,14 +205,23 @@ func (s *entityState) ToServerEntity() serverEntity {
|
||||||
}
|
}
|
||||||
entityMetadataToNBT(s.Metadata, e.EntityType.NBT)
|
entityMetadataToNBT(s.Metadata, e.EntityType.NBT)
|
||||||
|
|
||||||
if s.Helmet != nil || s.Chestplate != nil || s.Leggings != nil || s.Boots != nil {
|
if false {
|
||||||
e.EntityType.NBT["Armor"] = []map[string]any{
|
armor := make([]map[string]any, 4)
|
||||||
nbtconv.WriteItem(stackToItem(s.Helmet.Stack), true),
|
if s.Helmet != nil {
|
||||||
nbtconv.WriteItem(stackToItem(s.Chestplate.Stack), true),
|
armor[0] = nbtconv.WriteItem(stackToItem(s.Helmet.Stack), true)
|
||||||
nbtconv.WriteItem(stackToItem(s.Leggings.Stack), true),
|
|
||||||
nbtconv.WriteItem(stackToItem(s.Boots.Stack), true),
|
|
||||||
}
|
}
|
||||||
|
if s.Chestplate != nil {
|
||||||
|
armor[1] = nbtconv.WriteItem(stackToItem(s.Chestplate.Stack), true)
|
||||||
|
}
|
||||||
|
if s.Leggings != nil {
|
||||||
|
armor[2] = nbtconv.WriteItem(stackToItem(s.Leggings.Stack), true)
|
||||||
|
}
|
||||||
|
if s.Boots != nil {
|
||||||
|
armor[3] = nbtconv.WriteItem(stackToItem(s.Boots.Stack), true)
|
||||||
|
}
|
||||||
|
e.EntityType.NBT["Armor"] = armor
|
||||||
}
|
}
|
||||||
|
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue