Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 08:10:11 +01:00
Fix NPE with dimension handling in online mode
This change should be fine since all dimensions are iterated through in the registry cache
Dieser Commit ist enthalten in:
Ursprung
26c4c5250a
Commit
4820893792
@ -716,9 +716,10 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
|||||||
* Send all necessary packets to load Bedrock into the server
|
* Send all necessary packets to load Bedrock into the server
|
||||||
*/
|
*/
|
||||||
public void connect() {
|
public void connect() {
|
||||||
int minY = this.dimensionType.minY();
|
// Note: this.dimensionType may be null here if the player is connecting from online mode
|
||||||
int maxY = this.dimensionType.maxY();
|
int minY = BedrockDimension.OVERWORLD.minY();
|
||||||
for (JavaDimension javaDimension : this.getRegistryCache().dimensions().values()) {
|
int maxY = BedrockDimension.OVERWORLD.maxY();
|
||||||
|
for (JavaDimension javaDimension : this.registryCache.dimensions().values()) {
|
||||||
if (javaDimension.bedrockId() == BedrockDimension.OVERWORLD_ID) {
|
if (javaDimension.bedrockId() == BedrockDimension.OVERWORLD_ID) {
|
||||||
minY = Math.min(minY, javaDimension.minY());
|
minY = Math.min(minY, javaDimension.minY());
|
||||||
maxY = Math.max(maxY, javaDimension.maxY());
|
maxY = Math.max(maxY, javaDimension.maxY());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren