Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 16:12:46 +01:00
Misc 1.20 fixes (#3828)
* Update mappings
diff: f69b4db9a6...2989dbd7e1
* 1.20 boat entity variants and remove old check in UpstreamPacketHandler
Dieser Commit ist enthalten in:
Ursprung
8b8d6ddb9e
Commit
4ab9eb4920
@ -125,8 +125,8 @@ public class BoatEntity extends Entity {
|
||||
public void setVariant(IntEntityMetadata entityMetadata) {
|
||||
variant = entityMetadata.getPrimitiveValue();
|
||||
dirtyMetadata.put(EntityDataTypes.VARIANT, switch (variant) {
|
||||
case 6, 7 -> variant - 1; // Dark oak and mangrove
|
||||
case 5, 8 -> 0; // TODO temp until 1.20. Cherry and bamboo
|
||||
case 6, 7, 8 -> variant - 1; // dark_oak, mangrove, bamboo
|
||||
case 5 -> 8; // cherry
|
||||
default -> variant;
|
||||
});
|
||||
}
|
||||
|
@ -85,8 +85,6 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
|
||||
return translateAndDefault(packet);
|
||||
}
|
||||
|
||||
private boolean newProtocol = false; // TEMPORARY
|
||||
|
||||
private boolean setCorrectCodec(int protocolVersion) {
|
||||
BedrockCodec packetCodec = GameProtocol.getBedrockCodec(protocolVersion);
|
||||
if (packetCodec == null) {
|
||||
@ -125,9 +123,7 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
|
||||
|
||||
@Override
|
||||
public PacketSignal handle(RequestNetworkSettingsPacket packet) {
|
||||
if (setCorrectCodec(packet.getProtocolVersion())) {
|
||||
newProtocol = true;
|
||||
} else {
|
||||
if (!setCorrectCodec(packet.getProtocolVersion())) {
|
||||
return PacketSignal.HANDLED;
|
||||
}
|
||||
|
||||
@ -152,14 +148,6 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
|
||||
return PacketSignal.HANDLED;
|
||||
}
|
||||
|
||||
// session.getUpstream().getSession().getCodec() == null
|
||||
|
||||
if (!newProtocol) {
|
||||
if (!setCorrectCodec(loginPacket.getProtocolVersion())) { // REMOVE WHEN ONLY 1.19.30 IS SUPPORTED OR 1.20
|
||||
return PacketSignal.HANDLED;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the block translation based off of version
|
||||
session.setBlockMappings(BlockRegistries.BLOCKS.forVersion(loginPacket.getProtocolVersion()));
|
||||
session.setItemMappings(Registries.ITEMS.forVersion(loginPacket.getProtocolVersion()));
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit f69b4db9a6f0e8fff8b29564195c76074210b924
|
||||
Subproject commit 7800f07692d8636a58ac8611ae6fa7b8d3d3a3b3
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren