mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 20:44:08 +00:00
Added alpha to all abilities except beam
This commit is contained in:
1 parent
67237e794f
commit
216a3dbbf8
14 files changed
+154
-81
No files matched your search
@@ -54,7 +54,7 @@ public class RenderAbilityDisc extends RenderAbilityProjectile {
|
||||
if (disc.isOuterColorEnabled()) {
|
||||
float outerScale = innerScale + disc.getOuterColorWidth();
|
||||
GL11.glDepthMask(false);
|
||||
renderFlatSquare(disc.getOuterColor(), 0.5f, radius * outerScale, thickness);
|
||||
renderFlatSquare(disc.getOuterColor(), disc.getOuterColorAlpha(), radius * outerScale, thickness);
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ public class AbilityDisc extends Ability implements IAbilityDisc {
|
||||
private int innerColor = 0xFFFFFF;
|
||||
private int outerColor = 0xFF8800;
|
||||
private float outerColorWidth = 0.4f; // Additive offset from inner size
|
||||
private float outerColorAlpha = 0.5f; // Additive offset from inner size
|
||||
private boolean outerColorEnabled = true;
|
||||
private float rotationSpeed = 5.0f;
|
||||
|
||||
@@ -135,7 +136,7 @@ public class AbilityDisc extends Ability implements IAbilityDisc {
|
||||
// Create disc in charging mode - follows NPC based on anchor point during windup
|
||||
discEntity = EntityAbilityDisc.createCharging(
|
||||
world, npc, target,
|
||||
discRadius, discThickness, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
discRadius, discThickness, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp,
|
||||
speed, homing, homingStrength, homingRange,
|
||||
boomerang, boomerangDelay,
|
||||
@@ -224,6 +225,7 @@ public class AbilityDisc extends Ability implements IAbilityDisc {
|
||||
nbt.setInteger("innerColor", innerColor);
|
||||
nbt.setInteger("outerColor", outerColor);
|
||||
nbt.setFloat("outerColorWidth", outerColorWidth);
|
||||
nbt.setFloat("outerColorAlpha", outerColorAlpha);
|
||||
nbt.setBoolean("outerColorEnabled", outerColorEnabled);
|
||||
nbt.setFloat("rotationSpeed", rotationSpeed);
|
||||
nbt.setBoolean("lightningEffect", lightningEffect);
|
||||
@@ -256,6 +258,7 @@ public class AbilityDisc extends Ability implements IAbilityDisc {
|
||||
this.innerColor = nbt.hasKey("innerColor") ? nbt.getInteger("innerColor") : 0xFFFFFF;
|
||||
this.outerColor = nbt.hasKey("outerColor") ? nbt.getInteger("outerColor") : 0xFF8800;
|
||||
this.outerColorWidth = nbt.hasKey("outerColorWidth") ? nbt.getFloat("outerColorWidth") : 0.4f;
|
||||
this.outerColorAlpha = nbt.hasKey("outerColorAlpha") ? nbt.getFloat("outerColorAlpha") : 0.5f;
|
||||
this.outerColorEnabled = !nbt.hasKey("outerColorEnabled") || nbt.getBoolean("outerColorEnabled");
|
||||
this.rotationSpeed = nbt.hasKey("rotationSpeed") ? nbt.getFloat("rotationSpeed") : 5.0f;
|
||||
this.lightningEffect = nbt.hasKey("lightningEffect") && nbt.getBoolean("lightningEffect");
|
||||
@@ -309,6 +312,8 @@ public class AbilityDisc extends Ability implements IAbilityDisc {
|
||||
public void setOuterColor(int outerColor) { this.outerColor = outerColor; }
|
||||
public float getOuterColorWidth() { return outerColorWidth; }
|
||||
public void setOuterColorWidth(float outerColorWidth) { this.outerColorWidth = outerColorWidth; }
|
||||
public float getOuterColorAlpha() { return outerColorAlpha; }
|
||||
public void setOuterColorAlpha(float outerColorAlpha) { this.outerColorAlpha = outerColorAlpha; }
|
||||
public boolean isOuterColorEnabled() { return outerColorEnabled; }
|
||||
public void setOuterColorEnabled(boolean outerColorEnabled) { this.outerColorEnabled = outerColorEnabled; }
|
||||
public float getRotationSpeed() { return rotationSpeed; }
|
||||
|
||||
@@ -60,6 +60,7 @@ public class AbilityEnergyBeam extends Ability implements IAbilityEnergyBeam {
|
||||
private int innerColor = 0xFFFFFF;
|
||||
private int outerColor = 0x00AAFF;
|
||||
private float outerColorWidth = 0.4f; // Additive offset from inner size
|
||||
private float outerColorAlpha = 0.5f;
|
||||
private boolean outerColorEnabled = true;
|
||||
private float rotationSpeed = 6.0f;
|
||||
|
||||
@@ -138,7 +139,7 @@ public class AbilityEnergyBeam extends Ability implements IAbilityEnergyBeam {
|
||||
// Create beam in charging mode - follows NPC based on anchor point during windup
|
||||
beamEntity = EntityAbilityBeam.createCharging(
|
||||
world, npc, target,
|
||||
beamWidth, headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
beamWidth, headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp,
|
||||
speed, homing, homingStrength, homingRange,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
@@ -226,6 +227,7 @@ public class AbilityEnergyBeam extends Ability implements IAbilityEnergyBeam {
|
||||
nbt.setInteger("innerColor", innerColor);
|
||||
nbt.setInteger("outerColor", outerColor);
|
||||
nbt.setFloat("outerColorWidth", outerColorWidth);
|
||||
nbt.setFloat("outerColorAlpha", outerColorAlpha);
|
||||
nbt.setBoolean("outerColorEnabled", outerColorEnabled);
|
||||
nbt.setFloat("rotationSpeed", rotationSpeed);
|
||||
nbt.setBoolean("lightningEffect", lightningEffect);
|
||||
@@ -256,6 +258,7 @@ public class AbilityEnergyBeam extends Ability implements IAbilityEnergyBeam {
|
||||
this.innerColor = nbt.hasKey("innerColor") ? nbt.getInteger("innerColor") : 0xFFFFFF;
|
||||
this.outerColor = nbt.hasKey("outerColor") ? nbt.getInteger("outerColor") : 0x00AAFF;
|
||||
this.outerColorWidth = nbt.hasKey("outerColorWidth") ? nbt.getFloat("outerColorWidth") : 0.4f;
|
||||
this.outerColorAlpha = nbt.hasKey("outerColorAlpha") ? nbt.getFloat("outerColorAlpha") : 0.5f;
|
||||
this.outerColorEnabled = !nbt.hasKey("outerColorEnabled") || nbt.getBoolean("outerColorEnabled");
|
||||
this.rotationSpeed = nbt.hasKey("rotationSpeed") ? nbt.getFloat("rotationSpeed") : 6.0f;
|
||||
this.lightningEffect = nbt.hasKey("lightningEffect") && nbt.getBoolean("lightningEffect");
|
||||
@@ -305,6 +308,8 @@ public class AbilityEnergyBeam extends Ability implements IAbilityEnergyBeam {
|
||||
public void setOuterColor(int outerColor) { this.outerColor = outerColor; }
|
||||
public float getOuterColorWidth() { return outerColorWidth; }
|
||||
public void setOuterColorWidth(float outerColorWidth) { this.outerColorWidth = outerColorWidth; }
|
||||
public float getOuterColorAlpha() { return outerColorAlpha; }
|
||||
public void setOuterColorAlpha(float outerColorAlpha) { this.outerColorAlpha = outerColorAlpha; }
|
||||
public boolean isOuterColorEnabled() { return outerColorEnabled; }
|
||||
public void setOuterColorEnabled(boolean outerColorEnabled) { this.outerColorEnabled = outerColorEnabled; }
|
||||
public float getRotationSpeed() { return rotationSpeed; }
|
||||
|
||||
@@ -49,6 +49,7 @@ public class AbilityLaserShot extends Ability implements IAbilityLaserShot {
|
||||
private int innerColor = 0xFFFFFF;
|
||||
private int outerColor = 0xFF0000;
|
||||
private float outerColorWidth = 0.4f; // Additive offset from inner width
|
||||
private float outerColorAlpha = 0.5f;
|
||||
private boolean outerColorEnabled = true;
|
||||
|
||||
// Lightning effect properties
|
||||
@@ -117,7 +118,7 @@ public class AbilityLaserShot extends Ability implements IAbilityLaserShot {
|
||||
laserEntity = new EntityAbilityLaser(
|
||||
world, npc, target,
|
||||
spawnX, spawnY, spawnZ,
|
||||
laserWidth, innerColor, outerColor, outerColorEnabled, outerColorWidth,
|
||||
laserWidth, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha,
|
||||
damage, knockback, knockbackUp,
|
||||
expansionSpeed, lingerTicks,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
@@ -177,6 +178,7 @@ public class AbilityLaserShot extends Ability implements IAbilityLaserShot {
|
||||
nbt.setInteger("innerColor", innerColor);
|
||||
nbt.setInteger("outerColor", outerColor);
|
||||
nbt.setFloat("outerColorWidth", outerColorWidth);
|
||||
nbt.setFloat("outerColorAlpha", outerColorAlpha);
|
||||
nbt.setBoolean("outerColorEnabled", outerColorEnabled);
|
||||
nbt.setBoolean("lightningEffect", lightningEffect);
|
||||
nbt.setFloat("lightningDensity", lightningDensity);
|
||||
@@ -202,6 +204,7 @@ public class AbilityLaserShot extends Ability implements IAbilityLaserShot {
|
||||
this.innerColor = nbt.hasKey("innerColor") ? nbt.getInteger("innerColor") : 0xFFFFFF;
|
||||
this.outerColor = nbt.hasKey("outerColor") ? nbt.getInteger("outerColor") : 0xFF0000;
|
||||
this.outerColorWidth = nbt.hasKey("outerColorWidth") ? nbt.getFloat("outerColorWidth") : 0.4f;
|
||||
this.outerColorAlpha = nbt.hasKey("outerColorAlpha") ? nbt.getFloat("outerColorAlpha") : 0.5f;
|
||||
this.outerColorEnabled = !nbt.hasKey("outerColorEnabled") || nbt.getBoolean("outerColorEnabled");
|
||||
this.lightningEffect = nbt.hasKey("lightningEffect") && nbt.getBoolean("lightningEffect");
|
||||
this.lightningDensity = nbt.hasKey("lightningDensity") ? nbt.getFloat("lightningDensity") : 0.15f;
|
||||
@@ -243,6 +246,8 @@ public class AbilityLaserShot extends Ability implements IAbilityLaserShot {
|
||||
public void setOuterColor(int outerColor) { this.outerColor = outerColor; }
|
||||
public float getOuterColorWidth() { return outerColorWidth; }
|
||||
public void setOuterColorWidth(float outerColorWidth) { this.outerColorWidth = outerColorWidth; }
|
||||
public float getOuterColorAlpha() { return outerColorAlpha; }
|
||||
public void setOuterColorAlpha(float outerColorAlpha) { this.outerColorAlpha = outerColorAlpha; }
|
||||
public boolean isOuterColorEnabled() { return outerColorEnabled; }
|
||||
public void setOuterColorEnabled(boolean outerColorEnabled) { this.outerColorEnabled = outerColorEnabled; }
|
||||
public boolean hasLightningEffect() { return lightningEffect; }
|
||||
|
||||
@@ -58,6 +58,7 @@ public class AbilityOrb extends Ability implements IAbilityOrb {
|
||||
private int innerColor = 0xFFFFFF; // White core
|
||||
private int outerColor = 0x8888FF; // Light blue glow
|
||||
private float outerColorWidth = 0.4f; // Additive offset from inner size
|
||||
private float outerColorAlpha = 0.5f;
|
||||
private boolean outerColorEnabled = true; // Whether to render outer glow
|
||||
private float rotationSpeed = 4.0f; // Degrees per tick
|
||||
|
||||
@@ -134,7 +135,7 @@ public class AbilityOrb extends Ability implements IAbilityOrb {
|
||||
// Create orb in charging mode - follows NPC based on anchor point during windup
|
||||
orbEntity = EntityAbilityOrb.createCharging(
|
||||
world, npc, target,
|
||||
orbSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
orbSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp,
|
||||
orbSpeed, homing, homingStrength, homingRange,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
@@ -220,6 +221,7 @@ public class AbilityOrb extends Ability implements IAbilityOrb {
|
||||
nbt.setInteger("innerColor", innerColor);
|
||||
nbt.setInteger("outerColor", outerColor);
|
||||
nbt.setFloat("outerColorWidth", outerColorWidth);
|
||||
nbt.setFloat("outerColorAlpha", outerColorAlpha);
|
||||
nbt.setBoolean("outerColorEnabled", outerColorEnabled);
|
||||
nbt.setFloat("rotationSpeed", rotationSpeed);
|
||||
nbt.setBoolean("lightningEffect", lightningEffect);
|
||||
@@ -250,6 +252,7 @@ public class AbilityOrb extends Ability implements IAbilityOrb {
|
||||
this.innerColor = nbt.hasKey("innerColor") ? nbt.getInteger("innerColor") : 0xFFFFFF;
|
||||
this.outerColor = nbt.hasKey("outerColor") ? nbt.getInteger("outerColor") : 0x8888FF;
|
||||
this.outerColorWidth = nbt.hasKey("outerColorWidth") ? nbt.getFloat("outerColorWidth") : 0.4f;
|
||||
this.outerColorAlpha = nbt.hasKey("outerColorAlpha") ? nbt.getFloat("outerColorAlpha") : 0.5f;
|
||||
this.outerColorEnabled = !nbt.hasKey("outerColorEnabled") || nbt.getBoolean("outerColorEnabled");
|
||||
this.rotationSpeed = nbt.hasKey("rotationSpeed") ? nbt.getFloat("rotationSpeed") : 4.0f;
|
||||
this.lightningEffect = nbt.hasKey("lightningEffect") && nbt.getBoolean("lightningEffect");
|
||||
@@ -412,6 +415,14 @@ public class AbilityOrb extends Ability implements IAbilityOrb {
|
||||
this.outerColorWidth = outerColorWidth;
|
||||
}
|
||||
|
||||
public float getOuterColorAlpha() {
|
||||
return outerColorAlpha;
|
||||
}
|
||||
|
||||
public void setOuterColorAlpha(float outerColorAlpha) {
|
||||
this.outerColorAlpha = outerColorAlpha;
|
||||
}
|
||||
|
||||
public boolean isOuterColorEnabled() {
|
||||
return outerColorEnabled;
|
||||
}
|
||||
|
||||
@@ -104,14 +104,14 @@ public class EntityAbilityBeam extends EntityAbilityProjectile {
|
||||
public EntityAbilityBeam(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float beamWidth, float headSize, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
int stunDuration, int slowDuration, int slowLevel,
|
||||
float maxDistance, int maxLifetime) {
|
||||
this(world, owner, target, x, y, z,
|
||||
beamWidth, headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
beamWidth, headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp, speed, homing, homingStrength, homingRange,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel, maxDistance, maxLifetime,
|
||||
@@ -124,7 +124,7 @@ public class EntityAbilityBeam extends EntityAbilityProjectile {
|
||||
public EntityAbilityBeam(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float beamWidth, float headSize, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
@@ -132,7 +132,7 @@ public class EntityAbilityBeam extends EntityAbilityProjectile {
|
||||
float maxDistance, int maxLifetime,
|
||||
boolean lightningEffect, float lightningDensity, float lightningRadius) {
|
||||
this(world, owner, target, x, y, z,
|
||||
beamWidth, headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
beamWidth, headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp, speed, homing, homingStrength, homingRange,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel, maxDistance, maxLifetime,
|
||||
@@ -148,7 +148,7 @@ public class EntityAbilityBeam extends EntityAbilityProjectile {
|
||||
public EntityAbilityBeam(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float beamWidth, float headSize, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
@@ -160,7 +160,7 @@ public class EntityAbilityBeam extends EntityAbilityProjectile {
|
||||
|
||||
// Initialize base properties with lightning
|
||||
initProjectile(owner, target, x, y, z,
|
||||
headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel,
|
||||
@@ -221,7 +221,7 @@ public class EntityAbilityBeam extends EntityAbilityProjectile {
|
||||
*/
|
||||
public static EntityAbilityBeam createCharging(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
float beamWidth, float headSize, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
@@ -239,7 +239,7 @@ public class EntityAbilityBeam extends EntityAbilityProjectile {
|
||||
EntityAbilityBeam beam = new EntityAbilityBeam(
|
||||
world, owner, target,
|
||||
spawnX, spawnY, spawnZ,
|
||||
beamWidth, headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
beamWidth, headSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp, speed, homing, homingStrength, homingRange,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel, maxDistance, maxLifetime,
|
||||
|
||||
@@ -82,7 +82,7 @@ public class EntityAbilityDisc extends EntityAbilityProjectile {
|
||||
public EntityAbilityDisc(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float discRadius, float discThickness, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean boomerang, int boomerangDelay,
|
||||
@@ -90,7 +90,7 @@ public class EntityAbilityDisc extends EntityAbilityProjectile {
|
||||
int stunDuration, int slowDuration, int slowLevel,
|
||||
float maxDistance, int maxLifetime) {
|
||||
this(world, owner, target, x, y, z,
|
||||
discRadius, discThickness, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
discRadius, discThickness, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp, speed, homing, homingStrength, homingRange,
|
||||
boomerang, boomerangDelay, explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel, maxDistance, maxLifetime,
|
||||
@@ -103,7 +103,7 @@ public class EntityAbilityDisc extends EntityAbilityProjectile {
|
||||
public EntityAbilityDisc(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float discRadius, float discThickness, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean boomerang, int boomerangDelay,
|
||||
@@ -115,7 +115,7 @@ public class EntityAbilityDisc extends EntityAbilityProjectile {
|
||||
|
||||
// Initialize base properties with lightning (use discRadius as size for base)
|
||||
initProjectile(owner, target, x, y, z,
|
||||
discRadius, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
discRadius, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel,
|
||||
@@ -161,7 +161,7 @@ public class EntityAbilityDisc extends EntityAbilityProjectile {
|
||||
*/
|
||||
public static EntityAbilityDisc createCharging(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
float discRadius, float discThickness, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean boomerang, int boomerangDelay,
|
||||
@@ -179,7 +179,7 @@ public class EntityAbilityDisc extends EntityAbilityProjectile {
|
||||
EntityAbilityDisc disc = new EntityAbilityDisc(
|
||||
world, owner, target,
|
||||
spawnX, spawnY, spawnZ,
|
||||
discRadius, discThickness, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
discRadius, discThickness, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp, speed, homing, homingStrength, homingRange,
|
||||
boomerang, boomerangDelay,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
|
||||
@@ -50,14 +50,14 @@ public class EntityAbilityLaser extends EntityAbilityProjectile {
|
||||
public EntityAbilityLaser(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float laserWidth, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float expansionSpeed, int lingerTicks,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
int stunDuration, int slowDuration, int slowLevel,
|
||||
float maxDistance, int maxLifetime) {
|
||||
this(world, owner, target, x, y, z,
|
||||
laserWidth, innerColor, outerColor, outerColorEnabled, outerColorWidth,
|
||||
laserWidth, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha,
|
||||
damage, knockback, knockbackUp, expansionSpeed, lingerTicks,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel, maxDistance, maxLifetime,
|
||||
@@ -70,7 +70,7 @@ public class EntityAbilityLaser extends EntityAbilityProjectile {
|
||||
public EntityAbilityLaser(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float laserWidth, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float expansionSpeed, int lingerTicks,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
@@ -81,7 +81,7 @@ public class EntityAbilityLaser extends EntityAbilityProjectile {
|
||||
|
||||
// Initialize base properties with lightning
|
||||
initProjectile(owner, target, x, y, z,
|
||||
laserWidth, innerColor, outerColor, outerColorEnabled, outerColorWidth, 0.0f, // No rotation for laser
|
||||
laserWidth, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, 0.0f, // No rotation for laser
|
||||
damage, knockback, knockbackUp,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel,
|
||||
|
||||
@@ -71,14 +71,14 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
public EntityAbilityOrb(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float orbSize, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
int stunDuration, int slowDuration, int slowLevel,
|
||||
float maxDistance, int maxLifetime) {
|
||||
this(world, owner, target, x, y, z,
|
||||
orbSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
orbSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp,
|
||||
speed, homing, homingStrength, homingRange,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
@@ -93,7 +93,7 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
public EntityAbilityOrb(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float orbSize, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
@@ -104,7 +104,7 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
|
||||
// Initialize base properties with lightning
|
||||
initProjectile(owner, target, x, y, z,
|
||||
orbSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
orbSize, innerColor, outerColor, outerColorEnabled, outerColorAlpha, outerColorWidth, rotationSpeed,
|
||||
damage, knockback, knockbackUp,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel,
|
||||
@@ -145,7 +145,7 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
*/
|
||||
public static EntityAbilityOrb createCharging(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
float orbSize, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
float speed, boolean homing, float homingStrength, float homingRange,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
@@ -162,7 +162,7 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
EntityAbilityOrb orb = new EntityAbilityOrb(
|
||||
world, owner, target,
|
||||
spawnX, spawnY, spawnZ,
|
||||
orbSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
orbSize, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp, speed, homing, homingStrength, homingRange,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel, maxDistance, maxLifetime,
|
||||
|
||||
@@ -31,6 +31,7 @@ public abstract class EntityAbilityProjectile extends Entity implements IEntityA
|
||||
protected int outerColor = 0x8888FF;
|
||||
protected boolean outerColorEnabled = true;
|
||||
protected float outerColorWidth = 0.4f; // Additive offset from inner size
|
||||
protected float outerColorAlpha = 0.5f;
|
||||
protected float rotationSpeed = 4.0f;
|
||||
|
||||
// ==================== COMBAT PROPERTIES ====================
|
||||
@@ -98,13 +99,13 @@ public abstract class EntityAbilityProjectile extends Entity implements IEntityA
|
||||
protected void initProjectile(EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float size, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
int stunDuration, int slowDuration, int slowLevel,
|
||||
float maxDistance, int maxLifetime) {
|
||||
initProjectile(owner, target, x, y, z,
|
||||
size, innerColor, outerColor, outerColorEnabled, outerColorWidth, rotationSpeed,
|
||||
size, innerColor, outerColor, outerColorEnabled, outerColorWidth, outerColorAlpha, rotationSpeed,
|
||||
damage, knockback, knockbackUp,
|
||||
explosive, explosionRadius, explosionDamageFalloff,
|
||||
stunDuration, slowDuration, slowLevel,
|
||||
@@ -118,7 +119,7 @@ public abstract class EntityAbilityProjectile extends Entity implements IEntityA
|
||||
protected void initProjectile(EntityNPCInterface owner, EntityLivingBase target,
|
||||
double x, double y, double z,
|
||||
float size, int innerColor, int outerColor,
|
||||
boolean outerColorEnabled, float outerColorWidth, float rotationSpeed,
|
||||
boolean outerColorEnabled, float outerColorWidth, float outerColorAlpha, float rotationSpeed,
|
||||
float damage, float knockback, float knockbackUp,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff,
|
||||
int stunDuration, int slowDuration, int slowLevel,
|
||||
@@ -138,6 +139,7 @@ public abstract class EntityAbilityProjectile extends Entity implements IEntityA
|
||||
this.outerColor = outerColor;
|
||||
this.outerColorEnabled = outerColorEnabled;
|
||||
this.outerColorWidth = outerColorWidth;
|
||||
this.outerColorAlpha = outerColorAlpha;
|
||||
this.rotationSpeed = rotationSpeed;
|
||||
|
||||
// Combat
|
||||
@@ -428,6 +430,10 @@ public abstract class EntityAbilityProjectile extends Entity implements IEntityA
|
||||
return outerColorWidth;
|
||||
}
|
||||
|
||||
public float getOuterColorAlpha() {
|
||||
return outerColorAlpha;
|
||||
}
|
||||
|
||||
public float getRotationSpeed() {
|
||||
return rotationSpeed;
|
||||
}
|
||||
@@ -501,6 +507,7 @@ public abstract class EntityAbilityProjectile extends Entity implements IEntityA
|
||||
this.innerColor = nbt.getInteger("InnerColor");
|
||||
this.outerColor = nbt.getInteger("OuterColor");
|
||||
this.outerColorEnabled = !nbt.hasKey("OuterColorEnabled") || nbt.getBoolean("OuterColorEnabled");
|
||||
this.outerColorAlpha = nbt.hasKey("OuterColorAlpha") ? nbt.getFloat("OuterColorAlpha") : 0.5f;
|
||||
this.outerColorWidth = nbt.hasKey("OuterColorWidth") ? nbt.getFloat("OuterColorWidth") : 0.4f;
|
||||
this.rotationSpeed = nbt.hasKey("RotationSpeed") ? nbt.getFloat("RotationSpeed") : 4.0f;
|
||||
|
||||
@@ -552,6 +559,7 @@ public abstract class EntityAbilityProjectile extends Entity implements IEntityA
|
||||
nbt.setInteger("OuterColor", outerColor);
|
||||
nbt.setBoolean("OuterColorEnabled", outerColorEnabled);
|
||||
nbt.setFloat("OuterColorWidth", outerColorWidth);
|
||||
nbt.setFloat("OuterColorAlpha", outerColorAlpha);
|
||||
nbt.setFloat("RotationSpeed", rotationSpeed);
|
||||
|
||||
nbt.setFloat("Damage", damage);
|
||||
|
||||
@@ -155,15 +155,24 @@ public class SubGuiAbilityDisc extends SubGuiAbilityConfig {
|
||||
|
||||
y += 24;
|
||||
|
||||
// Row 3: Rotation Speed
|
||||
addLabel(new GuiNpcLabel(204, "ability.rotationSpeed", labelX, y + 5));
|
||||
addTextField(createFloatField(204, fieldX, y, 50, disc.getRotationSpeed()));
|
||||
// Row 3: Outer Color Alpha
|
||||
addLabel(new GuiNpcLabel(204, "ability.outerAlpha", labelX, y + 5));
|
||||
GuiNpcTextField alphaField = createFloatField(204, fieldX, y, 55, disc.getOuterColorAlpha());
|
||||
alphaField.setEnabled(disc.isOuterColorEnabled());
|
||||
alphaField.setMinMaxDefaultFloat(0, 1, 0.5f);
|
||||
addTextField(alphaField);
|
||||
|
||||
y += 24;
|
||||
|
||||
// Row 4: Lightning Effect Enabled
|
||||
addLabel(new GuiNpcLabel(205, "ability.lightning", labelX, y + 5));
|
||||
GuiNpcButton lightningBtn = new GuiNpcButton(205, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, disc.hasLightningEffect() ? 1 : 0);
|
||||
// Row 4: Rotation Speed
|
||||
addLabel(new GuiNpcLabel(205, "ability.rotationSpeed", labelX, y + 5));
|
||||
addTextField(createFloatField(205, fieldX, y, 50, disc.getRotationSpeed()));
|
||||
|
||||
y += 24;
|
||||
|
||||
// Row 5: Lightning Effect Enabled
|
||||
addLabel(new GuiNpcLabel(206, "ability.lightning", labelX, y + 5));
|
||||
GuiNpcButton lightningBtn = new GuiNpcButton(206, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, disc.hasLightningEffect() ? 1 : 0);
|
||||
lightningBtn.setHoverText("ability.hover.lightning");
|
||||
addButton(lightningBtn);
|
||||
|
||||
@@ -171,14 +180,14 @@ public class SubGuiAbilityDisc extends SubGuiAbilityConfig {
|
||||
if (disc.hasLightningEffect()) {
|
||||
y += 24;
|
||||
|
||||
// Row 5: Density + Radius
|
||||
addLabel(new GuiNpcLabel(206, "ability.lightningDensity", labelX, y + 5));
|
||||
GuiNpcTextField densityField = new GuiNpcTextField(206, this, fontRendererObj, fieldX, y, 55, 18, String.valueOf(disc.getLightningDensity()));
|
||||
// Row 6: Density + Radius
|
||||
addLabel(new GuiNpcLabel(207, "ability.lightningDensity", labelX, y + 5));
|
||||
GuiNpcTextField densityField = new GuiNpcTextField(207, this, fontRendererObj, fieldX, y, 55, 18, String.valueOf(disc.getLightningDensity()));
|
||||
densityField.setMinMaxDefaultFloat(0.01f, 5.0f, 0.15f);
|
||||
addTextField(densityField);
|
||||
|
||||
addLabel(new GuiNpcLabel(207, "ability.lightningRadius", col2LabelX, y + 5));
|
||||
GuiNpcTextField radiusField = new GuiNpcTextField(207, this, fontRendererObj, col2FieldX, y, 55, 18, String.valueOf(disc.getLightningRadius()));
|
||||
addLabel(new GuiNpcLabel(208, "ability.lightningRadius", col2LabelX, y + 5));
|
||||
GuiNpcTextField radiusField = new GuiNpcTextField(208, this, fontRendererObj, col2FieldX, y, 55, 18, String.valueOf(disc.getLightningRadius()));
|
||||
radiusField.setMinMaxDefaultFloat(0.1f, 10.0f, 0.5f);
|
||||
addTextField(radiusField);
|
||||
}
|
||||
@@ -222,7 +231,7 @@ public class SubGuiAbilityDisc extends SubGuiAbilityConfig {
|
||||
disc.setOuterColorEnabled(value == 1);
|
||||
initGui();
|
||||
break;
|
||||
case 205:
|
||||
case 206:
|
||||
disc.setLightningEffect(value == 1);
|
||||
initGui();
|
||||
break;
|
||||
@@ -298,12 +307,15 @@ public class SubGuiAbilityDisc extends SubGuiAbilityConfig {
|
||||
disc.setOuterColorWidth(parseFloat(field, disc.getOuterColorWidth()));
|
||||
break;
|
||||
case 204:
|
||||
disc.setOuterColorAlpha(parseFloat(field, disc.getOuterColorAlpha()));
|
||||
break;
|
||||
case 205:
|
||||
disc.setRotationSpeed(parseFloat(field, disc.getRotationSpeed()));
|
||||
break;
|
||||
case 206:
|
||||
case 207:
|
||||
disc.setLightningDensity(parseFloat(field, disc.getLightningDensity()));
|
||||
break;
|
||||
case 207:
|
||||
case 208:
|
||||
disc.setLightningRadius(parseFloat(field, disc.getLightningRadius()));
|
||||
break;
|
||||
}
|
||||
|
||||
+20
-11
@@ -152,14 +152,20 @@ public class SubGuiAbilityEnergyBeam extends SubGuiAbilityConfig {
|
||||
y += 24;
|
||||
|
||||
// Row 3: Rotation Speed
|
||||
addLabel(new GuiNpcLabel(204, "ability.rotationSpeed", labelX, y + 5));
|
||||
addTextField(createFloatField(204, fieldX, y, 50, beam.getRotationSpeed()));
|
||||
addLabel(new GuiNpcLabel(204, "ability.outerAlpha", labelX, y + 5));
|
||||
GuiNpcTextField alphaField = createFloatField(204, fieldX, y, 55, beam.getOuterColorAlpha());
|
||||
alphaField.setEnabled(beam.isOuterColorEnabled());
|
||||
alphaField.setMinMaxDefaultFloat(0, 1, 0.5f);
|
||||
addTextField(alphaField);
|
||||
|
||||
addLabel(new GuiNpcLabel(205, "ability.rotationSpeed", col2LabelX, y + 5));
|
||||
addTextField(createFloatField(205, col2FieldX, y, 50, beam.getRotationSpeed()));
|
||||
|
||||
y += 24;
|
||||
|
||||
// Row 4: Lightning Effect Enabled (only affects head)
|
||||
addLabel(new GuiNpcLabel(205, "ability.lightning", labelX, y + 5));
|
||||
GuiNpcButton lightningBtn = new GuiNpcButton(205, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, beam.hasLightningEffect() ? 1 : 0);
|
||||
addLabel(new GuiNpcLabel(206, "ability.lightning", labelX, y + 5));
|
||||
GuiNpcButton lightningBtn = new GuiNpcButton(206, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, beam.hasLightningEffect() ? 1 : 0);
|
||||
lightningBtn.setHoverText("ability.hover.lightning");
|
||||
addButton(lightningBtn);
|
||||
|
||||
@@ -168,13 +174,13 @@ public class SubGuiAbilityEnergyBeam extends SubGuiAbilityConfig {
|
||||
y += 24;
|
||||
|
||||
// Row 5: Density + Radius
|
||||
addLabel(new GuiNpcLabel(206, "ability.lightningDensity", labelX, y + 5));
|
||||
GuiNpcTextField densityField = new GuiNpcTextField(206, this, fontRendererObj, fieldX, y, 55, 18, String.valueOf(beam.getLightningDensity()));
|
||||
addLabel(new GuiNpcLabel(207, "ability.lightningDensity", labelX, y + 5));
|
||||
GuiNpcTextField densityField = new GuiNpcTextField(207, this, fontRendererObj, fieldX, y, 55, 18, String.valueOf(beam.getLightningDensity()));
|
||||
densityField.setMinMaxDefaultFloat(0.01f, 5.0f, 0.15f);
|
||||
addTextField(densityField);
|
||||
|
||||
addLabel(new GuiNpcLabel(207, "ability.lightningRadius", col2LabelX, y + 5));
|
||||
GuiNpcTextField radiusField = new GuiNpcTextField(207, this, fontRendererObj, col2FieldX, y, 55, 18, String.valueOf(beam.getLightningRadius()));
|
||||
addLabel(new GuiNpcLabel(208, "ability.lightningRadius", col2LabelX, y + 5));
|
||||
GuiNpcTextField radiusField = new GuiNpcTextField(208, this, fontRendererObj, col2FieldX, y, 55, 18, String.valueOf(beam.getLightningRadius()));
|
||||
radiusField.setMinMaxDefaultFloat(0.1f, 10.0f, 0.5f);
|
||||
addTextField(radiusField);
|
||||
}
|
||||
@@ -214,7 +220,7 @@ public class SubGuiAbilityEnergyBeam extends SubGuiAbilityConfig {
|
||||
beam.setOuterColorEnabled(value == 1);
|
||||
initGui();
|
||||
break;
|
||||
case 205:
|
||||
case 206:
|
||||
beam.setLightningEffect(value == 1);
|
||||
initGui();
|
||||
break;
|
||||
@@ -290,12 +296,15 @@ public class SubGuiAbilityEnergyBeam extends SubGuiAbilityConfig {
|
||||
beam.setOuterColorWidth(parseFloat(field, beam.getOuterColorWidth()));
|
||||
break;
|
||||
case 204:
|
||||
beam.setOuterColorAlpha(parseFloat(field, beam.getOuterColorAlpha()));
|
||||
break;
|
||||
case 205:
|
||||
beam.setRotationSpeed(parseFloat(field, beam.getRotationSpeed()));
|
||||
break;
|
||||
case 206:
|
||||
case 207:
|
||||
beam.setLightningDensity(parseFloat(field, beam.getLightningDensity()));
|
||||
break;
|
||||
case 207:
|
||||
case 208:
|
||||
beam.setLightningRadius(parseFloat(field, beam.getLightningRadius()));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -127,8 +127,14 @@ public class SubGuiAbilityLaserShot extends SubGuiAbilityConfig {
|
||||
y += 24;
|
||||
|
||||
// Row 3: Lightning Effect Enabled
|
||||
addLabel(new GuiNpcLabel(204, "ability.lightning", labelX, y + 5));
|
||||
GuiNpcButton lightningBtn = new GuiNpcButton(204, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, laser.hasLightningEffect() ? 1 : 0);
|
||||
addLabel(new GuiNpcLabel(204, "ability.outerAlpha", labelX, y + 5));
|
||||
GuiNpcTextField alphaField = createFloatField(204, fieldX, y, 55, laser.getOuterColorAlpha());
|
||||
alphaField.setEnabled(laser.isOuterColorEnabled());
|
||||
alphaField.setMinMaxDefaultFloat(0, 1, 0.5f);
|
||||
addTextField(alphaField);
|
||||
|
||||
addLabel(new GuiNpcLabel(205, "ability.lightning", col2LabelX, y + 5));
|
||||
GuiNpcButton lightningBtn = new GuiNpcButton(205, col2FieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, laser.hasLightningEffect() ? 1 : 0);
|
||||
lightningBtn.setHoverText("ability.hover.lightning");
|
||||
addButton(lightningBtn);
|
||||
|
||||
@@ -137,13 +143,13 @@ public class SubGuiAbilityLaserShot extends SubGuiAbilityConfig {
|
||||
y += 24;
|
||||
|
||||
// Row 4: Density + Radius
|
||||
addLabel(new GuiNpcLabel(205, "ability.lightningDensity", labelX, y + 5));
|
||||
GuiNpcTextField densityField = new GuiNpcTextField(205, this, fontRendererObj, fieldX, y, 55, 18, String.valueOf(laser.getLightningDensity()));
|
||||
addLabel(new GuiNpcLabel(206, "ability.lightningDensity", labelX, y + 5));
|
||||
GuiNpcTextField densityField = new GuiNpcTextField(206, this, fontRendererObj, fieldX, y, 55, 18, String.valueOf(laser.getLightningDensity()));
|
||||
densityField.setMinMaxDefaultFloat(0.01f, 5.0f, 0.15f);
|
||||
addTextField(densityField);
|
||||
|
||||
addLabel(new GuiNpcLabel(206, "ability.lightningRadius", col2LabelX, y + 5));
|
||||
GuiNpcTextField radiusField = new GuiNpcTextField(206, this, fontRendererObj, col2FieldX, y, 55, 18, String.valueOf(laser.getLightningRadius()));
|
||||
addLabel(new GuiNpcLabel(207, "ability.lightningRadius", col2LabelX, y + 5));
|
||||
GuiNpcTextField radiusField = new GuiNpcTextField(207, this, fontRendererObj, col2FieldX, y, 55, 18, String.valueOf(laser.getLightningRadius()));
|
||||
radiusField.setMinMaxDefaultFloat(0.1f, 10.0f, 0.5f);
|
||||
addTextField(radiusField);
|
||||
}
|
||||
@@ -179,7 +185,7 @@ public class SubGuiAbilityLaserShot extends SubGuiAbilityConfig {
|
||||
laser.setOuterColorEnabled(value == 1);
|
||||
initGui();
|
||||
break;
|
||||
case 204:
|
||||
case 205:
|
||||
laser.setLightningEffect(value == 1);
|
||||
initGui();
|
||||
break;
|
||||
@@ -215,10 +221,13 @@ public class SubGuiAbilityLaserShot extends SubGuiAbilityConfig {
|
||||
case 203:
|
||||
laser.setOuterColorWidth(parseFloat(field, laser.getOuterColorWidth()));
|
||||
break;
|
||||
case 205:
|
||||
laser.setLightningDensity(parseFloat(field, laser.getLightningDensity()));
|
||||
case 204:
|
||||
laser.setOuterColorAlpha(parseFloat(field, laser.getOuterColorAlpha()));
|
||||
break;
|
||||
case 206:
|
||||
laser.setLightningDensity(parseFloat(field, laser.getLightningDensity()));
|
||||
break;
|
||||
case 207:
|
||||
laser.setLightningRadius(parseFloat(field, laser.getLightningRadius()));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -119,20 +119,26 @@ public class SubGuiAbilityOrb extends SubGuiAbilityConfig {
|
||||
innerColorBtn.setTextColor(orb.getInnerColor() & 0xFFFFFF);
|
||||
addButton(innerColorBtn);
|
||||
|
||||
addLabel(new GuiNpcLabel(204, "ability.rotationSpeed", col2LabelX, y + 5));
|
||||
addTextField(createFloatField(204, col2FieldX, y, 55, orb.getRotationSpeed()));
|
||||
addLabel(new GuiNpcLabel(205, "ability.rotationSpeed", col2LabelX, y + 5));
|
||||
addTextField(createFloatField(205, col2FieldX, y, 55, orb.getRotationSpeed()));
|
||||
|
||||
y += 24;
|
||||
|
||||
// Row 2: Outer Glow Enabled
|
||||
// Row 3: Outer Glow Enabled
|
||||
addLabel(new GuiNpcLabel(202, "ability.outerEnabled", labelX, y + 5));
|
||||
addButton(new GuiNpcButton(202, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, orb.isOuterColorEnabled() ? 1 : 0));
|
||||
|
||||
// Only show Outer Color and Width if Outer Glow is enabled
|
||||
if (orb.isOuterColorEnabled()) {
|
||||
addLabel(new GuiNpcLabel(204, "ability.outerAlpha", col2LabelX, y + 5));
|
||||
GuiNpcTextField alphaField = createFloatField(204, col2FieldX, y, 55, orb.getOuterColorAlpha());
|
||||
alphaField.setEnabled(orb.isOuterColorEnabled());
|
||||
alphaField.setMinMaxDefaultFloat(0, 1, 0.5f);
|
||||
addTextField(alphaField);
|
||||
|
||||
y += 24;
|
||||
|
||||
// Row 3: Outer Color + Outer Width
|
||||
// Row 4: Outer Color + Outer Width
|
||||
addLabel(new GuiNpcLabel(201, "ability.outerColor", labelX, y + 5));
|
||||
String outerHex = String.format("%06X", orb.getOuterColor() & 0xFFFFFF);
|
||||
GuiNpcButton outerColorBtn = new GuiNpcButton(201, fieldX, y, 55, 20, outerHex);
|
||||
@@ -145,9 +151,9 @@ public class SubGuiAbilityOrb extends SubGuiAbilityConfig {
|
||||
|
||||
y += 24;
|
||||
|
||||
// Row 4: Lightning Effect Enabled
|
||||
addLabel(new GuiNpcLabel(205, "ability.lightning", labelX, y + 5));
|
||||
GuiNpcButton lightningBtn = new GuiNpcButton(205, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, orb.hasLightningEffect() ? 1 : 0);
|
||||
// Row 5: Lightning Effect Enabled
|
||||
addLabel(new GuiNpcLabel(206, "ability.lightning", labelX, y + 5));
|
||||
GuiNpcButton lightningBtn = new GuiNpcButton(206, fieldX, y, 50, 20, new String[]{"gui.no", "gui.yes"}, orb.hasLightningEffect() ? 1 : 0);
|
||||
lightningBtn.setHoverText("ability.hover.lightning");
|
||||
addButton(lightningBtn);
|
||||
|
||||
@@ -155,14 +161,14 @@ public class SubGuiAbilityOrb extends SubGuiAbilityConfig {
|
||||
if (orb.hasLightningEffect()) {
|
||||
y += 24;
|
||||
|
||||
// Row 5: Density + Radius
|
||||
addLabel(new GuiNpcLabel(206, "ability.lightningDensity", labelX, y + 5));
|
||||
GuiNpcTextField densityField = new GuiNpcTextField(206, this, fontRendererObj, fieldX, y, 55, 18, String.valueOf(orb.getLightningDensity()));
|
||||
// Row 61: Density + Radius
|
||||
addLabel(new GuiNpcLabel(207, "ability.lightningDensity", labelX, y + 5));
|
||||
GuiNpcTextField densityField = new GuiNpcTextField(207, this, fontRendererObj, fieldX, y, 55, 18, String.valueOf(orb.getLightningDensity()));
|
||||
densityField.setMinMaxDefaultFloat(0.01f, 5.0f, 0.15f);
|
||||
addTextField(densityField);
|
||||
|
||||
addLabel(new GuiNpcLabel(207, "ability.lightningRadius", col2LabelX, y + 5));
|
||||
GuiNpcTextField radiusField = new GuiNpcTextField(207, this, fontRendererObj, col2FieldX, y, 55, 18, String.valueOf(orb.getLightningRadius()));
|
||||
addLabel(new GuiNpcLabel(208, "ability.lightningRadius", col2LabelX, y + 5));
|
||||
GuiNpcTextField radiusField = new GuiNpcTextField(208, this, fontRendererObj, col2FieldX, y, 55, 18, String.valueOf(orb.getLightningRadius()));
|
||||
radiusField.setMinMaxDefaultFloat(0.1f, 10.0f, 0.5f);
|
||||
addTextField(radiusField);
|
||||
}
|
||||
@@ -202,7 +208,7 @@ public class SubGuiAbilityOrb extends SubGuiAbilityConfig {
|
||||
orb.setOuterColorEnabled(value == 1);
|
||||
initGui();
|
||||
break;
|
||||
case 205:
|
||||
case 206:
|
||||
orb.setLightningEffect(value == 1);
|
||||
initGui();
|
||||
break;
|
||||
@@ -272,12 +278,15 @@ public class SubGuiAbilityOrb extends SubGuiAbilityConfig {
|
||||
orb.setOuterColorWidth(parseFloat(field, orb.getOuterColorWidth()));
|
||||
break;
|
||||
case 204:
|
||||
orb.setOuterColorAlpha(parseFloat(field, orb.getOuterColorAlpha()));
|
||||
break;
|
||||
case 205:
|
||||
orb.setRotationSpeed(parseFloat(field, orb.getRotationSpeed()));
|
||||
break;
|
||||
case 206:
|
||||
case 207:
|
||||
orb.setLightningDensity(parseFloat(field, orb.getLightningDensity()));
|
||||
break;
|
||||
case 207:
|
||||
case 208:
|
||||
orb.setLightningRadius(parseFloat(field, orb.getLightningRadius()));
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user