Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Update 1.9 -> 1.8 ATTACH_ENTITY data reading (#3144)
Dieser Commit ist enthalten in:
Ursprung
43ad855499
Commit
10efba31cf
@ -61,12 +61,12 @@ public class EntityPackets {
|
|||||||
map(Type.INT); // 0 - Entity ID
|
map(Type.INT); // 0 - Entity ID
|
||||||
map(Type.INT); // 1 - Vehicle
|
map(Type.INT); // 1 - Vehicle
|
||||||
|
|
||||||
// Leash boolean is removed in new versions
|
// Leash state is removed in new versions
|
||||||
map(Type.BOOLEAN, new ValueTransformer<Boolean, Void>(Type.NOTHING) {
|
map(Type.UNSIGNED_BYTE, new ValueTransformer<Short, Void>(Type.NOTHING) {
|
||||||
@Override
|
@Override
|
||||||
public Void transform(PacketWrapper wrapper, Boolean inputValue) throws Exception {
|
public Void transform(PacketWrapper wrapper, Short inputValue) throws Exception {
|
||||||
EntityTracker1_9 tracker = wrapper.user().getEntityTracker(Protocol1_9To1_8.class);
|
EntityTracker1_9 tracker = wrapper.user().getEntityTracker(Protocol1_9To1_8.class);
|
||||||
if (!inputValue) {
|
if (inputValue == 0) {
|
||||||
int passenger = wrapper.get(Type.INT, 0);
|
int passenger = wrapper.get(Type.INT, 0);
|
||||||
int vehicle = wrapper.get(Type.INT, 1);
|
int vehicle = wrapper.get(Type.INT, 1);
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren