mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 22:45:09 +00:00
Moved NPC puppet data to display data.
Improved mixin functionality, offsets and rotations always reset if the puppet "job" (not a job anymore, always in display) is disabled.
This commit is contained in:
1 parent
974bf2ca66
commit
8905f5f42e
14 files changed
+325
-197
No files matched your search
@@ -12,6 +12,7 @@ import noppes.npcs.config.ConfigMain;
|
||||
import noppes.npcs.controllers.data.SkinOverlay;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.entity.data.DataSkinOverlays;
|
||||
import noppes.npcs.roles.JobPuppet;
|
||||
import noppes.npcs.util.ValueUtil;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
@@ -38,6 +39,8 @@ public class DataDisplay {
|
||||
public DataSkinOverlays skinOverlayData;
|
||||
public long overlayRenderTicks = 0;
|
||||
|
||||
public JobPuppet modelData;
|
||||
|
||||
public String glowTexture = "";
|
||||
|
||||
public int visible = 0; //0:visible 1:Invisible 2:semi-invisible
|
||||
@@ -62,6 +65,7 @@ public class DataDisplay {
|
||||
markovGeneratorId = new Random().nextInt(CustomNpcs.MARKOV_GENERATOR.length-1);
|
||||
skinOverlayData = new DataSkinOverlays(npc);
|
||||
name = getRandomName();
|
||||
modelData = new JobPuppet(npc);
|
||||
}
|
||||
|
||||
public String getRandomName() {
|
||||
@@ -81,6 +85,8 @@ public class DataDisplay {
|
||||
|
||||
nbttagcompound = skinOverlayData.writeToNBT(nbttagcompound);
|
||||
|
||||
nbttagcompound = modelData.writeToNBT(nbttagcompound);
|
||||
|
||||
if (this.playerProfile != null)
|
||||
{
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
@@ -155,6 +161,8 @@ public class DataDisplay {
|
||||
|
||||
skinOverlayData.readFromNBT(nbttagcompound);
|
||||
|
||||
modelData.readFromNBT(nbttagcompound);
|
||||
|
||||
modelSize = ValueUtil.CorrectInt(nbttagcompound.getInteger("Size"), 1, Integer.MAX_VALUE);
|
||||
if(modelSize > ConfigMain.NpcSizeLimit)
|
||||
modelSize = ConfigMain.NpcSizeLimit;
|
||||
|
||||
Reference in new issue
Block a user