mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-22 16:57:40 +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() {
|
||||
ProtocolVersion protocolVersion = Via.getAPI().getServerVersion().highestSupportedProtocolVersion();
|
||||
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_17)) {
|
||||
if (protocolVersion.newerThanOrEqualTo(ProtocolVersion.v1_17)) {
|
||||
new PlayerItemDropListener(this).register();
|
||||
}
|
||||
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_16)) {
|
||||
if (protocolVersion.newerThanOrEqualTo(ProtocolVersion.v1_16)) {
|
||||
new FireExtinguishListener(this).register();
|
||||
}
|
||||
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_14)) {
|
||||
if (protocolVersion.newerThanOrEqualTo(ProtocolVersion.v1_14)) {
|
||||
new LecternInteractListener(this).register();
|
||||
}
|
||||
if (protocolVersion.newerThanOrEquals(ProtocolVersion.v1_12)) {
|
||||
if (protocolVersion.newerThanOrEqualTo(ProtocolVersion.v1_12)) {
|
||||
new FireDamageListener(this).register();
|
||||
}
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ public class BlockItemPackets1_16 extends com.viaversion.viabackwards.api.rewrit
|
||||
}
|
||||
|
||||
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);
|
||||
for (int i = 0; i < 1024; 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
|
||||
if (clientWorld.getEnvironment() != null && dimension == clientWorld.getEnvironment().id()
|
||||
&& (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()))) {
|
||||
PacketWrapper packet = wrapper.create(ClientboundPackets1_15.RESPAWN);
|
||||
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
|
||||
handler(wrapper -> {
|
||||
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
|
||||
CompoundTag biomeRegistry = registry.get("minecraft:worldgen/biome");
|
||||
ListTag biomes = biomeRegistry.get("value");
|
||||
|
Loading…
Reference in New Issue
Block a user