mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 04:59:05 +00:00
Added alpha, size, scale, and speed attributes to player skin overlays.
This commit is contained in:
1 parent
83fbccdf55
commit
f9fcd6b9f8
7 files changed
+105
-9
No files matched your search
@@ -6,6 +6,13 @@ public class ScriptSkinOverlay implements ISkinOverlay {
|
||||
public String texture;
|
||||
public boolean glow;
|
||||
public float alpha = 1.0F;
|
||||
public float size = 1.0F;
|
||||
|
||||
public float speedX = 0.0F;
|
||||
public float speedY = 0.0F;
|
||||
|
||||
public float scaleX = 1.0F;
|
||||
public float scaleY = 1.0F;
|
||||
|
||||
public ScriptSkinOverlay(String texture) {
|
||||
this.texture = texture;
|
||||
@@ -31,4 +38,34 @@ public class ScriptSkinOverlay implements ISkinOverlay {
|
||||
public float getAlpha() {
|
||||
return alpha;
|
||||
}
|
||||
|
||||
public void setSize(float size) {
|
||||
this.size = size;
|
||||
}
|
||||
public float getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setScale(float scaleX, float scaleY) {
|
||||
this.scaleX = scaleX;
|
||||
this.scaleY = scaleY;
|
||||
}
|
||||
public float getScaleX() {
|
||||
return scaleX;
|
||||
}
|
||||
public float getScaleY() {
|
||||
return scaleY;
|
||||
}
|
||||
|
||||
public void setSpeed(float speedX, float speedY) {
|
||||
this.speedX = speedX;
|
||||
this.speedY = speedY;
|
||||
}
|
||||
public float getSpeedX() {
|
||||
return speedX;
|
||||
}
|
||||
public float getSpeedY() {
|
||||
return speedY;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -536,6 +536,11 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
||||
compound.setString("SkinOverlayTexture", overlay.getTexture());
|
||||
compound.setBoolean("SkinOverlayGlow", overlay.getGlow());
|
||||
compound.setFloat("SkinOverlayAlpha", overlay.getAlpha());
|
||||
compound.setFloat("SkinOverlaySize", overlay.getSize());
|
||||
compound.setFloat("SkinOverlaySpeedX", overlay.getSpeedX());
|
||||
compound.setFloat("SkinOverlaySpeedY", overlay.getSpeedY());
|
||||
compound.setFloat("SkinOverlayScaleX", overlay.getScaleX());
|
||||
compound.setFloat("SkinOverlayScaleY", overlay.getScaleY());
|
||||
|
||||
if (!player.getEntityData().hasKey("SkinOverlayData")) {
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
|
||||
@@ -8,4 +8,18 @@ public interface ISkinOverlay {
|
||||
void setGlow(boolean glow);
|
||||
|
||||
boolean getGlow();
|
||||
|
||||
void setAlpha(float alpha);
|
||||
float getAlpha();
|
||||
|
||||
void setSize(float size);
|
||||
float getSize();
|
||||
|
||||
void setScale(float scaleX, float scaleY);
|
||||
float getScaleX();
|
||||
float getScaleY();
|
||||
|
||||
void setSpeed(float speedX, float speedY);
|
||||
float getSpeedX();
|
||||
float getSpeedY();
|
||||
}
|
||||
Reference in new issue
Block a user