add more configuration supports

This commit is contained in:
Tnze
2023-11-19 02:55:30 +08:00
parent 326761e3e8
commit 3761fdbefe
4 changed files with 58 additions and 7 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.p.WorldInfo.RegistryCodec.DimensionType.Find(w.p.DimensionType)
_, currentDimType := w.c.ConfigData.Registries.DimensionType.Find(w.p.DimensionType)
if currentDimType == nil {
return errors.New("dimension type " + w.p.DimensionType + " not found")
}