Added setAlpha to skin overlays

This commit is contained in:
Luis C.M committed 2022-05-16 22:14:11 -05:00
1 parent 6f9358c1ca
commit 83fbccdf55
5 files changed
+19 -7

No files matched your search

@@ -5,6 +5,7 @@ import noppes.npcs.scripted.interfaces.ISkinOverlay;
public class ScriptSkinOverlay implements ISkinOverlay {
public String texture;
public boolean glow;
public float alpha = 1.0F;
public ScriptSkinOverlay(String texture) {
this.texture = texture;
@@ -23,4 +24,11 @@ public class ScriptSkinOverlay implements ISkinOverlay {
public boolean getGlow() {
return glow;
}
public void setAlpha(float alpha) {
this.alpha = alpha;
}
public float getAlpha() {
return alpha;
}
}
@@ -535,6 +535,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
compound.setInteger("SkinOverlayID", id);
compound.setString("SkinOverlayTexture", overlay.getTexture());
compound.setBoolean("SkinOverlayGlow", overlay.getGlow());
compound.setFloat("SkinOverlayAlpha", overlay.getAlpha());
if (!player.getEntityData().hasKey("SkinOverlayData")) {
NBTTagList tagList = new NBTTagList();