3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-20 06:50:10 +01:00
Dieser Commit ist enthalten in:
Nassim Jahnke 2023-02-22 18:54:41 +01:00
Ursprung 70c21e995c
Commit aae59658ec
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
5 geänderte Dateien mit 36 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,7 @@ plugins {
allprojects { allprojects {
group = "com.viaversion" group = "com.viaversion"
version = "4.6.0-23w07a-SNAPSHOT" version = "4.6.0-23w08a-SNAPSHOT"
description = "Allow older clients to join newer server versions." description = "Allow older clients to join newer server versions."
} }

Datei anzeigen

@ -75,14 +75,22 @@ public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundP
new CommandRewriter<ClientboundPackets1_19_4>(this) { new CommandRewriter<ClientboundPackets1_19_4>(this) {
@Override @Override
public void handleArgument(final PacketWrapper wrapper, final String argumentType) throws Exception { public void handleArgument(final PacketWrapper wrapper, final String argumentType) throws Exception {
if (argumentType.equals("minecraft:time")) { switch (argumentType) {
case "minecraft:heightmap":
wrapper.write(Type.VAR_INT, 0);
break;
case "minecraft:time":
wrapper.read(Type.INT); // Minimum wrapper.read(Type.INT); // Minimum
} else if (argumentType.equals("minecraft:resource") || argumentType.equals("minecraft:resource_or_tag")) { break;
case "minecraft:resource":
case "minecraft:resource_or_tag":
final String resource = wrapper.read(Type.STRING); final String resource = wrapper.read(Type.STRING);
// Replace damage types with... something // Replace damage types with... something
wrapper.write(Type.STRING, resource.equals("minecraft:damage_type") ? "minecraft:mob_effect" : resource); wrapper.write(Type.STRING, resource.equals("minecraft:damage_type") ? "minecraft:mob_effect" : resource);
} else { break;
default:
super.handleArgument(wrapper, argumentType); super.handleArgument(wrapper, argumentType);
break;
} }
} }
}.registerDeclareCommands1_19(ClientboundPackets1_19_4.DECLARE_COMMANDS); }.registerDeclareCommands1_19(ClientboundPackets1_19_4.DECLARE_COMMANDS);
@ -101,6 +109,7 @@ public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundP
}); });
cancelClientbound(ClientboundPackets1_19_4.BUNDLE); cancelClientbound(ClientboundPackets1_19_4.BUNDLE);
cancelClientbound(ClientboundPackets1_19_4.CHUNK_BIOMES); // We definitely do not want to cache every single chunk just to resent them with new biomes
} }
@Override @Override

Datei anzeigen

@ -78,6 +78,20 @@ public final class EntityPackets1_19_4 extends EntityRewriter<ClientboundPackets
} }
}); });
protocol.registerClientbound(ClientboundPackets1_19_4.PLAYER_POSITION, new PacketHandlers() {
@Override
protected void register() {
map(Type.DOUBLE); // X
map(Type.DOUBLE); // Y
map(Type.DOUBLE); // Z
map(Type.FLOAT); // Yaw
map(Type.FLOAT); // Pitch
map(Type.UNSIGNED_BYTE); // Relative arguments
map(Type.VAR_INT); // Id
create(Type.BOOLEAN, false); // Dismount vehicle
}
});
protocol.registerClientbound(ClientboundPackets1_19_4.DAMAGE_EVENT, ClientboundPackets1_19_3.ENTITY_STATUS, new PacketHandlers() { protocol.registerClientbound(ClientboundPackets1_19_4.DAMAGE_EVENT, ClientboundPackets1_19_3.ENTITY_STATUS, new PacketHandlers() {
@Override @Override
public void register() { public void register() {

Datei anzeigen

@ -272,5 +272,8 @@
}, },
"entitynames": { "entitynames": {
"sniffer": "Sniffer" "sniffer": "Sniffer"
},
"argumenttypes": {
"minecraft:heightmap": "brigadier:string"
} }
} }

Datei anzeigen

@ -3,7 +3,7 @@ metadata.format.version = "1.1"
[versions] [versions]
# ViaVersion # ViaVersion
viaver = "4.6.0-23w07a-SNAPSHOT" viaver = "4.6.0-23w08a-SNAPSHOT"
# Common provided # Common provided
netty = "4.0.20.Final" netty = "4.0.20.Final"