Update adapters to support 1.19.3 and add biome command completions

This commit is contained in:
Camotoy 2022-12-13 13:53:28 -05:00
parent 6876a90c3b
commit 7c26036906
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
6 changed files with 98 additions and 22 deletions

View file

@ -32,6 +32,7 @@ import org.geysermc.geyser.adapters.spigot.SpigotAdapters;
import org.geysermc.geyser.adapters.spigot.SpigotWorldAdapter;
import org.geysermc.geyser.level.block.BlockStateValues;
import org.geysermc.geyser.session.GeyserSession;
import org.jetbrains.annotations.Nullable;
public class GeyserSpigotNativeWorldManager extends GeyserSpigotWorldManager {
protected final SpigotWorldAdapter adapter;
@ -49,4 +50,12 @@ public class GeyserSpigotNativeWorldManager extends GeyserSpigotWorldManager {
}
return adapter.getBlockAt(player.getWorld(), x, y, z);
}
@Nullable
@Override
public String[] getBiomeIdentifiers(boolean withTags) {
// Biome identifiers will basically always be the same for one server, since you have to re-send the
// ClientboundLoginPacket to change the registry. Therefore, don't bother caching for each player.
return adapter.getBiomeSuggestions(withTags);
}
}