mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-22 16:57:40 +01:00
23w08a
This commit is contained in:
parent
70c21e995c
commit
aae59658ec
@ -5,7 +5,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
group = "com.viaversion"
|
||||
version = "4.6.0-23w07a-SNAPSHOT"
|
||||
version = "4.6.0-23w08a-SNAPSHOT"
|
||||
description = "Allow older clients to join newer server versions."
|
||||
}
|
||||
|
||||
|
@ -75,14 +75,22 @@ public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundP
|
||||
new CommandRewriter<ClientboundPackets1_19_4>(this) {
|
||||
@Override
|
||||
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
|
||||
} 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);
|
||||
// Replace damage types with... something
|
||||
wrapper.write(Type.STRING, resource.equals("minecraft:damage_type") ? "minecraft:mob_effect" : resource);
|
||||
} else {
|
||||
break;
|
||||
default:
|
||||
super.handleArgument(wrapper, argumentType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}.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.CHUNK_BIOMES); // We definitely do not want to cache every single chunk just to resent them with new biomes
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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() {
|
||||
@Override
|
||||
public void register() {
|
||||
|
@ -272,5 +272,8 @@
|
||||
},
|
||||
"entitynames": {
|
||||
"sniffer": "Sniffer"
|
||||
},
|
||||
"argumenttypes": {
|
||||
"minecraft:heightmap": "brigadier:string"
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ metadata.format.version = "1.1"
|
||||
[versions]
|
||||
|
||||
# ViaVersion
|
||||
viaver = "4.6.0-23w07a-SNAPSHOT"
|
||||
viaver = "4.6.0-23w08a-SNAPSHOT"
|
||||
|
||||
# Common provided
|
||||
netty = "4.0.20.Final"
|
||||
|
Loading…
Reference in New Issue
Block a user