mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 10:05:12 +01:00
23w18a, maybe
This commit is contained in:
parent
7adadc0d21
commit
891f55192d
@ -200,8 +200,8 @@ public class Protocol1_16To1_15_2 extends AbstractProtocol<ClientboundPackets1_1
|
||||
wrapper.passthrough(Type.BYTE); // Flags
|
||||
|
||||
final PlayerAbilitiesProvider playerAbilities = Via.getManager().getProviders().get(PlayerAbilitiesProvider.class);
|
||||
wrapper.write(Type.FLOAT, playerAbilities.getFlyingSpeed());
|
||||
wrapper.write(Type.FLOAT, playerAbilities.getWalkingSpeed());
|
||||
wrapper.write(Type.FLOAT, playerAbilities.getFlyingSpeed(wrapper.user()));
|
||||
wrapper.write(Type.FLOAT, playerAbilities.getWalkingSpeed(wrapper.user()));
|
||||
});
|
||||
|
||||
cancelServerbound(ServerboundPackets1_16.GENERATE_JIGSAW);
|
||||
|
@ -17,15 +17,16 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.protocols.protocol1_16to1_15_2.provider;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.platform.providers.Provider;
|
||||
|
||||
public class PlayerAbilitiesProvider implements Provider {
|
||||
|
||||
public float getFlyingSpeed() {
|
||||
public float getFlyingSpeed(final UserConnection connection) {
|
||||
return 0.05F;
|
||||
}
|
||||
|
||||
public float getWalkingSpeed() {
|
||||
public float getWalkingSpeed(final UserConnection connection) {
|
||||
return 0.1F;
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ public final class InventoryPackets extends ItemRewriter<ClientboundPackets1_19_
|
||||
registerSetCooldown(ClientboundPackets1_19_4.COOLDOWN);
|
||||
registerWindowItems1_17_1(ClientboundPackets1_19_4.WINDOW_ITEMS);
|
||||
registerSetSlot1_17_1(ClientboundPackets1_19_4.SET_SLOT);
|
||||
registerAdvancements(ClientboundPackets1_19_4.ADVANCEMENTS, Type.FLAT_VAR_INT_ITEM);
|
||||
registerEntityEquipmentArray(ClientboundPackets1_19_4.ENTITY_EQUIPMENT);
|
||||
registerClickWindow1_17_1(ServerboundPackets1_19_4.CLICK_WINDOW);
|
||||
registerTradeList1_19(ClientboundPackets1_19_4.TRADE_LIST);
|
||||
@ -62,6 +61,41 @@ public final class InventoryPackets extends ItemRewriter<ClientboundPackets1_19_
|
||||
registerWindowPropertyEnchantmentHandler(ClientboundPackets1_19_4.WINDOW_PROPERTY);
|
||||
registerSpawnParticle1_19(ClientboundPackets1_19_4.SPAWN_PARTICLE);
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19_4.ADVANCEMENTS, wrapper -> {
|
||||
wrapper.passthrough(Type.BOOLEAN); // Reset/clear
|
||||
int size = wrapper.passthrough(Type.VAR_INT); // Mapping size
|
||||
for (int i = 0; i < size; i++) {
|
||||
wrapper.passthrough(Type.STRING); // Identifier
|
||||
|
||||
// Parent
|
||||
if (wrapper.passthrough(Type.BOOLEAN))
|
||||
wrapper.passthrough(Type.STRING);
|
||||
|
||||
// Display data
|
||||
if (wrapper.passthrough(Type.BOOLEAN)) {
|
||||
wrapper.passthrough(Type.COMPONENT); // Title
|
||||
wrapper.passthrough(Type.COMPONENT); // Description
|
||||
handleItemToClient(wrapper.passthrough(Type.FLAT_VAR_INT_ITEM)); // Icon
|
||||
wrapper.passthrough(Type.VAR_INT); // Frame type
|
||||
int flags = wrapper.passthrough(Type.INT); // Flags
|
||||
if ((flags & 1) != 0) {
|
||||
wrapper.passthrough(Type.STRING); // Background texture
|
||||
}
|
||||
wrapper.passthrough(Type.FLOAT); // X
|
||||
wrapper.passthrough(Type.FLOAT); // Y
|
||||
}
|
||||
|
||||
wrapper.passthrough(Type.STRING_ARRAY); // Criteria
|
||||
|
||||
int arrayLength = wrapper.passthrough(Type.VAR_INT);
|
||||
for (int array = 0; array < arrayLength; array++) {
|
||||
wrapper.passthrough(Type.STRING_ARRAY); // String array
|
||||
}
|
||||
|
||||
wrapper.write(Type.BOOLEAN, false); // Sends telemetry
|
||||
}
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_19_4.OPEN_SIGN_EDITOR, wrapper -> {
|
||||
wrapper.passthrough(Type.POSITION1_14);
|
||||
wrapper.write(Type.BOOLEAN, true); // Front text
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Project properties - we put these here so they can be modified without causing a recompile of the build scripts
|
||||
projectVersion=4.7.0-23w17a-SNAPSHOT
|
||||
projectVersion=4.7.0-23w18a-SNAPSHOT
|
||||
|
||||
# Gradle properties
|
||||
org.gradle.daemon=true
|
||||
|
Loading…
Reference in New Issue
Block a user