@@ -196,7 +196,7 @@ protected void initEntity() {
196196 this .setSkin (newSkin );
197197 }
198198
199- this .uuid = Utils .dataToUUID (String .valueOf (this .getId ()).getBytes (StandardCharsets .UTF_8 ), this .skin
199+ this .uuid = Utils .dataToUUID (String .valueOf (this .getId ()).getBytes (StandardCharsets .UTF_8 ), this .getSkin ()
200200 .getSkinData ().data , this .getNameTag ().getBytes (StandardCharsets .UTF_8 ));
201201 }
202202
@@ -212,18 +212,18 @@ public String getName() {
212212 public void saveNBT () {
213213 super .saveNBT ();
214214
215- if (skin != null ) {
215+ if (this . getSkin () != null ) {
216216 CompoundTag skinTag = new CompoundTag ()
217217 .putByteArray ("Data" , this .getSkin ().getSkinData ().data )
218218 .putInt ("SkinImageWidth" , this .getSkin ().getSkinData ().width )
219219 .putInt ("SkinImageHeight" , this .getSkin ().getSkinData ().height )
220- .putString ("ModelId" , this .skin .getSkinId ())
220+ .putString ("ModelId" , this .getSkin () .getSkinId ())
221221 .putString ("CapeId" , this .getSkin ().getCapeId ())
222222 .putByteArray ("CapeData" , this .getSkin ().getCapeData ().data )
223223 .putInt ("CapeImageWidth" , this .getSkin ().getCapeData ().width )
224224 .putInt ("CapeImageHeight" , this .getSkin ().getCapeData ().height )
225225 .putByteArray ("SkinResourcePatch" , this .getSkin ().getSkinResourcePatch ().getBytes (StandardCharsets .UTF_8 ))
226- .putByteArray ("GeometryData" , this .skin .getGeometryData ().getBytes (StandardCharsets .UTF_8 ))
226+ .putByteArray ("GeometryData" , this .getSkin () .getGeometryData ().getBytes (StandardCharsets .UTF_8 ))
227227 .putByteArray ("SkinAnimationData" , this .getSkin ().getAnimationData ().getBytes (StandardCharsets .UTF_8 ))
228228 .putBoolean ("PremiumSkin" , this .getSkin ().isPremium ())
229229 .putBoolean ("PersonaSkin" , this .getSkin ().isPersona ())
@@ -289,16 +289,16 @@ public void spawnTo(Player player) {
289289 if (this != player && !this .hasSpawned .containsKey (player .getLoaderId ())) {
290290 this .hasSpawned .put (player .getLoaderId (), player );
291291
292- if (!this .skin .isValid ()) {
292+ if (!this .getSkin () .isValid ()) {
293293 throw new IllegalStateException (this .getClass ().getSimpleName () + " must have a valid skin set" );
294294 }
295295
296296 if (this instanceof Player ) {
297297 this .server .updatePlayerListData (
298- new PlayerListPacket .Entry (this .uuid , this .getId (), ((Player ) this ).getDisplayName (), this .skin , ((Player ) this ).getLoginChainData ().getXUID (), ((Player ) this ).getLocatorBarColor ()),
298+ new PlayerListPacket .Entry (this .uuid , this .getId (), ((Player ) this ).getDisplayName (), this .getSkin () , ((Player ) this ).getLoginChainData ().getXUID (), ((Player ) this ).getLocatorBarColor ()),
299299 new Player []{player });
300300 } else {
301- this .server .updatePlayerListData (this .uuid , this .getId (), this .getName (), this .skin , new Player []{player });
301+ this .server .updatePlayerListData (this .uuid , this .getId (), this .getName (), this .getSkin () , new Player []{player });
302302 }
303303
304304 AddPlayerPacket pk = new AddPlayerPacket ();
0 commit comments