Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-09-07 13:22:54 +02:00
Fix 1.13.1->1.13 statistics
Dieser Commit ist enthalten in:
Ursprung
b1af6ad721
Commit
0b93cd0e09
@ -8,7 +8,6 @@ import us.myles.ViaVersion.api.PacketWrapper;
|
|||||||
import us.myles.ViaVersion.api.minecraft.item.Item;
|
import us.myles.ViaVersion.api.minecraft.item.Item;
|
||||||
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
||||||
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
||||||
import us.myles.ViaVersion.api.rewriters.StatisticsRewriter;
|
|
||||||
import us.myles.ViaVersion.api.type.Type;
|
import us.myles.ViaVersion.api.type.Type;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ClientboundPackets1_13;
|
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ClientboundPackets1_13;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ServerboundPackets1_13;
|
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ServerboundPackets1_13;
|
||||||
@ -73,22 +72,5 @@ public class Protocol1_13_1To1_13_2 extends BackwardsProtocol<ClientboundPackets
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
new StatisticsRewriter(this, id -> {
|
|
||||||
int newId = id;
|
|
||||||
if (newId > 40) {
|
|
||||||
if (id == 41) return -1;
|
|
||||||
newId--;
|
|
||||||
}
|
|
||||||
if (newId > 25) {
|
|
||||||
if (id <= 28) return -1;
|
|
||||||
newId -= 3;
|
|
||||||
}
|
|
||||||
if (newId > 22) {
|
|
||||||
if (id <= 24) return -1;
|
|
||||||
newId -= 2;
|
|
||||||
}
|
|
||||||
return newId;
|
|
||||||
}).register(ClientboundPackets1_13.STATISTICS);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import us.myles.ViaVersion.api.minecraft.item.Item;
|
|||||||
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
||||||
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
||||||
import us.myles.ViaVersion.api.remapper.ValueTransformer;
|
import us.myles.ViaVersion.api.remapper.ValueTransformer;
|
||||||
|
import us.myles.ViaVersion.api.rewriters.StatisticsRewriter;
|
||||||
import us.myles.ViaVersion.api.rewriters.TagRewriter;
|
import us.myles.ViaVersion.api.rewriters.TagRewriter;
|
||||||
import us.myles.ViaVersion.api.type.Type;
|
import us.myles.ViaVersion.api.type.Type;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13;
|
import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13;
|
||||||
@ -168,6 +169,7 @@ public class Protocol1_13To1_13_1 extends BackwardsProtocol<ClientboundPackets1_
|
|||||||
});
|
});
|
||||||
|
|
||||||
new TagRewriter(this, null).register(ClientboundPackets1_13.TAGS);
|
new TagRewriter(this, null).register(ClientboundPackets1_13.TAGS);
|
||||||
|
new StatisticsRewriter(this, null).register(ClientboundPackets1_13.STATISTICS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren