Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 00:22:53 +01:00
Update VV usage
Dieser Commit ist enthalten in:
Ursprung
5a3a82a83d
Commit
45c44c8f7e
@ -171,7 +171,7 @@ public class BlockItemPackets1_16 extends com.viaversion.viabackwards.api.rewrit
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chunk.isBiomeData()) {
|
if (chunk.isBiomeData()) {
|
||||||
if (wrapper.user().getProtocolInfo().getServerProtocolVersion() >= ProtocolVersion.v1_16_2.getVersion()) {
|
if (wrapper.user().getProtocolInfo().serverProtocolVersion().newerThanOrEquals(ProtocolVersion.v1_16_2)) {
|
||||||
BiomeStorage biomeStorage = wrapper.user().get(BiomeStorage.class);
|
BiomeStorage biomeStorage = wrapper.user().get(BiomeStorage.class);
|
||||||
for (int i = 0; i < 1024; i++) {
|
for (int i = 0; i < 1024; i++) {
|
||||||
int biome = chunk.getBiomeData()[i];
|
int biome = chunk.getBiomeData()[i];
|
||||||
|
@ -119,7 +119,7 @@ public class EntityPackets1_16 extends EntityRewriter<ClientboundPackets1_16, Pr
|
|||||||
// Send a dummy respawn with a different dimension if the world name was different and the same dimension was used
|
// Send a dummy respawn with a different dimension if the world name was different and the same dimension was used
|
||||||
if (clientWorld.getEnvironment() != null && dimension == clientWorld.getEnvironment().id()
|
if (clientWorld.getEnvironment() != null && dimension == clientWorld.getEnvironment().id()
|
||||||
&& (wrapper.user().isClientSide() || Via.getPlatform().isProxy()
|
&& (wrapper.user().isClientSide() || Via.getPlatform().isProxy()
|
||||||
|| wrapper.user().getProtocolInfo().protocolVersion().lowerThanOrEquals(ProtocolVersion.v1_12_2) // Hotfix for https://github.com/ViaVersion/ViaBackwards/issues/381
|
|| wrapper.user().getProtocolInfo().protocolVersion().olderThanOrEquals(ProtocolVersion.v1_12_2) // Hotfix for https://github.com/ViaVersion/ViaBackwards/issues/381
|
||||||
|| !nextWorldName.equals(worldNameTracker.getWorldName()))) {
|
|| !nextWorldName.equals(worldNameTracker.getWorldName()))) {
|
||||||
PacketWrapper packet = wrapper.create(ClientboundPackets1_15.RESPAWN);
|
PacketWrapper packet = wrapper.create(ClientboundPackets1_15.RESPAWN);
|
||||||
packet.write(Type.INT, dimension == 0 ? -1 : 0);
|
packet.write(Type.INT, dimension == 0 ? -1 : 0);
|
||||||
|
@ -73,7 +73,7 @@ public class EntityPackets1_16_2 extends EntityRewriter<ClientboundPackets1_16_2
|
|||||||
map(Type.STRING_ARRAY); // World List
|
map(Type.STRING_ARRAY); // World List
|
||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
CompoundTag registry = wrapper.read(Type.NAMED_COMPOUND_TAG);
|
CompoundTag registry = wrapper.read(Type.NAMED_COMPOUND_TAG);
|
||||||
if (wrapper.user().getProtocolInfo().protocolVersion().lowerThanOrEquals(ProtocolVersion.v1_15_2)) {
|
if (wrapper.user().getProtocolInfo().protocolVersion().olderThanOrEquals(ProtocolVersion.v1_15_2)) {
|
||||||
// Store biomes for <1.16 client handling
|
// Store biomes for <1.16 client handling
|
||||||
CompoundTag biomeRegistry = registry.get("minecraft:worldgen/biome");
|
CompoundTag biomeRegistry = registry.get("minecraft:worldgen/biome");
|
||||||
ListTag biomes = biomeRegistry.get("value");
|
ListTag biomes = biomeRegistry.get("value");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren