mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-22 12:16:21 +01:00
Rename methods once again
This commit is contained in:
parent
96d6c0697e
commit
8f417b6caa
@ -46,16 +46,16 @@ public class BukkitPlugin extends JavaPlugin implements ViaBackwardsPlatform {
|
|||||||
|
|
||||||
private void enable() {
|
private void enable() {
|
||||||
ProtocolVersion protocolVersion = Via.getAPI().getServerVersion().highestSupportedProtocolVersion();
|
ProtocolVersion protocolVersion = Via.getAPI().getServerVersion().highestSupportedProtocolVersion();
|
||||||
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_17)) {
|
if (protocolVersion.newerThanOrEqualTo(ProtocolVersion.v1_17)) {
|
||||||
new PlayerItemDropListener(this).register();
|
new PlayerItemDropListener(this).register();
|
||||||
}
|
}
|
||||||
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_16)) {
|
if (protocolVersion.newerThanOrEqualTo(ProtocolVersion.v1_16)) {
|
||||||
new FireExtinguishListener(this).register();
|
new FireExtinguishListener(this).register();
|
||||||
}
|
}
|
||||||
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_14)) {
|
if (protocolVersion.newerThanOrEqualTo(ProtocolVersion.v1_14)) {
|
||||||
new LecternInteractListener(this).register();
|
new LecternInteractListener(this).register();
|
||||||
}
|
}
|
||||||
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_12)) {
|
if (protocolVersion.newerThanOrEqualTo(ProtocolVersion.v1_12)) {
|
||||||
new FireDamageListener(this).register();
|
new FireDamageListener(this).register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ public class BlockItemPackets1_16 extends com.viaversion.viabackwards.api.rewrit
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (chunk.isBiomeData()) {
|
if (chunk.isBiomeData()) {
|
||||||
if (wrapper.user().getProtocolInfo().serverProtocolVersion().newerThanOrEquals(ProtocolVersion.v1_16_2)) {
|
if (wrapper.user().getProtocolInfo().serverProtocolVersion().newerThanOrEqualTo(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().olderThanOrEquals(ProtocolVersion.v1_12_2) // Hotfix for https://github.com/ViaVersion/ViaBackwards/issues/381
|
|| wrapper.user().getProtocolInfo().protocolVersion().olderThanOrEqualTo(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().olderThanOrEquals(ProtocolVersion.v1_15_2)) {
|
if (wrapper.user().getProtocolInfo().protocolVersion().olderThanOrEqualTo(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");
|
||||||
|
Loading…
Reference in New Issue
Block a user