Add registry receiving function

This commit is contained in:
Tnze
2024-06-16 02:12:56 +08:00
parent 40b32dfdd7
commit 19945a6d0b
7 changed files with 158 additions and 27 deletions

View File

@ -41,7 +41,7 @@ func (w *World) onPlayerSpawn(pk.Packet) error {
func (w *World) handleLevelChunkWithLightPacket(packet pk.Packet) error {
var pos level.ChunkPos
_, currentDimType := w.c.ConfigData.Registries.DimensionType.Find(w.p.DimensionType)
_, currentDimType := w.c.Registries.DimensionType.Find(w.p.DimensionType)
if currentDimType == nil {
return errors.New("dimension type " + w.p.DimensionType + " not found")
}