mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-25 12:45:35 +01:00
24w37a
This commit is contained in:
parent
be28d0c3e8
commit
d0eeae92d3
@ -63,15 +63,12 @@ public final class ComponentRewriter1_21_2 extends TranslatableRewriter<Clientbo
|
|||||||
TagUtil.removeNamespaced(componentsTag, "equippable");
|
TagUtil.removeNamespaced(componentsTag, "equippable");
|
||||||
TagUtil.removeNamespaced(componentsTag, "glider");
|
TagUtil.removeNamespaced(componentsTag, "glider");
|
||||||
TagUtil.removeNamespaced(componentsTag, "tooltip_style");
|
TagUtil.removeNamespaced(componentsTag, "tooltip_style");
|
||||||
|
TagUtil.removeNamespaced(componentsTag, "death_protection");
|
||||||
|
TagUtil.removeNamespaced(componentsTag, "damage_resistant");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SerializerVersion inputSerializerVersion() {
|
protected SerializerVersion inputSerializerVersion() {
|
||||||
return SerializerVersion.V1_20_5;
|
return SerializerVersion.V1_20_5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected SerializerVersion outputSerializerVersion() {
|
|
||||||
return SerializerVersion.V1_20_5;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.viaversion.viabackwards.protocol.v1_21_2to1_21.rewriter;
|
package com.viaversion.viabackwards.protocol.v1_21_2to1_21.rewriter;
|
||||||
|
|
||||||
|
import com.viaversion.nbt.tag.Tag;
|
||||||
import com.viaversion.viabackwards.api.rewriters.EntityRewriter;
|
import com.viaversion.viabackwards.api.rewriters.EntityRewriter;
|
||||||
import com.viaversion.viabackwards.protocol.v1_21_2to1_21.Protocol1_21_2To1_21;
|
import com.viaversion.viabackwards.protocol.v1_21_2to1_21.Protocol1_21_2To1_21;
|
||||||
import com.viaversion.viaversion.api.minecraft.RegistryEntry;
|
import com.viaversion.viaversion.api.minecraft.RegistryEntry;
|
||||||
@ -111,11 +112,8 @@ public final class EntityPacketRewriter1_21_2 extends EntityRewriter<Clientbound
|
|||||||
double movementY = wrapper.read(Types.DOUBLE);
|
double movementY = wrapper.read(Types.DOUBLE);
|
||||||
double movementZ = wrapper.read(Types.DOUBLE);
|
double movementZ = wrapper.read(Types.DOUBLE);
|
||||||
|
|
||||||
// Unpack y and x rot
|
wrapper.passthrough(Types.FLOAT); // Y rot
|
||||||
final byte yaw = wrapper.read(Types.BYTE);
|
wrapper.passthrough(Types.FLOAT); // X rot
|
||||||
final byte pitch = wrapper.read(Types.BYTE);
|
|
||||||
wrapper.write(Types.FLOAT, yaw * 360F / 256F);
|
|
||||||
wrapper.write(Types.FLOAT, pitch * 360F / 256F);
|
|
||||||
|
|
||||||
// Just keep the new values in there
|
// Just keep the new values in there
|
||||||
final int relativeArguments = wrapper.read(Types.INT);
|
final int relativeArguments = wrapper.read(Types.INT);
|
||||||
@ -234,7 +232,8 @@ public final class EntityPacketRewriter1_21_2 extends EntityRewriter<Clientbound
|
|||||||
wrapper.passthrough(Types.VAR_INT); // Latency
|
wrapper.passthrough(Types.VAR_INT); // Latency
|
||||||
}
|
}
|
||||||
if (actions.get(5)) {
|
if (actions.get(5)) {
|
||||||
wrapper.passthrough(Types.TAG); // Display name
|
final Tag displayName = wrapper.passthrough(Types.TAG);
|
||||||
|
protocol.getComponentRewriter().processTag(wrapper.user(), displayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// New one
|
// New one
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user