Skip to content

Commit

Permalink
Fix NPC skin layers
Browse files Browse the repository at this point in the history
Default values aren't synchronized to the client
  • Loading branch information
aromaa committed Nov 22, 2023
1 parent 1b79863 commit df736b8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public HumanEntity(final EntityType<? extends HumanEntity> type, final Level wor
super(HumanEntity.TYPE, world);
this.fakeProfile = new GameProfile(this.uuid, "");
this.setCanPickUpLoot(true);
this.entityData.set(PlayerAccessor.accessor$DATA_PLAYER_MODE_CUSTOMISATION(), Constants.Sponge.Entity.Human.PLAYER_MODEL_FLAG_ALL);
}

@Override
Expand All @@ -137,7 +138,7 @@ protected void defineSynchedData() {
// PlayerEntity
this.entityData.define(PlayerAccessor.accessor$DATA_PLAYER_ABSORPTION_ID(), 0.0F);
this.entityData.define(PlayerAccessor.accessor$DATA_SCORE_ID(), 0);
this.entityData.define(PlayerAccessor.accessor$DATA_PLAYER_MODE_CUSTOMISATION(), Constants.Sponge.Entity.Human.PLAYER_MODEL_FLAG_ALL);
this.entityData.define(PlayerAccessor.accessor$DATA_PLAYER_MODE_CUSTOMISATION(), (byte) 0);
this.entityData.define(PlayerAccessor.accessor$DATA_PLAYER_MAIN_HAND(), (byte) 1);
this.entityData.define(PlayerAccessor.accessor$DATA_SHOULDER_LEFT(), new CompoundTag());
this.entityData.define(PlayerAccessor.accessor$DATA_SHOULDER_RIGHT(), new CompoundTag());
Expand Down

0 comments on commit df736b8

Please sign in to comment.