File tree Expand file tree Collapse file tree
src/main/java/pl/skidam/automodpack/networking Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616import net .minecraft .network .packet .s2c .login .LoginQueryRequestPayload ;
1717/*?}*/
1818
19+ import static pl .skidam .automodpack_core .GlobalVariables .LOGGER ;
20+
1921public class LoginQueryParser {
2022 public Packet <?> packet ;
2123 public boolean success = true ;
@@ -30,7 +32,6 @@ public LoginQueryParser(Packet<?> packet) {
3032 /*this.queryId = packetS2C.getQueryId();
3133 this.buf = packetS2C.getPayload();
3234 this.channelName = packetS2C.getChannel();
33- this.success = true;
3435 */ /*?} else {*/
3536 this .queryId = packetS2C .queryId ();
3637 LoginQueryRequestPayload payload = packetS2C .payload ();
@@ -44,7 +45,6 @@ public LoginQueryParser(Packet<?> packet) {
4445 /*? if <1.20.2 {*/
4546 /*this.queryId = packetC2S.getQueryId();
4647 this.buf = packetC2S.getResponse();
47- this.success = true;
4848 */ /*?} else {*/
4949 this .queryId = packetC2S .queryId ();
5050 LoginQueryResponsePayload payload = packetC2S .response ();
@@ -55,7 +55,7 @@ public LoginQueryParser(Packet<?> packet) {
5555 /*?}*/
5656 } else {
5757 success = false ;
58- throw new IllegalArgumentException ("Invalid packet type " + packet );
58+ LOGGER . error ("Invalid packet type: {}" , packet . getClass (). getName () );
5959 }
6060 }
6161}
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ public boolean queryTick() {
4949 }
5050
5151 this .synchronizers .removeIf (future -> {
52-
5352 if (!future .isDone ()) {
5453 return false ;
5554 }
@@ -125,7 +124,7 @@ public void sendPacket(LoginQueryRequestS2CPacket packet) {
125124 this .channels .put (loginQuery .queryId , loginQuery .channelName );
126125 this .connection .send (packet );
127126 } else {
128- LOGGER .error ("Failed to send packet: " + packet );
127+ LOGGER .error ("Failed to send packet: {}" , packet );
129128 }
130129 }
131130}
You can’t perform that action at this time.
0 commit comments