File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ public Packet(PApplet inst, String serial) {
181181 case ("player" ):
182182 this .obj = Player .deSerial (this .inst , objectSerial );
183183 Rectangles .movObjects .add (this .obj );
184+ //System.out.println(this.uuid + ": " + this.obj.getRend().getColorToString());
184185 if (this .type == PACKET_REGISTER ) {
185186 Rectangles .player = (Player ) this .obj ;
186187 }
@@ -241,8 +242,12 @@ public Packet(PApplet inst, String serial) {
241242 break ;
242243 }
243244 }
245+ try {
244246 Rectangles .objectMap .get (this .uuid ).getPy ().getLocation ()
245247 .set (this .location [0 ], this .location [1 ]);
248+ } catch (NullPointerException e ) {
249+ // Do nothing, update for object not yet created most likely
250+ }
246251 break ;
247252 case (PACKET_KEY_PRESS ):
248253 this .keyPress = Integer .parseInt (serialData [1 ].split (":" )[1 ]);
You can’t perform that action at this time.
0 commit comments