Added player rotations/pivots/animations, similar to NPC's.

This commit is contained in:
Luis C.M committed 2023-01-01 23:50:38 -06:00
1 parent d638c98d81
commit 51263a9f82
13 files changed
+726 -10

No files matched your search

@@ -31,6 +31,7 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
public PlayerFactionData factionData = new PlayerFactionData(this);
public PlayerItemGiverData itemgiverData = new PlayerItemGiverData(this);
public PlayerMailData mailData = new PlayerMailData(this);
public PlayerModelData modelData = new PlayerModelData(this);
public DataTimers timers = new DataTimers(this);
public DataSkinOverlays skinOverlays = new DataSkinOverlays(this);
@@ -80,6 +81,7 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
mailData.loadNBTData(data);
timers.readFromNBT(data);
skinOverlays.readFromNBT(data);
modelData.readFromNBT(data);
if(player != null){
playername = player.getCommandSenderName();
@@ -117,6 +119,7 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
mailData.saveNBTData(compound);
timers.writeToNBT(compound);
skinOverlays.writeToNBT(compound);
modelData.writeToNBT(compound);
compound.setString("PlayerName", playername);
compound.setString("UUID", uuid);
@@ -298,6 +301,10 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
return mailData;
}
public IPlayerModelData getModelData() {
return modelData;
}
public void save() {
PlayerDataController.instance.savePlayerData(this);
}