Add some patches, fix compile

This commit is contained in:
Spottedleaf
2023-09-22 15:33:14 -07:00
parent 9bf842c13e
commit 1efbbb3ef9
35 changed files with 308 additions and 235 deletions

View File

@@ -30,7 +30,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return;
+ }
+
+ if (event.getServerHostname() != null) packet.hostName = event.getServerHostname();
+ if (event.getServerHostname() != null) {
+ // change hostname
+ packet = new ClientIntentionPacket(
+ packet.protocolVersion(),
+ event.getServerHostname(),
+ packet.port(),
+ packet.intention()
+ );
+ }
+ if (event.getSocketAddressHostname() != null) this.connection.address = new java.net.InetSocketAddress(event.getSocketAddressHostname(), socketAddress instanceof java.net.InetSocketAddress ? ((java.net.InetSocketAddress) socketAddress).getPort() : 0);
+ this.connection.spoofedUUID = event.getUniqueId();
+ this.connection.spoofedProfile = gson.fromJson(event.getPropertiesJson(), com.mojang.authlib.properties.Property[].class);