mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 08:24:46 +00:00
Added parameters for texture translation when the NPC is powered, namely npc.display.poweredTranslateX, poweredTranslateY, and poweredTranslateZ, which can all be changed by setPoweredXYZ(x,y,z), and gotten with getPoweredX(), getPoweredY(), and getPoweredZ().
This commit is contained in:
1 parent
9560228ba8
commit
b7d2dab905
5 files changed
+50
-10
No files matched your search
@@ -37,7 +37,11 @@ public class DataDisplay {
|
||||
public String texture = "customnpcs:textures/entity/humanmale/Steve.png";
|
||||
public String cloakTexture = "";
|
||||
public String glowTexture = "";
|
||||
|
||||
public String poweredTexture = "";
|
||||
public float poweredTranslateX = 0.01F;
|
||||
public float poweredTranslateY = 0.01F;
|
||||
public float poweredTranslateZ = 0.0F;
|
||||
|
||||
public int visible = 0; //0:visible 1:Invisible 2:semi-invisible
|
||||
|
||||
@@ -106,6 +110,10 @@ public class DataDisplay {
|
||||
nbttagcompound.setString("PoweredTexture", poweredTexture);
|
||||
nbttagcompound.setByte("UsingSkinUrl", skinType);
|
||||
|
||||
nbttagcompound.setFloat("PoweredX",poweredTranslateX);
|
||||
nbttagcompound.setFloat("PoweredY",poweredTranslateY);
|
||||
nbttagcompound.setFloat("PoweredZ",poweredTranslateZ);
|
||||
|
||||
if (this.playerProfile != null)
|
||||
{
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
@@ -160,6 +168,9 @@ public class DataDisplay {
|
||||
cloakTexture = nbttagcompound.getString("CloakTexture");
|
||||
glowTexture = nbttagcompound.getString("GlowTexture");
|
||||
poweredTexture = nbttagcompound.getString("PoweredTexture");
|
||||
poweredTranslateX = nbttagcompound.getFloat("PoweredX");
|
||||
poweredTranslateY = nbttagcompound.getFloat("PoweredY");
|
||||
poweredTranslateZ = nbttagcompound.getFloat("PoweredZ");
|
||||
|
||||
modelSize = ValueUtil.CorrectInt(nbttagcompound.getInteger("Size"), 1, Integer.MAX_VALUE);
|
||||
modelType = nbttagcompound.getInteger("modelType");
|
||||
|
||||
Reference in new issue
Block a user