Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 16:12:42 +01:00
Ursprung
2e59a51734
Commit
e298a7efac
@ -237,6 +237,6 @@ public abstract class Type<T> implements ByteBufReader<T>, ByteBufWriter<T> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Type|" + typeName;
|
||||
return typeName;
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,9 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public class BukkitViaInjector extends LegacyViaInjector {
|
||||
|
||||
private static final boolean HAS_SHARED_CONSTANTS = PaperViaInjector.hasClass("net.minecraft.SharedConstants") && PaperViaInjector.hasClass("net.minecraft.WorldVersion");
|
||||
private static final boolean HAS_WORLD_VERSION_PROTOCOL_VERSION = PaperViaInjector.hasClass("net.minecraft.SharedConstants")
|
||||
&& PaperViaInjector.hasClass("net.minecraft.WorldVersion")
|
||||
&& !PaperViaInjector.hasClass("com.mojang.bridge.game.GameVersion");
|
||||
|
||||
@Override
|
||||
public void inject() throws ReflectiveOperationException {
|
||||
@ -65,7 +67,7 @@ public class BukkitViaInjector extends LegacyViaInjector {
|
||||
return Bukkit.getUnsafe().getProtocolVersion();
|
||||
}
|
||||
|
||||
return HAS_SHARED_CONSTANTS ? cursedProtocolDetection() : veryCursedProtocolDetection();
|
||||
return HAS_WORLD_VERSION_PROTOCOL_VERSION ? cursedProtocolDetection() : veryCursedProtocolDetection();
|
||||
}
|
||||
|
||||
private int cursedProtocolDetection() throws ReflectiveOperationException {
|
||||
@ -187,7 +189,7 @@ public class BukkitViaInjector extends LegacyViaInjector {
|
||||
|
||||
@Override
|
||||
public boolean lateProtocolVersionSetting() {
|
||||
return !(PaperViaInjector.PAPER_PROTOCOL_METHOD || HAS_SHARED_CONSTANTS);
|
||||
return !(PaperViaInjector.PAPER_PROTOCOL_METHOD || HAS_WORLD_VERSION_PROTOCOL_VERSION);
|
||||
}
|
||||
|
||||
public boolean isBinded() {
|
||||
|
@ -509,10 +509,10 @@ public class PacketWrapperImpl implements PacketWrapper {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PacketWrapper{" +
|
||||
"packetType=" + packetType +
|
||||
"type=" + packetType +
|
||||
", id=" + id +
|
||||
", packetValues=" + packetValues +
|
||||
", readableObjects=" + readableObjects +
|
||||
", values=" + packetValues +
|
||||
", readable=" + readableObjects +
|
||||
'}';
|
||||
}
|
||||
|
||||
@ -555,10 +555,7 @@ public class PacketWrapperImpl implements PacketWrapper {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{"
|
||||
+ type +
|
||||
", " + value +
|
||||
'}';
|
||||
return "{" + type + ": " + value + "}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren