Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-16 04:50:07 +01:00
Remove casting from block mappings
Dieser Commit ist enthalten in:
Ursprung
ca2312c7f6
Commit
835ba9e24f
@ -44,7 +44,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
@Builder
|
@Builder
|
||||||
@Value
|
@Value
|
||||||
public class BlockMappings implements DefinitionRegistry<GeyserBedrockBlock> {
|
public class BlockMappings implements DefinitionRegistry<BlockDefinition> {
|
||||||
GeyserBedrockBlock bedrockAir;
|
GeyserBedrockBlock bedrockAir;
|
||||||
BlockDefinition bedrockWater;
|
BlockDefinition bedrockWater;
|
||||||
BlockDefinition bedrockMovingBlock;
|
BlockDefinition bedrockMovingBlock;
|
||||||
@ -134,7 +134,7 @@ public class BlockMappings implements DefinitionRegistry<GeyserBedrockBlock> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRegistered(GeyserBedrockBlock bedrockBlock) {
|
public boolean isRegistered(BlockDefinition bedrockBlock) {
|
||||||
return getDefinition(bedrockBlock.getRuntimeId()) == bedrockBlock;
|
return getDefinition(bedrockBlock.getRuntimeId()) == bedrockBlock;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -57,7 +57,6 @@ import org.cloudburstmc.protocol.bedrock.data.command.SoftEnumUpdateType;
|
|||||||
import org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag;
|
import org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.inventory.ItemData;
|
import org.cloudburstmc.protocol.bedrock.data.inventory.ItemData;
|
||||||
import org.cloudburstmc.protocol.bedrock.packet.*;
|
import org.cloudburstmc.protocol.bedrock.packet.*;
|
||||||
import org.cloudburstmc.protocol.common.DefinitionRegistry;
|
|
||||||
import org.cloudburstmc.protocol.common.util.OptionalBoolean;
|
import org.cloudburstmc.protocol.common.util.OptionalBoolean;
|
||||||
import org.geysermc.api.util.BedrockPlatform;
|
import org.geysermc.api.util.BedrockPlatform;
|
||||||
import org.geysermc.api.util.InputMode;
|
import org.geysermc.api.util.InputMode;
|
||||||
@ -1466,7 +1465,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
|||||||
|
|
||||||
private void startGame() {
|
private void startGame() {
|
||||||
this.upstream.getCodecHelper().setItemDefinitions(this.itemMappings);
|
this.upstream.getCodecHelper().setItemDefinitions(this.itemMappings);
|
||||||
this.upstream.getCodecHelper().setBlockDefinitions((DefinitionRegistry) this.blockMappings); //FIXME
|
this.upstream.getCodecHelper().setBlockDefinitions(this.blockMappings);
|
||||||
this.upstream.getCodecHelper().setCameraPresetDefinitions(CameraDefinitions.CAMERA_DEFINITIONS);
|
this.upstream.getCodecHelper().setCameraPresetDefinitions(CameraDefinitions.CAMERA_DEFINITIONS);
|
||||||
|
|
||||||
StartGamePacket startGamePacket = new StartGamePacket();
|
StartGamePacket startGamePacket = new StartGamePacket();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren