mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 10:06:00 +00:00
Reformat Code
This commit is contained in:
1 parent
21e920426e
commit
1de1c4e710
169 files changed
+3967
-1556
No files matched your search
@@ -7,38 +7,36 @@ import kamkeel.npcs.controllers.data.telegraph.Telegraph;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphInstance;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.DataAbilities;
|
||||
import noppes.npcs.NpcDamageSource;
|
||||
import noppes.npcs.api.INbt;
|
||||
import noppes.npcs.api.ability.IAbility;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.client.gui.advanced.SubGuiAbilityConfig;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import noppes.npcs.client.gui.util.IAbilityConfigCallback;
|
||||
import noppes.npcs.controllers.AnimationController;
|
||||
import noppes.npcs.controllers.data.Animation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import noppes.npcs.controllers.data.Frame;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.controllers.ScriptController;
|
||||
import noppes.npcs.controllers.data.Animation;
|
||||
import noppes.npcs.controllers.data.Frame;
|
||||
import noppes.npcs.controllers.data.PlayerDataScript;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.event.AbilityEvent;
|
||||
import noppes.npcs.scripted.event.player.PlayerAbilityEvent;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public abstract class Ability implements IAbility, IAbilityAction {
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
@@ -115,10 +113,14 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
// TOGGLE CONFIGURATION (saved to NBT for custom abilities)
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
/** Whether this ability is a toggle (ON/OFF) rather than a phased execution */
|
||||
/**
|
||||
* Whether this ability is a toggle (ON/OFF) rather than a phased execution
|
||||
*/
|
||||
protected boolean toggleable = false;
|
||||
|
||||
/** Whether the toggled-ON state ticks each game tick (e.g., Kaioken drains ki per tick) */
|
||||
/**
|
||||
* Whether the toggled-ON state ticks each game tick (e.g., Kaioken drains ki per tick)
|
||||
*/
|
||||
protected boolean hasActiveToggle = false;
|
||||
|
||||
// Configurable potion effects
|
||||
@@ -232,17 +234,20 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
* Called when this toggle ability is turned ON for an entity.
|
||||
* Override to apply effects (e.g., set a DBC flag, apply a buff).
|
||||
*/
|
||||
public void onToggleOn(EntityLivingBase caster) {}
|
||||
public void onToggleOn(EntityLivingBase caster) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when this toggle ability is turned OFF for an entity.
|
||||
* Override to remove effects (e.g., clear a DBC flag, remove a buff).
|
||||
*/
|
||||
public void onToggleOff(EntityLivingBase caster) {}
|
||||
public void onToggleOff(EntityLivingBase caster) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called every tick while this toggle is active (only if hasActiveToggle is true).
|
||||
* Override for per-tick effects (e.g., ki drain for Kaioken).
|
||||
*
|
||||
* @return true to keep the toggle active, false to auto-deactivate
|
||||
*/
|
||||
public boolean onToggleTick(EntityLivingBase caster, int tickCount) {
|
||||
@@ -252,6 +257,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
/**
|
||||
* Whether this ability is ready for auto-completion during burst overlap mode.
|
||||
* Override to delay auto-completion until all staggered projectiles have been fired.
|
||||
*
|
||||
* @param activeTick the current tick within the ACTIVE phase
|
||||
*/
|
||||
public boolean isReadyForBurstCompletion(int activeTick) {
|
||||
@@ -554,27 +560,36 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
() -> this.getLockMovement().getDisplayKey(),
|
||||
v -> {
|
||||
for (LockMovementType t : LockMovementType.values()) {
|
||||
if (t.getDisplayKey().equals(v)) { this.setLockMovement(t); break; }
|
||||
if (t.getDisplayKey().equals(v)) {
|
||||
this.setLockMovement(t);
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
.hover("ability.hover.lockMovement")
|
||||
.tab("General"));
|
||||
.hover("ability.hover.lockMovement")
|
||||
.tab("General"));
|
||||
defs.add(FieldDef.row(
|
||||
FieldDef.stringEnumField("ability.rotationMode", RotationMode.getDisplayKeys(),
|
||||
() -> this.getRotationMode().getDisplayKey(),
|
||||
v -> {
|
||||
for (RotationMode m : RotationMode.values()) {
|
||||
if (m.getDisplayKey().equals(v)) { this.setRotationMode(m); break; }
|
||||
}
|
||||
})
|
||||
() -> this.getRotationMode().getDisplayKey(),
|
||||
v -> {
|
||||
for (RotationMode m : RotationMode.values()) {
|
||||
if (m.getDisplayKey().equals(v)) {
|
||||
this.setRotationMode(m);
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
.hover("ability.hover.rotationMode"),
|
||||
FieldDef.stringEnumField("ability.rotationPhase", getRotationPhaseKeys(),
|
||||
() -> this.getRotationPhase().getDisplayKey(),
|
||||
v -> {
|
||||
for (LockMovementType t : LockMovementType.values()) {
|
||||
if (t.getDisplayKey().equals(v)) { this.setRotationPhase(t); break; }
|
||||
}
|
||||
})
|
||||
() -> this.getRotationPhase().getDisplayKey(),
|
||||
v -> {
|
||||
for (LockMovementType t : LockMovementType.values()) {
|
||||
if (t.getDisplayKey().equals(v)) {
|
||||
this.setRotationPhase(t);
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
.hover("ability.hover.rotationPhase")
|
||||
.visibleWhen(() -> this.rotationMode != RotationMode.FREE)
|
||||
).tab("General"));
|
||||
@@ -617,15 +632,17 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
allowedKeys[i] = allowed[i].name();
|
||||
}
|
||||
defs.add(FieldDef.stringEnumField("ability.targetingMode", allowedKeys,
|
||||
() -> this.getTargetingMode().name(),
|
||||
v -> {
|
||||
try { this.setTargetingMode(TargetingMode.valueOf(v)); }
|
||||
catch (Exception ignored) {}
|
||||
})
|
||||
() -> this.getTargetingMode().name(),
|
||||
v -> {
|
||||
try {
|
||||
this.setTargetingMode(TargetingMode.valueOf(v));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
})
|
||||
.tab("Target").hover("ability.hover.targeting"));
|
||||
} else {
|
||||
defs.add(FieldDef.enumField("ability.targetingMode", TargetingMode.class,
|
||||
this::getTargetingMode, this::setTargetingMode)
|
||||
this::getTargetingMode, this::setTargetingMode)
|
||||
.tab("Target").hover("ability.hover.targeting"));
|
||||
}
|
||||
}
|
||||
@@ -638,12 +655,12 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
.tab("Effects"));
|
||||
defs.add(FieldDef.section("ability.section.animations").tab("Effects"));
|
||||
defs.add(FieldDef.animSubGui("ability.windUpAnimation",
|
||||
this::getWindUpAnimationId, this::setWindUpAnimationId,
|
||||
this::getWindUpAnimationName, this::setWindUpAnimationName)
|
||||
this::getWindUpAnimationId, this::setWindUpAnimationId,
|
||||
this::getWindUpAnimationName, this::setWindUpAnimationName)
|
||||
.tab("Effects"));
|
||||
defs.add(FieldDef.animSubGui("ability.activeAnimation",
|
||||
this::getActiveAnimationId, this::setActiveAnimationId,
|
||||
this::getActiveAnimationName, this::setActiveAnimationName)
|
||||
this::getActiveAnimationId, this::setActiveAnimationId,
|
||||
this::getActiveAnimationName, this::setActiveAnimationName)
|
||||
.tab("Effects"));
|
||||
defs.add(FieldDef.animSubGui("ability.dazedAnimation",
|
||||
this::getDazedAnimationId, this::setDazedAnimationId,
|
||||
@@ -699,7 +716,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
* Create a telegraph instance for this ability.
|
||||
* Override for custom telegraph shapes.
|
||||
*
|
||||
* @param caster The caster
|
||||
* @param caster The caster
|
||||
* @param target The target (for position calculation)
|
||||
* @return The telegraph instance, or null if no telegraph
|
||||
*/
|
||||
@@ -1514,6 +1531,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
|
||||
/**
|
||||
* API method: Get lock movement type as integer.
|
||||
*
|
||||
* @return 0=NO, 1=WINDUP, 2=ACTIVE, 3=WINDUP_AND_ACTIVE
|
||||
*/
|
||||
@Override
|
||||
@@ -1523,6 +1541,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
|
||||
/**
|
||||
* API method: Set lock movement type from integer.
|
||||
*
|
||||
* @param type 0=NO, 1=WINDUP, 2=ACTIVE, 3=WINDUP_AND_ACTIVE
|
||||
*/
|
||||
@Override
|
||||
@@ -1532,6 +1551,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
|
||||
/**
|
||||
* API method: Get rotation mode as integer.
|
||||
*
|
||||
* @return 0=FREE, 1=LOCKED, 2=TRACK
|
||||
*/
|
||||
@Override
|
||||
@@ -1541,6 +1561,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
|
||||
/**
|
||||
* API method: Set rotation mode from integer.
|
||||
*
|
||||
* @param type 0=FREE, 1=LOCKED, 2=TRACK
|
||||
*/
|
||||
@Override
|
||||
@@ -1550,6 +1571,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
|
||||
/**
|
||||
* API method: Get rotation phase as integer.
|
||||
*
|
||||
* @return 0=NO, 1=WINDUP, 2=ACTIVE, 3=WINDUP_AND_ACTIVE
|
||||
*/
|
||||
@Override
|
||||
@@ -1559,6 +1581,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
|
||||
/**
|
||||
* API method: Set rotation phase from integer.
|
||||
*
|
||||
* @param type 0=NO, 1=WINDUP, 2=ACTIVE, 3=WINDUP_AND_ACTIVE
|
||||
*/
|
||||
@Override
|
||||
|
||||
@@ -24,14 +24,17 @@ public class AbilityAction {
|
||||
private ChainedAbility inlineChain;
|
||||
private String referenceId;
|
||||
|
||||
/** Per-slot enabled override for reference slots (null = use master's default). */
|
||||
/**
|
||||
* Per-slot enabled override for reference slots (null = use master's default).
|
||||
*/
|
||||
private Boolean enabledOverride;
|
||||
|
||||
// Cache
|
||||
private transient IAbilityAction cachedAction;
|
||||
private transient int cachedRevision = -1;
|
||||
|
||||
private AbilityAction() {}
|
||||
private AbilityAction() {
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// FACTORY METHODS
|
||||
|
||||
@@ -18,13 +18,16 @@ public class AbilitySlot {
|
||||
private Ability inlineAbility;
|
||||
private String referenceId;
|
||||
|
||||
/** Per-slot enabled override for reference slots (null = use master's default). */
|
||||
/**
|
||||
* Per-slot enabled override for reference slots (null = use master's default).
|
||||
*/
|
||||
private Boolean enabledOverride;
|
||||
|
||||
private transient Ability cachedAbility;
|
||||
private transient int cachedVersion = -1;
|
||||
|
||||
private AbilitySlot() {}
|
||||
private AbilitySlot() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a slot with an inline (embedded) ability.
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.function.Consumer;
|
||||
* Represents a variant/template for an ability type.
|
||||
* When a user creates an ability that has registered variants,
|
||||
* they are presented with a selection dialog before the ability is created.
|
||||
*
|
||||
* <p>
|
||||
* Each variant has a display name (lang key) and a configurator that
|
||||
* applies preset values to the newly created ability.
|
||||
*/
|
||||
|
||||
@@ -50,14 +50,22 @@ public enum AnchorPoint {
|
||||
@Override
|
||||
public String toString() {
|
||||
switch (this) {
|
||||
case FRONT: return "ability.anchor.front";
|
||||
case CENTER: return "ability.anchor.center";
|
||||
case RIGHT_HAND: return "ability.anchor.rightHand";
|
||||
case LEFT_HAND: return "ability.anchor.leftHand";
|
||||
case ABOVE_HEAD: return "ability.anchor.aboveHead";
|
||||
case CHEST: return "ability.anchor.chest";
|
||||
case EYE: return "ability.anchor.eye";
|
||||
default: return name();
|
||||
case FRONT:
|
||||
return "ability.anchor.front";
|
||||
case CENTER:
|
||||
return "ability.anchor.center";
|
||||
case RIGHT_HAND:
|
||||
return "ability.anchor.rightHand";
|
||||
case LEFT_HAND:
|
||||
return "ability.anchor.leftHand";
|
||||
case ABOVE_HEAD:
|
||||
return "ability.anchor.aboveHead";
|
||||
case CHEST:
|
||||
return "ability.anchor.chest";
|
||||
case EYE:
|
||||
return "ability.anchor.eye";
|
||||
default:
|
||||
return name();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,31 +29,48 @@ public class ChainedAbility implements IChainedAbility, IAbilityAction {
|
||||
|
||||
private boolean enabled = true;
|
||||
|
||||
/** Weight for NPC weighted random selection. */
|
||||
/**
|
||||
* Weight for NPC weighted random selection.
|
||||
*/
|
||||
private int weight = 10;
|
||||
|
||||
/** Whether each ability in the chain uses its own windup phase. */
|
||||
/**
|
||||
* Whether each ability in the chain uses its own windup phase.
|
||||
*/
|
||||
private boolean windUpAll = true;
|
||||
|
||||
/** Chain-level cooldown in ticks (applied after entire chain completes). */
|
||||
/**
|
||||
* Chain-level cooldown in ticks (applied after entire chain completes).
|
||||
*/
|
||||
private int cooldownTicks = 100;
|
||||
|
||||
/** Minimum range for NPC eligibility check. */
|
||||
/**
|
||||
* Minimum range for NPC eligibility check.
|
||||
*/
|
||||
private float minRange = 0;
|
||||
|
||||
/** Maximum range for NPC eligibility check. */
|
||||
/**
|
||||
* Maximum range for NPC eligibility check.
|
||||
*/
|
||||
private float maxRange = 20;
|
||||
|
||||
/** Chain-level conditions (individual ability conditions are ignored). */
|
||||
/**
|
||||
* Chain-level conditions (individual ability conditions are ignored).
|
||||
*/
|
||||
private List<Condition> conditions = new ArrayList<>();
|
||||
|
||||
/** Ordered list of ability entries to execute. */
|
||||
/**
|
||||
* Ordered list of ability entries to execute.
|
||||
*/
|
||||
private List<ChainedAbilityEntry> entries = new ArrayList<>();
|
||||
|
||||
/** Extension data for external mods (e.g., icons, DBC stats). */
|
||||
/**
|
||||
* Extension data for external mods (e.g., icons, DBC stats).
|
||||
*/
|
||||
private NBTTagCompound customData = new NBTTagCompound();
|
||||
|
||||
public ChainedAbility() {}
|
||||
public ChainedAbility() {
|
||||
}
|
||||
|
||||
public ChainedAbility(String name) {
|
||||
this.name = name != null ? name : "";
|
||||
|
||||
@@ -12,20 +12,27 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
*/
|
||||
public class ChainedAbilityEntry {
|
||||
|
||||
public enum EntryType { REFERENCE, INLINE }
|
||||
public enum EntryType {REFERENCE, INLINE}
|
||||
|
||||
private EntryType entryType = EntryType.REFERENCE;
|
||||
|
||||
/** Reference key (built-in name or custom ability name). Used when entryType == REFERENCE. */
|
||||
/**
|
||||
* Reference key (built-in name or custom ability name). Used when entryType == REFERENCE.
|
||||
*/
|
||||
private String abilityReference = "";
|
||||
|
||||
/** Inline ability data. Used when entryType == INLINE. */
|
||||
/**
|
||||
* Inline ability data. Used when entryType == INLINE.
|
||||
*/
|
||||
private Ability inlineAbility = null;
|
||||
|
||||
/** Delay in ticks BEFORE this ability starts (after previous entry completes). */
|
||||
/**
|
||||
* Delay in ticks BEFORE this ability starts (after previous entry completes).
|
||||
*/
|
||||
private int delayTicks = 0;
|
||||
|
||||
public ChainedAbilityEntry() {}
|
||||
public ChainedAbilityEntry() {
|
||||
}
|
||||
|
||||
public ChainedAbilityEntry(String abilityReference, int delayTicks) {
|
||||
this.entryType = EntryType.REFERENCE;
|
||||
|
||||
@@ -9,5 +9,6 @@ import net.minecraft.entity.Entity;
|
||||
*/
|
||||
public interface PreviewEntityHandler {
|
||||
void onEntitySpawned(Entity entity);
|
||||
|
||||
void onEntityRemoved(Entity entity);
|
||||
}
|
||||
@@ -27,11 +27,16 @@ public enum TargetingMode {
|
||||
@Override
|
||||
public String toString() {
|
||||
switch (this) {
|
||||
case AGGRO_TARGET: return "ability.target.aggro_target";
|
||||
case SELF: return "ability.target.self";
|
||||
case AOE_SELF: return "ability.target.aoe_self";
|
||||
case AOE_TARGET: return "ability.target.aoe_target";
|
||||
default: return name();
|
||||
case AGGRO_TARGET:
|
||||
return "ability.target.aggro_target";
|
||||
case SELF:
|
||||
return "ability.target.self";
|
||||
case AOE_SELF:
|
||||
return "ability.target.aoe_self";
|
||||
case AOE_TARGET:
|
||||
return "ability.target.aoe_target";
|
||||
default:
|
||||
return name();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,9 @@ public class EnergyBarrierData {
|
||||
// Knockback settings
|
||||
public boolean knockbackEnabled = false;
|
||||
public float knockbackStrength = 1.0f;
|
||||
/** 0=Both, 1=Player only, 2=NPC only */
|
||||
/**
|
||||
* 0=Both, 1=Player only, 2=NPC only
|
||||
*/
|
||||
public int knockbackTarget = 0;
|
||||
|
||||
// Melee settings
|
||||
@@ -36,7 +38,8 @@ public class EnergyBarrierData {
|
||||
*/
|
||||
private Map<String, Float> damageMultipliers = new HashMap<>();
|
||||
|
||||
public EnergyBarrierData() {}
|
||||
public EnergyBarrierData() {
|
||||
}
|
||||
|
||||
public EnergyBarrierData(float maxHealth, boolean useHealth, int durationTicks, boolean useDuration) {
|
||||
this.maxHealth = maxHealth;
|
||||
@@ -70,23 +73,50 @@ public class EnergyBarrierData {
|
||||
|
||||
// ==================== GETTERS & SETTERS ====================
|
||||
|
||||
public float getMaxHealth() { return maxHealth; }
|
||||
public void setMaxHealth(float maxHealth) { this.maxHealth = Math.max(0, maxHealth); }
|
||||
public float getMaxHealth() {
|
||||
return maxHealth;
|
||||
}
|
||||
|
||||
public boolean isUseHealth() { return useHealth; }
|
||||
public void setUseHealth(boolean useHealth) { this.useHealth = useHealth; }
|
||||
public void setMaxHealth(float maxHealth) {
|
||||
this.maxHealth = Math.max(0, maxHealth);
|
||||
}
|
||||
|
||||
public int getDurationTicks() { return durationTicks; }
|
||||
public void setDurationTicks(int durationTicks) { this.durationTicks = Math.max(1, durationTicks); }
|
||||
public boolean isUseHealth() {
|
||||
return useHealth;
|
||||
}
|
||||
|
||||
public boolean isUseDuration() { return useDuration; }
|
||||
public void setUseDuration(boolean useDuration) { this.useDuration = useDuration; }
|
||||
public void setUseHealth(boolean useHealth) {
|
||||
this.useHealth = useHealth;
|
||||
}
|
||||
|
||||
public float getDefaultMultiplier() { return defaultMultiplier; }
|
||||
public void setDefaultMultiplier(float defaultMultiplier) { this.defaultMultiplier = defaultMultiplier; }
|
||||
public int getDurationTicks() {
|
||||
return durationTicks;
|
||||
}
|
||||
|
||||
public void setDurationTicks(int durationTicks) {
|
||||
this.durationTicks = Math.max(1, durationTicks);
|
||||
}
|
||||
|
||||
public boolean isUseDuration() {
|
||||
return useDuration;
|
||||
}
|
||||
|
||||
public void setUseDuration(boolean useDuration) {
|
||||
this.useDuration = useDuration;
|
||||
}
|
||||
|
||||
public float getDefaultMultiplier() {
|
||||
return defaultMultiplier;
|
||||
}
|
||||
|
||||
public void setDefaultMultiplier(float defaultMultiplier) {
|
||||
this.defaultMultiplier = defaultMultiplier;
|
||||
}
|
||||
|
||||
// Knockback target key helpers
|
||||
public static String[] getKnockbackTargetKeys() { return KNOCKBACK_TARGET_KEYS; }
|
||||
public static String[] getKnockbackTargetKeys() {
|
||||
return KNOCKBACK_TARGET_KEYS;
|
||||
}
|
||||
|
||||
public String getKnockbackTargetKey() {
|
||||
return KNOCKBACK_TARGET_KEYS[Math.max(0, Math.min(knockbackTarget, 2))];
|
||||
|
||||
@@ -15,7 +15,8 @@ public class EnergyCombatData implements IEnergyCombatData {
|
||||
public float explosionRadius = 3.0f;
|
||||
public float explosionDamageFalloff = 0.5f;
|
||||
|
||||
public EnergyCombatData() {}
|
||||
public EnergyCombatData() {
|
||||
}
|
||||
|
||||
public EnergyCombatData(float damage, float knockback, float knockbackUp,
|
||||
boolean explosive, float explosionRadius, float explosionDamageFalloff) {
|
||||
|
||||
@@ -20,7 +20,8 @@ public class EnergyDisplayData implements IEnergyDisplayData {
|
||||
// public boolean skyboxEnabled = false;
|
||||
// public String skyboxTexture = "";
|
||||
|
||||
public EnergyDisplayData() {}
|
||||
public EnergyDisplayData() {
|
||||
}
|
||||
|
||||
public EnergyDisplayData(int innerColor, int outerColor) {
|
||||
this.innerColor = innerColor;
|
||||
|
||||
@@ -14,7 +14,8 @@ public class EnergyHomingData implements IEnergyHomingData {
|
||||
public float homingStrength = 0.15f;
|
||||
public float homingRange = 20.0f;
|
||||
|
||||
public EnergyHomingData() {}
|
||||
public EnergyHomingData() {
|
||||
}
|
||||
|
||||
public EnergyHomingData(float speed, boolean homing, float homingStrength, float homingRange) {
|
||||
this.speed = speed;
|
||||
|
||||
@@ -11,7 +11,8 @@ public class EnergyLifespanData implements IEnergyLifespanData {
|
||||
public float maxDistance = 30.0f;
|
||||
public int maxLifetime = 200;
|
||||
|
||||
public EnergyLifespanData() {}
|
||||
public EnergyLifespanData() {
|
||||
}
|
||||
|
||||
public EnergyLifespanData(float maxDistance, int maxLifetime) {
|
||||
this.maxDistance = maxDistance;
|
||||
|
||||
@@ -13,7 +13,8 @@ public class EnergyLightningData implements IEnergyLightningData {
|
||||
public float lightningRadius = 0.5f;
|
||||
public int lightningFadeTime = 6;
|
||||
|
||||
public EnergyLightningData() {}
|
||||
public EnergyLightningData() {
|
||||
}
|
||||
|
||||
public EnergyLightningData(boolean lightningEffect, float lightningDensity,
|
||||
float lightningRadius, int lightningFadeTime) {
|
||||
|
||||
@@ -17,7 +17,8 @@ public class EnergyPanelData {
|
||||
public float launchDamage = 8.0f;
|
||||
public float launchKnockback = 2.0f;
|
||||
|
||||
public EnergyPanelData() {}
|
||||
public EnergyPanelData() {
|
||||
}
|
||||
|
||||
public EnergyPanelData(float panelWidth, float panelHeight, float heightOffset) {
|
||||
this.panelWidth = panelWidth;
|
||||
@@ -27,26 +28,61 @@ public class EnergyPanelData {
|
||||
|
||||
// ==================== GETTERS & SETTERS ====================
|
||||
|
||||
public float getPanelWidth() { return panelWidth; }
|
||||
public void setPanelWidth(float panelWidth) { this.panelWidth = Math.max(0.5f, panelWidth); }
|
||||
public float getPanelWidth() {
|
||||
return panelWidth;
|
||||
}
|
||||
|
||||
public float getPanelHeight() { return panelHeight; }
|
||||
public void setPanelHeight(float panelHeight) { this.panelHeight = Math.max(0.5f, panelHeight); }
|
||||
public void setPanelWidth(float panelWidth) {
|
||||
this.panelWidth = Math.max(0.5f, panelWidth);
|
||||
}
|
||||
|
||||
public float getHeightOffset() { return heightOffset; }
|
||||
public void setHeightOffset(float heightOffset) { this.heightOffset = heightOffset; }
|
||||
public float getPanelHeight() {
|
||||
return panelHeight;
|
||||
}
|
||||
|
||||
public boolean isLaunching() { return launching; }
|
||||
public void setLaunching(boolean launching) { this.launching = launching; }
|
||||
public void setPanelHeight(float panelHeight) {
|
||||
this.panelHeight = Math.max(0.5f, panelHeight);
|
||||
}
|
||||
|
||||
public float getLaunchSpeed() { return launchSpeed; }
|
||||
public void setLaunchSpeed(float launchSpeed) { this.launchSpeed = Math.max(0.1f, launchSpeed); }
|
||||
public float getHeightOffset() {
|
||||
return heightOffset;
|
||||
}
|
||||
|
||||
public float getLaunchDamage() { return launchDamage; }
|
||||
public void setLaunchDamage(float launchDamage) { this.launchDamage = Math.max(0, launchDamage); }
|
||||
public void setHeightOffset(float heightOffset) {
|
||||
this.heightOffset = heightOffset;
|
||||
}
|
||||
|
||||
public float getLaunchKnockback() { return launchKnockback; }
|
||||
public void setLaunchKnockback(float launchKnockback) { this.launchKnockback = Math.max(0, launchKnockback); }
|
||||
public boolean isLaunching() {
|
||||
return launching;
|
||||
}
|
||||
|
||||
public void setLaunching(boolean launching) {
|
||||
this.launching = launching;
|
||||
}
|
||||
|
||||
public float getLaunchSpeed() {
|
||||
return launchSpeed;
|
||||
}
|
||||
|
||||
public void setLaunchSpeed(float launchSpeed) {
|
||||
this.launchSpeed = Math.max(0.1f, launchSpeed);
|
||||
}
|
||||
|
||||
public float getLaunchDamage() {
|
||||
return launchDamage;
|
||||
}
|
||||
|
||||
public void setLaunchDamage(float launchDamage) {
|
||||
this.launchDamage = Math.max(0, launchDamage);
|
||||
}
|
||||
|
||||
public float getLaunchKnockback() {
|
||||
return launchKnockback;
|
||||
}
|
||||
|
||||
public void setLaunchKnockback(float launchKnockback) {
|
||||
this.launchKnockback = Math.max(0, launchKnockback);
|
||||
}
|
||||
|
||||
// ==================== NBT ====================
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ public class EnergyTrajectoryData implements IEnergyTrajectoryData {
|
||||
public int currentPath = 0;
|
||||
private final List<Path> trajectory = new ArrayList<>();
|
||||
|
||||
public EnergyTrajectoryData() {}
|
||||
public EnergyTrajectoryData() {
|
||||
}
|
||||
|
||||
public EnergyTrajectoryData(int startingPath, Path... paths) {
|
||||
trajectory.addAll(Arrays.asList(paths));
|
||||
@@ -85,6 +86,7 @@ public class EnergyTrajectoryData implements IEnergyTrajectoryData {
|
||||
IPath p = getPath(path);
|
||||
return p == null ? 0 : p.getZ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setX(int path, double x) {
|
||||
IPath p = getPath(path);
|
||||
@@ -126,8 +128,8 @@ public class EnergyTrajectoryData implements IEnergyTrajectoryData {
|
||||
@Override
|
||||
public void setPath(int path, double x, double y, double z, int delay) {
|
||||
Path newPath = new Path(
|
||||
NpcAPI.Instance().getIPos(x, y, z),
|
||||
delay
|
||||
NpcAPI.Instance().getIPos(x, y, z),
|
||||
delay
|
||||
);
|
||||
|
||||
while (trajectory.size() <= path) {
|
||||
@@ -196,7 +198,7 @@ public class EnergyTrajectoryData implements IEnergyTrajectoryData {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Path implements IEnergyTrajectoryData.IPath{
|
||||
public static class Path implements IEnergyTrajectoryData.IPath {
|
||||
public IPos pos;
|
||||
public int delayTicks;
|
||||
public boolean concluded;
|
||||
|
||||
@@ -199,5 +199,7 @@ public class AbilityFieldBuilder extends GuiFieldBuilder {
|
||||
return super.handleTextFieldEvent(textFieldId, field);
|
||||
}
|
||||
|
||||
public Map<Integer, int[]> getEffectWidgetMeta() { return effectWidgetMeta; }
|
||||
public Map<Integer, int[]> getEffectWidgetMeta() {
|
||||
return effectWidgetMeta;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.Telegraph;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphInstance;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
@@ -11,10 +12,8 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import noppes.npcs.api.ability.type.IAbilityCharge;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package kamkeel.npcs.controllers.data.ability.type;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.Telegraph;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphInstance;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
@@ -11,15 +14,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.api.ability.type.IAbilityCutter;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
@@ -40,9 +36,12 @@ public class AbilityCutter extends Ability implements IAbilityCutter {
|
||||
@Override
|
||||
public String toString() {
|
||||
switch (this) {
|
||||
case SWIPE: return "ability.sweep.swipe";
|
||||
case SPIN: return "ability.sweep.spin";
|
||||
default: return name();
|
||||
case SWIPE:
|
||||
return "ability.sweep.swipe";
|
||||
case SPIN:
|
||||
return "ability.sweep.spin";
|
||||
default:
|
||||
return name();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,7 +231,7 @@ public class AbilityCutter extends Ability implements IAbilityCutter {
|
||||
* For SWIPE mode, this covers the continuous arc from startAngle to endAngle.
|
||||
*/
|
||||
private void performSweepDamageRange(EntityLivingBase caster, World world, float minDist, float maxDist,
|
||||
float startAngle, float endAngle) {
|
||||
float startAngle, float endAngle) {
|
||||
// Calculate the angular range covered this tick
|
||||
float minAngle = Math.min(startAngle, endAngle);
|
||||
float maxAngle = Math.max(startAngle, endAngle);
|
||||
|
||||
@@ -8,9 +8,8 @@ import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import noppes.npcs.api.ability.type.IAbilityDash;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -32,9 +31,12 @@ public class AbilityDash extends AbilityMovement implements IAbilityDash {
|
||||
@Override
|
||||
public String toString() {
|
||||
switch (this) {
|
||||
case AGGRESSIVE: return "ability.dash.aggressive";
|
||||
case DEFENSIVE: return "ability.dash.defensive";
|
||||
default: return name();
|
||||
case AGGRESSIVE:
|
||||
return "ability.dash.aggressive";
|
||||
case DEFENSIVE:
|
||||
return "ability.dash.defensive";
|
||||
default:
|
||||
return name();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
package kamkeel.npcs.controllers.data.ability.type;
|
||||
|
||||
import kamkeel.npcs.controllers.data.ability.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.AbilityPhase;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.UserType;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.api.ability.type.IAbilityGuard;
|
||||
import noppes.npcs.api.handler.data.IAnimation;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import noppes.npcs.controllers.AnimationController;
|
||||
import noppes.npcs.controllers.data.Animation;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.api.ability.type.IAbilityGuard;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import noppes.npcs.util.ValueUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -77,9 +78,12 @@ public class AbilityGuard extends Ability implements IAbilityGuard {
|
||||
@Override
|
||||
public String toString() {
|
||||
switch (this) {
|
||||
case FLAT: return "ability.counter.flat";
|
||||
case PERCENT: return "ability.counter.percent";
|
||||
default: return name();
|
||||
case FLAT:
|
||||
return "ability.counter.flat";
|
||||
case PERCENT:
|
||||
return "ability.counter.percent";
|
||||
default:
|
||||
return name();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
package kamkeel.npcs.controllers.data.ability.type;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.entity.EntityAbilityZone;
|
||||
import kamkeel.npcs.entity.EntityAbilityZone.ZoneShape;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
|
||||
import noppes.npcs.api.ability.type.IAbilityHazard;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -106,20 +102,45 @@ public class AbilityHazard extends AbilityZone implements IAbilityHazard {
|
||||
this.affectsCaster = nbt.getBoolean("affectsCaster");
|
||||
}
|
||||
|
||||
public float getRadius() { return radius; }
|
||||
public void setRadius(float radius) { this.radius = radius; }
|
||||
public float getRadius() {
|
||||
return radius;
|
||||
}
|
||||
|
||||
public float getDamagePerSecond() { return damagePerSecond; }
|
||||
public void setDamagePerSecond(float damagePerSecond) { this.damagePerSecond = damagePerSecond; }
|
||||
public void setRadius(float radius) {
|
||||
this.radius = radius;
|
||||
}
|
||||
|
||||
public int getDamageInterval() { return damageInterval; }
|
||||
public void setDamageInterval(int damageInterval) { this.damageInterval = damageInterval; }
|
||||
public float getDamagePerSecond() {
|
||||
return damagePerSecond;
|
||||
}
|
||||
|
||||
public boolean isIgnoreInvulnFrames() { return ignoreInvulnFrames; }
|
||||
public void setIgnoreInvulnFrames(boolean ignoreInvulnFrames) { this.ignoreInvulnFrames = ignoreInvulnFrames; }
|
||||
public void setDamagePerSecond(float damagePerSecond) {
|
||||
this.damagePerSecond = damagePerSecond;
|
||||
}
|
||||
|
||||
public boolean isAffectsCaster() { return affectsCaster; }
|
||||
public void setAffectsCaster(boolean affectsCaster) { this.affectsCaster = affectsCaster; }
|
||||
public int getDamageInterval() {
|
||||
return damageInterval;
|
||||
}
|
||||
|
||||
public void setDamageInterval(int damageInterval) {
|
||||
this.damageInterval = damageInterval;
|
||||
}
|
||||
|
||||
public boolean isIgnoreInvulnFrames() {
|
||||
return ignoreInvulnFrames;
|
||||
}
|
||||
|
||||
public void setIgnoreInvulnFrames(boolean ignoreInvulnFrames) {
|
||||
this.ignoreInvulnFrames = ignoreInvulnFrames;
|
||||
}
|
||||
|
||||
public boolean isAffectsCaster() {
|
||||
return affectsCaster;
|
||||
}
|
||||
|
||||
public void setAffectsCaster(boolean affectsCaster) {
|
||||
this.affectsCaster = affectsCaster;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package kamkeel.npcs.controllers.data.ability.type;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
@@ -9,13 +11,9 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import noppes.npcs.api.ability.type.IAbilityHeal;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -5,13 +5,13 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import noppes.npcs.api.ability.type.IAbilityHeavyHit;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -5,18 +5,15 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.api.ability.type.IAbilityProjectile;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -94,7 +91,11 @@ public class AbilityProjectile extends Ability implements IAbilityProjectile {
|
||||
double dy = (target.posY + target.height / 2) - (caster.posY + caster.getEyeHeight());
|
||||
double dz = target.posZ - caster.posZ;
|
||||
double len = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
||||
if (len > 0) { dx /= len; dy /= len; dz /= len; }
|
||||
if (len > 0) {
|
||||
dx /= len;
|
||||
dy /= len;
|
||||
dz /= len;
|
||||
}
|
||||
|
||||
applyAbilityDamageWithDirection(caster, target, damage, knockback, dx, dz);
|
||||
world.playSoundAtEntity(caster, "random.bow", 1.0f, 0.8f);
|
||||
@@ -167,7 +168,7 @@ public class AbilityProjectile extends Ability implements IAbilityProjectile {
|
||||
* Apply explosion splash damage around a point.
|
||||
*/
|
||||
private void applyExplosionDamage(EntityLivingBase caster, EntityLivingBase primaryTarget, World world,
|
||||
double x, double y, double z) {
|
||||
double x, double y, double z) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Entity> entities = world.getEntitiesWithinAABBExcludingEntity(primaryTarget,
|
||||
primaryTarget.boundingBox.expand(explosionRadius, explosionRadius, explosionRadius));
|
||||
|
||||
@@ -5,16 +5,13 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import noppes.npcs.api.ability.type.IAbilityShockwave;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.Telegraph;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphInstance;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
@@ -13,13 +14,10 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.api.ability.type.IAbilitySlam;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.api.ability.type.IAbilitySlam;
|
||||
import somehussar.gui.annotationHandling.GuiEditable;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package kamkeel.npcs.controllers.data.ability.type;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.UserType;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -13,15 +16,8 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.api.ability.type.IAbilityTeleport;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -43,10 +39,14 @@ public class AbilityTeleport extends Ability implements IAbilityTeleport {
|
||||
@Override
|
||||
public String toString() {
|
||||
switch (this) {
|
||||
case BLINK: return "ability.teleport.blink";
|
||||
case BEHIND: return "ability.teleport.behind";
|
||||
case SINGLE: return "ability.teleport.single";
|
||||
default: return name();
|
||||
case BLINK:
|
||||
return "ability.teleport.blink";
|
||||
case BEHIND:
|
||||
return "ability.teleport.behind";
|
||||
case SINGLE:
|
||||
return "ability.teleport.single";
|
||||
default:
|
||||
return name();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package kamkeel.npcs.controllers.data.ability.type;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.AbilityPotionEffect;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
@@ -12,9 +14,6 @@ import noppes.npcs.client.gui.SubGuiTrapPresetSelector;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import noppes.npcs.constants.EnumPotionType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -115,51 +114,80 @@ public class AbilityTrap extends AbilityZone implements IAbilityTrap {
|
||||
switch (preset) {
|
||||
case "VENOM":
|
||||
groundAlpha = 0.04f;
|
||||
particles = true; particleDensity = 0.3f; particleScale = 0.5f;
|
||||
particleMotion = 1; particleDir = "mc:mobSpell";
|
||||
colorData.innerColor = 0x44DD44; colorData.outerColor = 0x116611;
|
||||
windUpColor = 0x6044DD44; activeColor = 0xC044FF44;
|
||||
particles = true;
|
||||
particleDensity = 0.3f;
|
||||
particleScale = 0.5f;
|
||||
particleMotion = 1;
|
||||
particleDir = "mc:mobSpell";
|
||||
colorData.innerColor = 0x44DD44;
|
||||
colorData.outerColor = 0x116611;
|
||||
windUpColor = 0x6044DD44;
|
||||
activeColor = 0xC044FF44;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.Poison, 100, 0));
|
||||
break;
|
||||
case "EXPLOSIVE":
|
||||
groundAlpha = 0.04f;
|
||||
particles = true; particleDensity = 0.3f; particleScale = 0.6f;
|
||||
particleMotion = 0; particleDir = "mc:smoke";
|
||||
colorData.innerColor = 0xFF6611; colorData.outerColor = 0xCC2200;
|
||||
windUpColor = 0x60FF6611; activeColor = 0xC0FF4400;
|
||||
particles = true;
|
||||
particleDensity = 0.3f;
|
||||
particleScale = 0.6f;
|
||||
particleMotion = 0;
|
||||
particleDir = "mc:smoke";
|
||||
colorData.innerColor = 0xFF6611;
|
||||
colorData.outerColor = 0xCC2200;
|
||||
windUpColor = 0x60FF6611;
|
||||
activeColor = 0xC0FF4400;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.Fire, 60, 0));
|
||||
break;
|
||||
case "CURSED":
|
||||
groundAlpha = 0.04f;
|
||||
particles = true; particleDensity = 0.3f; particleScale = 0.5f;
|
||||
particleMotion = 1; particleDir = "mc:portal";
|
||||
colorData.innerColor = 0xAA44FF; colorData.outerColor = 0x6622BB;
|
||||
windUpColor = 0x60AA44FF; activeColor = 0xC0CC66FF;
|
||||
particles = true;
|
||||
particleDensity = 0.3f;
|
||||
particleScale = 0.5f;
|
||||
particleMotion = 1;
|
||||
particleDir = "mc:portal";
|
||||
colorData.innerColor = 0xAA44FF;
|
||||
colorData.outerColor = 0x6622BB;
|
||||
windUpColor = 0x60AA44FF;
|
||||
activeColor = 0xC0CC66FF;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.Weakness, 100, 0));
|
||||
break;
|
||||
case "SHOCK":
|
||||
groundAlpha = 0.04f;
|
||||
particles = true; particleDensity = 0.3f; particleScale = 0.4f;
|
||||
particleMotion = 2; particleDir = "mc:enchantmenttable";
|
||||
colorData.innerColor = 0x4488FF; colorData.outerColor = 0x2244BB;
|
||||
windUpColor = 0x604488FF; activeColor = 0xC066AAFF;
|
||||
particles = true;
|
||||
particleDensity = 0.3f;
|
||||
particleScale = 0.4f;
|
||||
particleMotion = 2;
|
||||
particleDir = "mc:enchantmenttable";
|
||||
colorData.innerColor = 0x4488FF;
|
||||
colorData.outerColor = 0x2244BB;
|
||||
windUpColor = 0x604488FF;
|
||||
activeColor = 0xC066AAFF;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.MiningFatigue, 80, 1));
|
||||
break;
|
||||
case "SNARE":
|
||||
groundAlpha = 0.04f;
|
||||
particles = true; particleDensity = 0.3f; particleScale = 0.5f;
|
||||
particleMotion = 1; particleDir = "mc:snowshovel";
|
||||
colorData.innerColor = 0x88CCFF; colorData.outerColor = 0x4488CC;
|
||||
windUpColor = 0x6088CCFF; activeColor = 0xC0AADDFF;
|
||||
particles = true;
|
||||
particleDensity = 0.3f;
|
||||
particleScale = 0.5f;
|
||||
particleMotion = 1;
|
||||
particleDir = "mc:snowshovel";
|
||||
colorData.innerColor = 0x88CCFF;
|
||||
colorData.outerColor = 0x4488CC;
|
||||
windUpColor = 0x6088CCFF;
|
||||
activeColor = 0xC0AADDFF;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.Slowness, 100, 1));
|
||||
break;
|
||||
case "HIDDEN":
|
||||
default:
|
||||
groundAlpha = 0.03f;
|
||||
particles = false; particleDensity = 0.0f; particleScale = 1.0f;
|
||||
particles = false;
|
||||
particleDensity = 0.0f;
|
||||
particleScale = 1.0f;
|
||||
particleMotion = 0;
|
||||
colorData.innerColor = 0x888888; colorData.outerColor = 0x444444;
|
||||
windUpColor = 0x60888888; activeColor = 0xC0AAAAAA;
|
||||
colorData.innerColor = 0x888888;
|
||||
colorData.outerColor = 0x444444;
|
||||
windUpColor = 0x60888888;
|
||||
activeColor = 0xC0AAAAAA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -190,22 +218,69 @@ public class AbilityTrap extends AbilityZone implements IAbilityTrap {
|
||||
this.visible = nbt.getBoolean("visible");
|
||||
}
|
||||
|
||||
public float getTriggerRadius() { return triggerRadius; }
|
||||
public void setTriggerRadius(float triggerRadius) { this.triggerRadius = triggerRadius; }
|
||||
public int getArmTime() { return armTime; }
|
||||
public void setArmTime(int armTime) { this.armTime = armTime; }
|
||||
public int getMaxTriggers() { return maxTriggers; }
|
||||
public void setMaxTriggers(int maxTriggers) { this.maxTriggers = maxTriggers; }
|
||||
public int getTriggerCooldown() { return triggerCooldown; }
|
||||
public void setTriggerCooldown(int triggerCooldown) { this.triggerCooldown = triggerCooldown; }
|
||||
public float getDamage() { return damage; }
|
||||
public void setDamage(float damage) { this.damage = damage; }
|
||||
public float getDamageRadius() { return damageRadius; }
|
||||
public void setDamageRadius(float damageRadius) { this.damageRadius = damageRadius; }
|
||||
public float getKnockback() { return knockback; }
|
||||
public void setKnockback(float knockback) { this.knockback = knockback; }
|
||||
public boolean isVisible() { return visible; }
|
||||
public void setVisible(boolean visible) { this.visible = visible; }
|
||||
public float getTriggerRadius() {
|
||||
return triggerRadius;
|
||||
}
|
||||
|
||||
public void setTriggerRadius(float triggerRadius) {
|
||||
this.triggerRadius = triggerRadius;
|
||||
}
|
||||
|
||||
public int getArmTime() {
|
||||
return armTime;
|
||||
}
|
||||
|
||||
public void setArmTime(int armTime) {
|
||||
this.armTime = armTime;
|
||||
}
|
||||
|
||||
public int getMaxTriggers() {
|
||||
return maxTriggers;
|
||||
}
|
||||
|
||||
public void setMaxTriggers(int maxTriggers) {
|
||||
this.maxTriggers = maxTriggers;
|
||||
}
|
||||
|
||||
public int getTriggerCooldown() {
|
||||
return triggerCooldown;
|
||||
}
|
||||
|
||||
public void setTriggerCooldown(int triggerCooldown) {
|
||||
this.triggerCooldown = triggerCooldown;
|
||||
}
|
||||
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void setDamage(float damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
public float getDamageRadius() {
|
||||
return damageRadius;
|
||||
}
|
||||
|
||||
public void setDamageRadius(float damageRadius) {
|
||||
this.damageRadius = damageRadius;
|
||||
}
|
||||
|
||||
public float getKnockback() {
|
||||
return knockback;
|
||||
}
|
||||
|
||||
public void setKnockback(float knockback) {
|
||||
this.knockback = knockback;
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(boolean visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
package kamkeel.npcs.controllers.data.ability.type;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import noppes.npcs.api.ability.type.IAbilityVortex;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package kamkeel.npcs.controllers.data.ability.type;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.AbilityPotionEffect;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
@@ -14,15 +16,10 @@ import kamkeel.npcs.entity.EntityAbilityZone.ParticleMotion;
|
||||
import kamkeel.npcs.entity.EntityAbilityZone.ZoneShape;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.constants.EnumPotionType;
|
||||
import net.minecraft.util.DamageSource;
|
||||
|
||||
|
||||
import noppes.npcs.client.gui.SubGuiZonePresetSelector;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import noppes.npcs.constants.EnumPotionType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -213,57 +210,134 @@ public abstract class AbilityZone extends Ability {
|
||||
particleDir = "";
|
||||
switch (styleName) {
|
||||
case "TOXIC":
|
||||
groundFill = true; groundAlpha = 0.30f; rings = true; ringCount = 3;
|
||||
border = false; borderSpeed = 1.0f; accents = true; accentStyle = 1;
|
||||
lightning = false; particles = true; particleDensity = 1.5f; particleScale = 0.8f;
|
||||
particleMotion = 1; particleGlow = true; particleDir = "mc:mobSpell";
|
||||
colorData.innerColor = 0x44DD44; colorData.outerColor = 0x116611;
|
||||
windUpColor = 0x6044DD44; activeColor = 0xC044FF44;
|
||||
groundFill = true;
|
||||
groundAlpha = 0.30f;
|
||||
rings = true;
|
||||
ringCount = 3;
|
||||
border = false;
|
||||
borderSpeed = 1.0f;
|
||||
accents = true;
|
||||
accentStyle = 1;
|
||||
lightning = false;
|
||||
particles = true;
|
||||
particleDensity = 1.5f;
|
||||
particleScale = 0.8f;
|
||||
particleMotion = 1;
|
||||
particleGlow = true;
|
||||
particleDir = "mc:mobSpell";
|
||||
colorData.innerColor = 0x44DD44;
|
||||
colorData.outerColor = 0x116611;
|
||||
windUpColor = 0x6044DD44;
|
||||
activeColor = 0xC044FF44;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.Poison, 100, 0));
|
||||
break;
|
||||
case "INFERNO":
|
||||
groundFill = true; groundAlpha = 0.35f; rings = true; ringCount = 3;
|
||||
border = true; borderSpeed = 2.0f; accents = true; accentStyle = 2;
|
||||
lightning = false; particles = true; particleDensity = 2.0f; particleScale = 1.2f;
|
||||
particleMotion = 0; particleGlow = true; particleDir = "mc:flame";
|
||||
colorData.innerColor = 0xFF6611; colorData.outerColor = 0xCC2200;
|
||||
windUpColor = 0x60FF6611; activeColor = 0xC0FF4400;
|
||||
groundFill = true;
|
||||
groundAlpha = 0.35f;
|
||||
rings = true;
|
||||
ringCount = 3;
|
||||
border = true;
|
||||
borderSpeed = 2.0f;
|
||||
accents = true;
|
||||
accentStyle = 2;
|
||||
lightning = false;
|
||||
particles = true;
|
||||
particleDensity = 2.0f;
|
||||
particleScale = 1.2f;
|
||||
particleMotion = 0;
|
||||
particleGlow = true;
|
||||
particleDir = "mc:flame";
|
||||
colorData.innerColor = 0xFF6611;
|
||||
colorData.outerColor = 0xCC2200;
|
||||
windUpColor = 0x60FF6611;
|
||||
activeColor = 0xC0FF4400;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.Fire, 60, 0));
|
||||
break;
|
||||
case "ARCANE":
|
||||
groundFill = true; groundAlpha = 0.20f; rings = true; ringCount = 1;
|
||||
border = true; borderSpeed = 0.8f; accents = true; accentStyle = 0;
|
||||
lightning = false; particles = true; particleDensity = 1.0f; particleScale = 1.0f;
|
||||
particleMotion = 1; particleGlow = true; particleDir = "mc:portal";
|
||||
colorData.innerColor = 0xAA44FF; colorData.outerColor = 0x6622BB;
|
||||
windUpColor = 0x60AA44FF; activeColor = 0xC0CC66FF;
|
||||
groundFill = true;
|
||||
groundAlpha = 0.20f;
|
||||
rings = true;
|
||||
ringCount = 1;
|
||||
border = true;
|
||||
borderSpeed = 0.8f;
|
||||
accents = true;
|
||||
accentStyle = 0;
|
||||
lightning = false;
|
||||
particles = true;
|
||||
particleDensity = 1.0f;
|
||||
particleScale = 1.0f;
|
||||
particleMotion = 1;
|
||||
particleGlow = true;
|
||||
particleDir = "mc:portal";
|
||||
colorData.innerColor = 0xAA44FF;
|
||||
colorData.outerColor = 0x6622BB;
|
||||
windUpColor = 0x60AA44FF;
|
||||
activeColor = 0xC0CC66FF;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.Weakness, 100, 0));
|
||||
break;
|
||||
case "ELECTRIC":
|
||||
groundFill = true; groundAlpha = 0.15f; rings = false; ringCount = 1;
|
||||
border = false; borderSpeed = 1.0f; accents = false; accentStyle = 0;
|
||||
lightning = true; particles = true; particleDensity = 0.8f; particleScale = 0.6f;
|
||||
particleMotion = 2; particleGlow = true; particleDir = "mc:enchantmenttable";
|
||||
colorData.innerColor = 0x4488FF; colorData.outerColor = 0x2244BB;
|
||||
windUpColor = 0x604488FF; activeColor = 0xC066AAFF;
|
||||
groundFill = true;
|
||||
groundAlpha = 0.15f;
|
||||
rings = false;
|
||||
ringCount = 1;
|
||||
border = false;
|
||||
borderSpeed = 1.0f;
|
||||
accents = false;
|
||||
accentStyle = 0;
|
||||
lightning = true;
|
||||
particles = true;
|
||||
particleDensity = 0.8f;
|
||||
particleScale = 0.6f;
|
||||
particleMotion = 2;
|
||||
particleGlow = true;
|
||||
particleDir = "mc:enchantmenttable";
|
||||
colorData.innerColor = 0x4488FF;
|
||||
colorData.outerColor = 0x2244BB;
|
||||
windUpColor = 0x604488FF;
|
||||
activeColor = 0xC066AAFF;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.MiningFatigue, 80, 1));
|
||||
break;
|
||||
case "FROST":
|
||||
groundFill = true; groundAlpha = 0.25f; rings = true; ringCount = 3;
|
||||
border = true; borderSpeed = 0.3f; accents = true; accentStyle = 0;
|
||||
lightning = false; particles = true; particleDensity = 1.5f; particleScale = 1.0f;
|
||||
particleMotion = 1; particleGlow = true; particleDir = "mc:snowshovel";
|
||||
colorData.innerColor = 0x88CCFF; colorData.outerColor = 0x4488CC;
|
||||
windUpColor = 0x6088CCFF; activeColor = 0xC0AADDFF;
|
||||
groundFill = true;
|
||||
groundAlpha = 0.25f;
|
||||
rings = true;
|
||||
ringCount = 3;
|
||||
border = true;
|
||||
borderSpeed = 0.3f;
|
||||
accents = true;
|
||||
accentStyle = 0;
|
||||
lightning = false;
|
||||
particles = true;
|
||||
particleDensity = 1.5f;
|
||||
particleScale = 1.0f;
|
||||
particleMotion = 1;
|
||||
particleGlow = true;
|
||||
particleDir = "mc:snowshovel";
|
||||
colorData.innerColor = 0x88CCFF;
|
||||
colorData.outerColor = 0x4488CC;
|
||||
windUpColor = 0x6088CCFF;
|
||||
activeColor = 0xC0AADDFF;
|
||||
effects.add(new AbilityPotionEffect(EnumPotionType.Slowness, 100, 1));
|
||||
break;
|
||||
case "DEFAULT":
|
||||
groundFill = true; groundAlpha = 0.25f; rings = true; ringCount = 3;
|
||||
border = true; borderSpeed = 1.0f; accents = true; accentStyle = 0;
|
||||
lightning = false; particles = false; particleDensity = 1.0f; particleScale = 1.0f;
|
||||
particleMotion = 0; particleGlow = true;
|
||||
colorData.innerColor = 0xCCCCCC; colorData.outerColor = 0x666666;
|
||||
windUpColor = 0x60CCCCCC; activeColor = 0xC0FFFFFF;
|
||||
groundFill = true;
|
||||
groundAlpha = 0.25f;
|
||||
rings = true;
|
||||
ringCount = 3;
|
||||
border = true;
|
||||
borderSpeed = 1.0f;
|
||||
accents = true;
|
||||
accentStyle = 0;
|
||||
lightning = false;
|
||||
particles = false;
|
||||
particleDensity = 1.0f;
|
||||
particleScale = 1.0f;
|
||||
particleMotion = 0;
|
||||
particleGlow = true;
|
||||
colorData.innerColor = 0xCCCCCC;
|
||||
colorData.outerColor = 0x666666;
|
||||
windUpColor = 0x60CCCCCC;
|
||||
activeColor = 0xC0FFFFFF;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -310,8 +384,11 @@ public abstract class AbilityZone extends Ability {
|
||||
|
||||
protected void readZoneNBT(NBTTagCompound nbt, int defaultDuration) {
|
||||
this.durationTicks = nbt.getInteger("durationTicks");
|
||||
try { this.zoneShape = ZoneShape.valueOf(nbt.getString("zoneShape")); }
|
||||
catch (Exception e) { this.zoneShape = ZoneShape.CIRCLE; }
|
||||
try {
|
||||
this.zoneShape = ZoneShape.valueOf(nbt.getString("zoneShape"));
|
||||
} catch (Exception e) {
|
||||
this.zoneShape = ZoneShape.CIRCLE;
|
||||
}
|
||||
this.spawnRadius = nbt.getFloat("spawnRadius");
|
||||
this.zoneCount = nbt.getInteger("zoneCount");
|
||||
this.zoneHeight = nbt.getFloat("zoneHeight");
|
||||
@@ -337,73 +414,238 @@ public abstract class AbilityZone extends Ability {
|
||||
this.particleGlow = nbt.getBoolean("particleGlow");
|
||||
}
|
||||
|
||||
public int getDurationTicks() { return durationTicks; }
|
||||
public void setDurationTicks(int durationTicks) { this.durationTicks = Math.max(1, durationTicks); }
|
||||
public int getDurationTicks() {
|
||||
return durationTicks;
|
||||
}
|
||||
|
||||
public ZoneShape getZoneShapeEnum() { return zoneShape; }
|
||||
public void setZoneShapeEnum(ZoneShape shape) { this.zoneShape = shape; }
|
||||
public void setDurationTicks(int durationTicks) {
|
||||
this.durationTicks = Math.max(1, durationTicks);
|
||||
}
|
||||
|
||||
public ZoneShape getZoneShapeEnum() {
|
||||
return zoneShape;
|
||||
}
|
||||
|
||||
public void setZoneShapeEnum(ZoneShape shape) {
|
||||
this.zoneShape = shape;
|
||||
}
|
||||
|
||||
public int getZoneShapeOrdinal() {
|
||||
return zoneShape.ordinal();
|
||||
}
|
||||
|
||||
public int getZoneShapeOrdinal() { return zoneShape.ordinal(); }
|
||||
public void setZoneShapeOrdinal(int shape) {
|
||||
ZoneShape[] values = ZoneShape.values();
|
||||
this.zoneShape = shape >= 0 && shape < values.length ? values[shape] : ZoneShape.CIRCLE;
|
||||
}
|
||||
|
||||
public float getSpawnRadius() { return spawnRadius; }
|
||||
public void setSpawnRadius(float spawnRadius) { this.spawnRadius = Math.max(0, spawnRadius); }
|
||||
public int getZoneCount() { return zoneCount; }
|
||||
public void setZoneCount(int zoneCount) { this.zoneCount = Math.max(1, zoneCount); }
|
||||
public float getZoneHeight() { return zoneHeight; }
|
||||
public void setZoneHeight(float zoneHeight) { this.zoneHeight = Math.max(0.5f, zoneHeight); }
|
||||
public float getSpawnRadius() {
|
||||
return spawnRadius;
|
||||
}
|
||||
|
||||
public float getParticleDensity() { return particleDensity; }
|
||||
public void setParticleDensity(float v) { this.particleDensity = Math.max(0, Math.min(5, v)); }
|
||||
public float getParticleScale() { return particleScale; }
|
||||
public void setParticleScale(float v) { this.particleScale = Math.max(0.1f, Math.min(5, v)); }
|
||||
public float getAnimSpeed() { return animSpeed; }
|
||||
public void setAnimSpeed(float v) { this.animSpeed = Math.max(0.1f, Math.min(5, v)); }
|
||||
public float getLightningDensity() { return lightningDensity; }
|
||||
public void setLightningDensity(float v) { this.lightningDensity = Math.max(0, Math.min(3, v)); }
|
||||
public void setSpawnRadius(float spawnRadius) {
|
||||
this.spawnRadius = Math.max(0, spawnRadius);
|
||||
}
|
||||
|
||||
public int getInnerColor() { return colorData.innerColor; }
|
||||
public void setInnerColor(int color) { colorData.innerColor = color; }
|
||||
public int getOuterColor() { return colorData.outerColor; }
|
||||
public void setOuterColor(int color) { colorData.outerColor = color; }
|
||||
public boolean isOuterColorEnabled() { return colorData.outerColorEnabled; }
|
||||
public void setOuterColorEnabled(boolean enabled) { colorData.outerColorEnabled = enabled; }
|
||||
public int getZoneCount() {
|
||||
return zoneCount;
|
||||
}
|
||||
|
||||
public boolean isGroundFill() { return groundFill; }
|
||||
public void setGroundFill(boolean v) { this.groundFill = v; }
|
||||
public float getGroundAlpha() { return groundAlpha; }
|
||||
public void setGroundAlpha(float v) { this.groundAlpha = Math.max(0, Math.min(1, v)); }
|
||||
public boolean isRings() { return rings; }
|
||||
public void setRings(boolean v) { this.rings = v; }
|
||||
public int getRingCount() { return ringCount; }
|
||||
public void setRingCount(int v) { this.ringCount = Math.max(1, Math.min(5, v)); }
|
||||
public boolean isBorder() { return border; }
|
||||
public void setBorder(boolean v) { this.border = v; }
|
||||
public float getBorderSpeed() { return borderSpeed; }
|
||||
public void setBorderSpeed(float v) { this.borderSpeed = Math.max(0.1f, Math.min(5, v)); }
|
||||
public boolean isAccents() { return accents; }
|
||||
public void setAccents(boolean v) { this.accents = v; }
|
||||
public int getAccentStyle() { return accentStyle; }
|
||||
public void setAccentStyle(int v) { this.accentStyle = Math.max(0, Math.min(AccentStyle.values().length - 1, v)); }
|
||||
public AccentStyle getAccentStyleEnum() { return AccentStyle.values()[Math.max(0, Math.min(accentStyle, AccentStyle.values().length - 1))]; }
|
||||
public void setAccentStyleEnum(AccentStyle s) { this.accentStyle = s.ordinal(); }
|
||||
public boolean isLightning() { return lightning; }
|
||||
public void setLightning(boolean v) { this.lightning = v; }
|
||||
public boolean isParticles() { return particles; }
|
||||
public void setParticles(boolean v) { this.particles = v; }
|
||||
public int getParticleMotion() { return particleMotion; }
|
||||
public void setParticleMotion(int v) { this.particleMotion = Math.max(0, Math.min(ParticleMotion.values().length - 1, v)); }
|
||||
public ParticleMotion getParticleMotionEnum() { return ParticleMotion.values()[Math.max(0, Math.min(particleMotion, ParticleMotion.values().length - 1))]; }
|
||||
public void setParticleMotionEnum(ParticleMotion m) { this.particleMotion = m.ordinal(); }
|
||||
public String getParticleDir() { return particleDir; }
|
||||
public void setParticleDir(String v) { this.particleDir = v != null ? v : ""; }
|
||||
public int getParticleSize() { return particleSize; }
|
||||
public void setParticleSize(int v) { this.particleSize = Math.max(1, Math.min(256, v)); }
|
||||
public boolean isParticleGlow() { return particleGlow; }
|
||||
public void setParticleGlow(boolean v) { this.particleGlow = v; }
|
||||
public void setZoneCount(int zoneCount) {
|
||||
this.zoneCount = Math.max(1, zoneCount);
|
||||
}
|
||||
|
||||
public float getZoneHeight() {
|
||||
return zoneHeight;
|
||||
}
|
||||
|
||||
public void setZoneHeight(float zoneHeight) {
|
||||
this.zoneHeight = Math.max(0.5f, zoneHeight);
|
||||
}
|
||||
|
||||
public float getParticleDensity() {
|
||||
return particleDensity;
|
||||
}
|
||||
|
||||
public void setParticleDensity(float v) {
|
||||
this.particleDensity = Math.max(0, Math.min(5, v));
|
||||
}
|
||||
|
||||
public float getParticleScale() {
|
||||
return particleScale;
|
||||
}
|
||||
|
||||
public void setParticleScale(float v) {
|
||||
this.particleScale = Math.max(0.1f, Math.min(5, v));
|
||||
}
|
||||
|
||||
public float getAnimSpeed() {
|
||||
return animSpeed;
|
||||
}
|
||||
|
||||
public void setAnimSpeed(float v) {
|
||||
this.animSpeed = Math.max(0.1f, Math.min(5, v));
|
||||
}
|
||||
|
||||
public float getLightningDensity() {
|
||||
return lightningDensity;
|
||||
}
|
||||
|
||||
public void setLightningDensity(float v) {
|
||||
this.lightningDensity = Math.max(0, Math.min(3, v));
|
||||
}
|
||||
|
||||
public int getInnerColor() {
|
||||
return colorData.innerColor;
|
||||
}
|
||||
|
||||
public void setInnerColor(int color) {
|
||||
colorData.innerColor = color;
|
||||
}
|
||||
|
||||
public int getOuterColor() {
|
||||
return colorData.outerColor;
|
||||
}
|
||||
|
||||
public void setOuterColor(int color) {
|
||||
colorData.outerColor = color;
|
||||
}
|
||||
|
||||
public boolean isOuterColorEnabled() {
|
||||
return colorData.outerColorEnabled;
|
||||
}
|
||||
|
||||
public void setOuterColorEnabled(boolean enabled) {
|
||||
colorData.outerColorEnabled = enabled;
|
||||
}
|
||||
|
||||
public boolean isGroundFill() {
|
||||
return groundFill;
|
||||
}
|
||||
|
||||
public void setGroundFill(boolean v) {
|
||||
this.groundFill = v;
|
||||
}
|
||||
|
||||
public float getGroundAlpha() {
|
||||
return groundAlpha;
|
||||
}
|
||||
|
||||
public void setGroundAlpha(float v) {
|
||||
this.groundAlpha = Math.max(0, Math.min(1, v));
|
||||
}
|
||||
|
||||
public boolean isRings() {
|
||||
return rings;
|
||||
}
|
||||
|
||||
public void setRings(boolean v) {
|
||||
this.rings = v;
|
||||
}
|
||||
|
||||
public int getRingCount() {
|
||||
return ringCount;
|
||||
}
|
||||
|
||||
public void setRingCount(int v) {
|
||||
this.ringCount = Math.max(1, Math.min(5, v));
|
||||
}
|
||||
|
||||
public boolean isBorder() {
|
||||
return border;
|
||||
}
|
||||
|
||||
public void setBorder(boolean v) {
|
||||
this.border = v;
|
||||
}
|
||||
|
||||
public float getBorderSpeed() {
|
||||
return borderSpeed;
|
||||
}
|
||||
|
||||
public void setBorderSpeed(float v) {
|
||||
this.borderSpeed = Math.max(0.1f, Math.min(5, v));
|
||||
}
|
||||
|
||||
public boolean isAccents() {
|
||||
return accents;
|
||||
}
|
||||
|
||||
public void setAccents(boolean v) {
|
||||
this.accents = v;
|
||||
}
|
||||
|
||||
public int getAccentStyle() {
|
||||
return accentStyle;
|
||||
}
|
||||
|
||||
public void setAccentStyle(int v) {
|
||||
this.accentStyle = Math.max(0, Math.min(AccentStyle.values().length - 1, v));
|
||||
}
|
||||
|
||||
public AccentStyle getAccentStyleEnum() {
|
||||
return AccentStyle.values()[Math.max(0, Math.min(accentStyle, AccentStyle.values().length - 1))];
|
||||
}
|
||||
|
||||
public void setAccentStyleEnum(AccentStyle s) {
|
||||
this.accentStyle = s.ordinal();
|
||||
}
|
||||
|
||||
public boolean isLightning() {
|
||||
return lightning;
|
||||
}
|
||||
|
||||
public void setLightning(boolean v) {
|
||||
this.lightning = v;
|
||||
}
|
||||
|
||||
public boolean isParticles() {
|
||||
return particles;
|
||||
}
|
||||
|
||||
public void setParticles(boolean v) {
|
||||
this.particles = v;
|
||||
}
|
||||
|
||||
public int getParticleMotion() {
|
||||
return particleMotion;
|
||||
}
|
||||
|
||||
public void setParticleMotion(int v) {
|
||||
this.particleMotion = Math.max(0, Math.min(ParticleMotion.values().length - 1, v));
|
||||
}
|
||||
|
||||
public ParticleMotion getParticleMotionEnum() {
|
||||
return ParticleMotion.values()[Math.max(0, Math.min(particleMotion, ParticleMotion.values().length - 1))];
|
||||
}
|
||||
|
||||
public void setParticleMotionEnum(ParticleMotion m) {
|
||||
this.particleMotion = m.ordinal();
|
||||
}
|
||||
|
||||
public String getParticleDir() {
|
||||
return particleDir;
|
||||
}
|
||||
|
||||
public void setParticleDir(String v) {
|
||||
this.particleDir = v != null ? v : "";
|
||||
}
|
||||
|
||||
public int getParticleSize() {
|
||||
return particleSize;
|
||||
}
|
||||
|
||||
public void setParticleSize(int v) {
|
||||
this.particleSize = Math.max(1, Math.min(256, v));
|
||||
}
|
||||
|
||||
public boolean isParticleGlow() {
|
||||
return particleGlow;
|
||||
}
|
||||
|
||||
public void setParticleGlow(boolean v) {
|
||||
this.particleGlow = v;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected void addPresetFieldDef(List<FieldDef> defs) {
|
||||
|
||||
@@ -6,7 +6,11 @@ import kamkeel.npcs.controllers.data.ability.AbilityVariant;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.RotationMode;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.data.*;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyCombatData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyHomingData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyLifespanData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.ProjectileData;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityAbilityBeam;
|
||||
@@ -56,7 +60,7 @@ public class AbilityBeam extends AbilityEnergyProjectile<EntityAbilityBeam> impl
|
||||
|
||||
@Override
|
||||
protected EntityAbilityBeam createEntity(EntityLivingBase caster, EntityLivingBase target,
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
return new EntityAbilityBeam(
|
||||
caster.worldObj, caster, target,
|
||||
spawnPos.xCoord, spawnPos.yCoord, spawnPos.zCoord,
|
||||
@@ -81,7 +85,7 @@ public class AbilityBeam extends AbilityEnergyProjectile<EntityAbilityBeam> impl
|
||||
|
||||
@Override
|
||||
protected void setupEntityPreview(EntityAbilityBeam beam, EntityLivingBase caster,
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
beam.setupPreview(caster, beamWidth, headSize, resolved, lightningData, projData.anchor, windUpTicks, 1.0f);
|
||||
}
|
||||
|
||||
@@ -139,14 +143,29 @@ public class AbilityBeam extends AbilityEnergyProjectile<EntityAbilityBeam> impl
|
||||
|
||||
// ==================== TYPE-SPECIFIC GETTERS ====================
|
||||
|
||||
public float getSpeed() { return homingData.speed; }
|
||||
public void setSpeed(float speed) { homingData.speed = speed; }
|
||||
public float getSpeed() {
|
||||
return homingData.speed;
|
||||
}
|
||||
|
||||
public float getBeamWidth() { return beamWidth; }
|
||||
public void setBeamWidth(float beamWidth) { this.beamWidth = beamWidth; }
|
||||
public void setSpeed(float speed) {
|
||||
homingData.speed = speed;
|
||||
}
|
||||
|
||||
public float getHeadSize() { return headSize; }
|
||||
public void setHeadSize(float headSize) { this.headSize = headSize; }
|
||||
public float getBeamWidth() {
|
||||
return beamWidth;
|
||||
}
|
||||
|
||||
public void setBeamWidth(float beamWidth) {
|
||||
this.beamWidth = beamWidth;
|
||||
}
|
||||
|
||||
public float getHeadSize() {
|
||||
return headSize;
|
||||
}
|
||||
|
||||
public void setHeadSize(float headSize) {
|
||||
this.headSize = headSize;
|
||||
}
|
||||
|
||||
// ==================== TYPE-SPECIFIC GUI ====================
|
||||
|
||||
|
||||
@@ -5,7 +5,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.AbilityVariant;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.data.*;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyCombatData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyHomingData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyLifespanData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.ProjectileData;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityAbilityDisc;
|
||||
@@ -56,7 +60,7 @@ public class AbilityDisc extends AbilityEnergyProjectile<EntityAbilityDisc> impl
|
||||
|
||||
@Override
|
||||
protected EntityAbilityDisc createEntity(EntityLivingBase caster, EntityLivingBase target,
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
return new EntityAbilityDisc(
|
||||
caster.worldObj, caster, target,
|
||||
spawnPos.xCoord, spawnPos.yCoord, spawnPos.zCoord,
|
||||
@@ -81,7 +85,7 @@ public class AbilityDisc extends AbilityEnergyProjectile<EntityAbilityDisc> impl
|
||||
|
||||
@Override
|
||||
protected void setupEntityPreview(EntityAbilityDisc disc, EntityLivingBase caster,
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
disc.setupPreview(caster, discRadius, discThickness, resolved, lightningData, projData.anchor, windUpTicks, vertical);
|
||||
}
|
||||
|
||||
@@ -139,23 +143,53 @@ public class AbilityDisc extends AbilityEnergyProjectile<EntityAbilityDisc> impl
|
||||
|
||||
// ==================== TYPE-SPECIFIC GETTERS ====================
|
||||
|
||||
public float getSpeed() { return homingData.speed; }
|
||||
public void setSpeed(float speed) { homingData.speed = speed; }
|
||||
public float getSpeed() {
|
||||
return homingData.speed;
|
||||
}
|
||||
|
||||
public float getDiscRadius() { return discRadius; }
|
||||
public void setDiscRadius(float discRadius) { this.discRadius = discRadius; }
|
||||
public void setSpeed(float speed) {
|
||||
homingData.speed = speed;
|
||||
}
|
||||
|
||||
public float getDiscThickness() { return discThickness; }
|
||||
public void setDiscThickness(float discThickness) { this.discThickness = discThickness; }
|
||||
public float getDiscRadius() {
|
||||
return discRadius;
|
||||
}
|
||||
|
||||
public boolean isVertical() { return vertical; }
|
||||
public void setVertical(boolean vertical) { this.vertical = vertical; }
|
||||
public void setDiscRadius(float discRadius) {
|
||||
this.discRadius = discRadius;
|
||||
}
|
||||
|
||||
public boolean isBoomerang() { return boomerang; }
|
||||
public void setBoomerang(boolean boomerang) { this.boomerang = boomerang; }
|
||||
public float getDiscThickness() {
|
||||
return discThickness;
|
||||
}
|
||||
|
||||
public int getBoomerangDelay() { return boomerangDelay; }
|
||||
public void setBoomerangDelay(int boomerangDelay) { this.boomerangDelay = boomerangDelay; }
|
||||
public void setDiscThickness(float discThickness) {
|
||||
this.discThickness = discThickness;
|
||||
}
|
||||
|
||||
public boolean isVertical() {
|
||||
return vertical;
|
||||
}
|
||||
|
||||
public void setVertical(boolean vertical) {
|
||||
this.vertical = vertical;
|
||||
}
|
||||
|
||||
public boolean isBoomerang() {
|
||||
return boomerang;
|
||||
}
|
||||
|
||||
public void setBoomerang(boolean boomerang) {
|
||||
this.boomerang = boomerang;
|
||||
}
|
||||
|
||||
public int getBoomerangDelay() {
|
||||
return boomerangDelay;
|
||||
}
|
||||
|
||||
public void setBoomerangDelay(int boomerangDelay) {
|
||||
this.boomerangDelay = boomerangDelay;
|
||||
}
|
||||
|
||||
// ==================== TYPE-SPECIFIC GUI ====================
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyDome;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -111,11 +110,21 @@ public class AbilityDome extends AbilityEnergyBarrier {
|
||||
|
||||
// ==================== GETTERS & SETTERS ====================
|
||||
|
||||
public float getDomeRadius() { return domeRadius; }
|
||||
public void setDomeRadius(float radius) { this.domeRadius = Math.max(1.0f, radius); }
|
||||
public float getDomeRadius() {
|
||||
return domeRadius;
|
||||
}
|
||||
|
||||
public boolean isFollowCaster() { return followCaster; }
|
||||
public void setFollowCaster(boolean follow) { this.followCaster = follow; }
|
||||
public void setDomeRadius(float radius) {
|
||||
this.domeRadius = Math.max(1.0f, radius);
|
||||
}
|
||||
|
||||
public boolean isFollowCaster() {
|
||||
return followCaster;
|
||||
}
|
||||
|
||||
public void setFollowCaster(boolean follow) {
|
||||
this.followCaster = follow;
|
||||
}
|
||||
|
||||
// ==================== TYPE-SPECIFIC GUI ====================
|
||||
|
||||
|
||||
+77
-22
@@ -26,40 +26,95 @@ public abstract class AbilityEnergy extends Ability {
|
||||
|
||||
// ==================== DISPLAY DATA ====================
|
||||
|
||||
public int getInnerColor() { return displayData.innerColor; }
|
||||
public void setInnerColor(int color) { displayData.innerColor = color; }
|
||||
public int getInnerColor() {
|
||||
return displayData.innerColor;
|
||||
}
|
||||
|
||||
public float getInnerAlpha() { return displayData.innerAlpha; }
|
||||
public void setInnerAlpha(float alpha) { displayData.innerAlpha = alpha; }
|
||||
public void setInnerColor(int color) {
|
||||
displayData.innerColor = color;
|
||||
}
|
||||
|
||||
public int getOuterColor() { return displayData.outerColor; }
|
||||
public void setOuterColor(int color) { displayData.outerColor = color; }
|
||||
public float getInnerAlpha() {
|
||||
return displayData.innerAlpha;
|
||||
}
|
||||
|
||||
public boolean isOuterColorEnabled() { return displayData.outerColorEnabled; }
|
||||
public void setOuterColorEnabled(boolean enabled) { displayData.outerColorEnabled = enabled; }
|
||||
public void setInnerAlpha(float alpha) {
|
||||
displayData.innerAlpha = alpha;
|
||||
}
|
||||
|
||||
public float getOuterColorWidth() { return displayData.outerColorWidth; }
|
||||
public void setOuterColorWidth(float width) { displayData.outerColorWidth = width; }
|
||||
public int getOuterColor() {
|
||||
return displayData.outerColor;
|
||||
}
|
||||
|
||||
public float getOuterColorAlpha() { return displayData.outerColorAlpha; }
|
||||
public void setOuterColorAlpha(float alpha) { displayData.outerColorAlpha = alpha; }
|
||||
public void setOuterColor(int color) {
|
||||
displayData.outerColor = color;
|
||||
}
|
||||
|
||||
public float getRotationSpeed() { return displayData.rotationSpeed; }
|
||||
public void setRotationSpeed(float speed) { displayData.rotationSpeed = speed; }
|
||||
public boolean isOuterColorEnabled() {
|
||||
return displayData.outerColorEnabled;
|
||||
}
|
||||
|
||||
public void setOuterColorEnabled(boolean enabled) {
|
||||
displayData.outerColorEnabled = enabled;
|
||||
}
|
||||
|
||||
public float getOuterColorWidth() {
|
||||
return displayData.outerColorWidth;
|
||||
}
|
||||
|
||||
public void setOuterColorWidth(float width) {
|
||||
displayData.outerColorWidth = width;
|
||||
}
|
||||
|
||||
public float getOuterColorAlpha() {
|
||||
return displayData.outerColorAlpha;
|
||||
}
|
||||
|
||||
public void setOuterColorAlpha(float alpha) {
|
||||
displayData.outerColorAlpha = alpha;
|
||||
}
|
||||
|
||||
public float getRotationSpeed() {
|
||||
return displayData.rotationSpeed;
|
||||
}
|
||||
|
||||
public void setRotationSpeed(float speed) {
|
||||
displayData.rotationSpeed = speed;
|
||||
}
|
||||
|
||||
// ==================== LIGHTNING DATA ====================
|
||||
|
||||
public boolean hasLightningEffect() { return lightningData.lightningEffect; }
|
||||
public void setLightningEffect(boolean enabled) { lightningData.lightningEffect = enabled; }
|
||||
public boolean hasLightningEffect() {
|
||||
return lightningData.lightningEffect;
|
||||
}
|
||||
|
||||
public float getLightningDensity() { return lightningData.lightningDensity; }
|
||||
public void setLightningDensity(float density) { lightningData.lightningDensity = density; }
|
||||
public void setLightningEffect(boolean enabled) {
|
||||
lightningData.lightningEffect = enabled;
|
||||
}
|
||||
|
||||
public float getLightningRadius() { return lightningData.lightningRadius; }
|
||||
public void setLightningRadius(float radius) { lightningData.lightningRadius = radius; }
|
||||
public float getLightningDensity() {
|
||||
return lightningData.lightningDensity;
|
||||
}
|
||||
|
||||
public int getLightningFadeTime() { return lightningData.lightningFadeTime; }
|
||||
public void setLightningFadeTime(int fadeTime) { lightningData.lightningFadeTime = fadeTime; }
|
||||
public void setLightningDensity(float density) {
|
||||
lightningData.lightningDensity = density;
|
||||
}
|
||||
|
||||
public float getLightningRadius() {
|
||||
return lightningData.lightningRadius;
|
||||
}
|
||||
|
||||
public void setLightningRadius(float radius) {
|
||||
lightningData.lightningRadius = radius;
|
||||
}
|
||||
|
||||
public int getLightningFadeTime() {
|
||||
return lightningData.lightningFadeTime;
|
||||
}
|
||||
|
||||
public void setLightningFadeTime(int fadeTime) {
|
||||
lightningData.lightningFadeTime = fadeTime;
|
||||
}
|
||||
|
||||
// ==================== NBT HELPERS ====================
|
||||
|
||||
|
||||
+81
-23
@@ -142,37 +142,95 @@ public abstract class AbilityEnergyBarrier extends AbilityEnergy {
|
||||
// Display and lightning data inherited from AbilityEnergy
|
||||
|
||||
// Barrier data
|
||||
public float getBarrierMaxHealth() { return barrierData.maxHealth; }
|
||||
public void setBarrierMaxHealth(float maxHealth) { barrierData.setMaxHealth(maxHealth); }
|
||||
public float getBarrierMaxHealth() {
|
||||
return barrierData.maxHealth;
|
||||
}
|
||||
|
||||
public boolean isUseHealth() { return barrierData.useHealth; }
|
||||
public void setUseHealth(boolean useHealth) { barrierData.useHealth = useHealth; }
|
||||
public void setBarrierMaxHealth(float maxHealth) {
|
||||
barrierData.setMaxHealth(maxHealth);
|
||||
}
|
||||
|
||||
public int getBarrierDuration() { return barrierData.durationTicks; }
|
||||
public void setBarrierDuration(int ticks) { barrierData.setDurationTicks(ticks); }
|
||||
public boolean isUseHealth() {
|
||||
return barrierData.useHealth;
|
||||
}
|
||||
|
||||
public boolean isUseDuration() { return barrierData.useDuration; }
|
||||
public void setUseDuration(boolean useDuration) { barrierData.useDuration = useDuration; }
|
||||
public void setUseHealth(boolean useHealth) {
|
||||
barrierData.useHealth = useHealth;
|
||||
}
|
||||
|
||||
public float getDefaultMultiplier() { return barrierData.defaultMultiplier; }
|
||||
public void setDefaultMultiplier(float mult) { barrierData.defaultMultiplier = mult; }
|
||||
public int getBarrierDuration() {
|
||||
return barrierData.durationTicks;
|
||||
}
|
||||
|
||||
public void setDamageMultiplier(String typeId, float mult) { barrierData.setMultiplier(typeId, mult); }
|
||||
public float getDamageMultiplier(String typeId) { return barrierData.getMultiplier(typeId); }
|
||||
public void setBarrierDuration(int ticks) {
|
||||
barrierData.setDurationTicks(ticks);
|
||||
}
|
||||
|
||||
public boolean isUseDuration() {
|
||||
return barrierData.useDuration;
|
||||
}
|
||||
|
||||
public void setUseDuration(boolean useDuration) {
|
||||
barrierData.useDuration = useDuration;
|
||||
}
|
||||
|
||||
public float getDefaultMultiplier() {
|
||||
return barrierData.defaultMultiplier;
|
||||
}
|
||||
|
||||
public void setDefaultMultiplier(float mult) {
|
||||
barrierData.defaultMultiplier = mult;
|
||||
}
|
||||
|
||||
public void setDamageMultiplier(String typeId, float mult) {
|
||||
barrierData.setMultiplier(typeId, mult);
|
||||
}
|
||||
|
||||
public float getDamageMultiplier(String typeId) {
|
||||
return barrierData.getMultiplier(typeId);
|
||||
}
|
||||
|
||||
// Knockback data
|
||||
public boolean isKnockbackEnabled() { return barrierData.knockbackEnabled; }
|
||||
public void setKnockbackEnabled(boolean enabled) { barrierData.knockbackEnabled = enabled; }
|
||||
public float getKnockbackStrength() { return barrierData.knockbackStrength; }
|
||||
public void setKnockbackStrength(float strength) { barrierData.knockbackStrength = strength; }
|
||||
public String getKnockbackTargetKey() { return barrierData.getKnockbackTargetKey(); }
|
||||
public void setKnockbackTargetKey(String key) { barrierData.setKnockbackTargetFromKey(key); }
|
||||
public boolean isKnockbackEnabled() {
|
||||
return barrierData.knockbackEnabled;
|
||||
}
|
||||
|
||||
public void setKnockbackEnabled(boolean enabled) {
|
||||
barrierData.knockbackEnabled = enabled;
|
||||
}
|
||||
|
||||
public float getKnockbackStrength() {
|
||||
return barrierData.knockbackStrength;
|
||||
}
|
||||
|
||||
public void setKnockbackStrength(float strength) {
|
||||
barrierData.knockbackStrength = strength;
|
||||
}
|
||||
|
||||
public String getKnockbackTargetKey() {
|
||||
return barrierData.getKnockbackTargetKey();
|
||||
}
|
||||
|
||||
public void setKnockbackTargetKey(String key) {
|
||||
barrierData.setKnockbackTargetFromKey(key);
|
||||
}
|
||||
|
||||
// Melee data
|
||||
public boolean isMeleeEnabled() { return barrierData.meleeEnabled; }
|
||||
public void setMeleeEnabled(boolean enabled) { barrierData.meleeEnabled = enabled; }
|
||||
public float getMeleeDamageMultiplier() { return barrierData.meleeDamageMultiplier; }
|
||||
public void setMeleeDamageMultiplier(float mult) { barrierData.meleeDamageMultiplier = mult; }
|
||||
public boolean isMeleeEnabled() {
|
||||
return barrierData.meleeEnabled;
|
||||
}
|
||||
|
||||
public void setMeleeEnabled(boolean enabled) {
|
||||
barrierData.meleeEnabled = enabled;
|
||||
}
|
||||
|
||||
public float getMeleeDamageMultiplier() {
|
||||
return barrierData.meleeDamageMultiplier;
|
||||
}
|
||||
|
||||
public void setMeleeDamageMultiplier(float mult) {
|
||||
barrierData.meleeDamageMultiplier = mult;
|
||||
}
|
||||
|
||||
// ==================== GUI ====================
|
||||
|
||||
@@ -199,7 +257,7 @@ public abstract class AbilityEnergyBarrier extends AbilityEnergy {
|
||||
FieldDef.floatField("ability.knockbackStrength", this::getKnockbackStrength, this::setKnockbackStrength)
|
||||
.range(0, 10).visibleWhen(this::isKnockbackEnabled),
|
||||
FieldDef.stringEnumField("ability.knockbackTarget", EnergyBarrierData.getKnockbackTargetKeys(),
|
||||
this::getKnockbackTargetKey, this::setKnockbackTargetKey)
|
||||
this::getKnockbackTargetKey, this::setKnockbackTargetKey)
|
||||
.visibleWhen(this::isKnockbackEnabled)
|
||||
));
|
||||
|
||||
|
||||
+191
-54
@@ -2,10 +2,14 @@ package kamkeel.npcs.controllers.data.ability.type.energy;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.Ability;
|
||||
import kamkeel.npcs.controllers.data.ability.AnchorPoint;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.data.*;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyCombatData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyHomingData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyLifespanData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyTrajectoryData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.ProjectileData;
|
||||
import kamkeel.npcs.controllers.data.telegraph.Telegraph;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphInstance;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
@@ -24,7 +28,7 @@ import java.util.List;
|
||||
* Abstract base for energy projectile abilities (Orb, Disc, Beam, LaserShot).
|
||||
* Handles shared lifecycle (windup → execute → active → completion), multi-projectile
|
||||
* support with staggered firing, telegraph creation, NBT persistence, and GUI definitions.
|
||||
*
|
||||
* <p>
|
||||
* Subclasses provide entity creation/firing/charging logic and type-specific fields.
|
||||
*
|
||||
* @param <E> The entity type this ability spawns
|
||||
@@ -74,7 +78,7 @@ public abstract class AbilityEnergyProjectile<E extends EntityEnergyProjectile>
|
||||
* Called during windup (tick 1) and burst refire (onExecute when entities are null).
|
||||
*/
|
||||
protected abstract E createEntity(EntityLivingBase caster, EntityLivingBase target,
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index);
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index);
|
||||
|
||||
/**
|
||||
* Fire an entity (start moving toward target). Entity is guaranteed non-null and alive.
|
||||
@@ -90,7 +94,7 @@ public abstract class AbilityEnergyProjectile<E extends EntityEnergyProjectile>
|
||||
* Setup entity for preview mode during windup.
|
||||
*/
|
||||
protected abstract void setupEntityPreview(E entity, EntityLivingBase caster,
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index);
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index);
|
||||
|
||||
/**
|
||||
* Create typed array (Java generics can't create generic arrays).
|
||||
@@ -129,9 +133,12 @@ public abstract class AbilityEnergyProjectile<E extends EntityEnergyProjectile>
|
||||
*/
|
||||
protected AnchorPoint getDefaultAnchor(int index) {
|
||||
switch (index) {
|
||||
case 0: return AnchorPoint.RIGHT_HAND;
|
||||
case 1: return AnchorPoint.LEFT_HAND;
|
||||
default: return AnchorPoint.FRONT;
|
||||
case 0:
|
||||
return AnchorPoint.RIGHT_HAND;
|
||||
case 1:
|
||||
return AnchorPoint.LEFT_HAND;
|
||||
default:
|
||||
return AnchorPoint.FRONT;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,15 +175,31 @@ public abstract class AbilityEnergyProjectile<E extends EntityEnergyProjectile>
|
||||
}
|
||||
}
|
||||
|
||||
public int getProjectileCount() { return projectileCount; }
|
||||
public int getProjectileCount() {
|
||||
return projectileCount;
|
||||
}
|
||||
|
||||
public int getFireDelay() { return fireDelay; }
|
||||
public void setFireDelay(int delay) { this.fireDelay = Math.max(0, delay); }
|
||||
public int getFireDelay() {
|
||||
return fireDelay;
|
||||
}
|
||||
|
||||
/** @deprecated Use {@link #getFireDelay()} */
|
||||
public int getDualFireDelay() { return fireDelay; }
|
||||
/** @deprecated Use {@link #setFireDelay(int)} */
|
||||
public void setDualFireDelay(int delay) { setFireDelay(delay); }
|
||||
public void setFireDelay(int delay) {
|
||||
this.fireDelay = Math.max(0, delay);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #getFireDelay()}
|
||||
*/
|
||||
public int getDualFireDelay() {
|
||||
return fireDelay;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #setFireDelay(int)}
|
||||
*/
|
||||
public void setDualFireDelay(int delay) {
|
||||
setFireDelay(delay);
|
||||
}
|
||||
|
||||
protected int clampIndex(int index) {
|
||||
return Math.max(0, Math.min(index, projectileCount - 1));
|
||||
@@ -317,7 +340,7 @@ public abstract class AbilityEnergyProjectile<E extends EntityEnergyProjectile>
|
||||
// Check if entity was removed from world (chunk unload, etc.)
|
||||
// Skip this check for preview entities - they're not registered in the world
|
||||
if (!isPreview() && tick > 5 && entity.worldObj != null
|
||||
&& entity.worldObj.getEntityByID(entity.getEntityId()) != entity) {
|
||||
&& entity.worldObj.getEntityByID(entity.getEntityId()) != entity) {
|
||||
entity.setDead();
|
||||
continue;
|
||||
}
|
||||
@@ -449,64 +472,163 @@ public abstract class AbilityEnergyProjectile<E extends EntityEnergyProjectile>
|
||||
// ==================== API GETTERS & SETTERS ====================
|
||||
|
||||
// Combat data
|
||||
@Override public float getDamage() { return combatData.damage; }
|
||||
@Override public void setDamage(float damage) { combatData.damage = damage; }
|
||||
@Override
|
||||
public float getDamage() {
|
||||
return combatData.damage;
|
||||
}
|
||||
|
||||
@Override public float getKnockback() { return combatData.knockback; }
|
||||
@Override public void setKnockback(float knockback) { combatData.knockback = knockback; }
|
||||
@Override
|
||||
public void setDamage(float damage) {
|
||||
combatData.damage = damage;
|
||||
}
|
||||
|
||||
@Override public float getKnockbackUp() { return combatData.knockbackUp; }
|
||||
@Override public void setKnockbackUp(float knockbackUp) { combatData.knockbackUp = knockbackUp; }
|
||||
@Override
|
||||
public float getKnockback() {
|
||||
return combatData.knockback;
|
||||
}
|
||||
|
||||
@Override public boolean isExplosive() { return combatData.explosive; }
|
||||
@Override public void setExplosive(boolean explosive) { combatData.explosive = explosive; }
|
||||
@Override
|
||||
public void setKnockback(float knockback) {
|
||||
combatData.knockback = knockback;
|
||||
}
|
||||
|
||||
@Override public float getExplosionRadius() { return combatData.explosionRadius; }
|
||||
@Override public void setExplosionRadius(float explosionRadius) { combatData.explosionRadius = explosionRadius; }
|
||||
@Override
|
||||
public float getKnockbackUp() {
|
||||
return combatData.knockbackUp;
|
||||
}
|
||||
|
||||
@Override public float getExplosionDamageFalloff() { return combatData.explosionDamageFalloff; }
|
||||
@Override public void setExplosionDamageFalloff(float falloff) { combatData.explosionDamageFalloff = falloff; }
|
||||
@Override
|
||||
public void setKnockbackUp(float knockbackUp) {
|
||||
combatData.knockbackUp = knockbackUp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExplosive() {
|
||||
return combatData.explosive;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExplosive(boolean explosive) {
|
||||
combatData.explosive = explosive;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getExplosionRadius() {
|
||||
return combatData.explosionRadius;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExplosionRadius(float explosionRadius) {
|
||||
combatData.explosionRadius = explosionRadius;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getExplosionDamageFalloff() {
|
||||
return combatData.explosionDamageFalloff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExplosionDamageFalloff(float falloff) {
|
||||
combatData.explosionDamageFalloff = falloff;
|
||||
}
|
||||
|
||||
// Lifespan data
|
||||
@Override public float getMaxDistance() { return lifespanData.maxDistance; }
|
||||
@Override public void setMaxDistance(float maxDistance) { lifespanData.maxDistance = maxDistance; }
|
||||
@Override
|
||||
public float getMaxDistance() {
|
||||
return lifespanData.maxDistance;
|
||||
}
|
||||
|
||||
@Override public int getMaxLifetime() { return lifespanData.maxLifetime; }
|
||||
@Override public void setMaxLifetime(int maxLifetime) { lifespanData.maxLifetime = maxLifetime; }
|
||||
@Override
|
||||
public void setMaxDistance(float maxDistance) {
|
||||
lifespanData.maxDistance = maxDistance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLifetime() {
|
||||
return lifespanData.maxLifetime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMaxLifetime(int maxLifetime) {
|
||||
lifespanData.maxLifetime = maxLifetime;
|
||||
}
|
||||
|
||||
// Homing data
|
||||
public boolean isHoming() { return homingData.homing; }
|
||||
public void setHoming(boolean homing) { homingData.homing = homing; }
|
||||
public boolean isHoming() {
|
||||
return homingData.homing;
|
||||
}
|
||||
|
||||
public float getHomingStrength() { return homingData.homingStrength; }
|
||||
public void setHomingStrength(float strength) { homingData.homingStrength = strength; }
|
||||
public void setHoming(boolean homing) {
|
||||
homingData.homing = homing;
|
||||
}
|
||||
|
||||
public float getHomingRange() { return homingData.homingRange; }
|
||||
public void setHomingRange(float range) { homingData.homingRange = range; }
|
||||
public float getHomingStrength() {
|
||||
return homingData.homingStrength;
|
||||
}
|
||||
|
||||
public void setHomingStrength(float strength) {
|
||||
homingData.homingStrength = strength;
|
||||
}
|
||||
|
||||
public float getHomingRange() {
|
||||
return homingData.homingRange;
|
||||
}
|
||||
|
||||
public void setHomingRange(float range) {
|
||||
homingData.homingRange = range;
|
||||
}
|
||||
|
||||
// Display and lightning data inherited from AbilityEnergy
|
||||
|
||||
// Anchor - default to projectile 0
|
||||
public AnchorPoint getAnchorPointEnum() { return projectiles[0].anchor.anchorPoint; }
|
||||
public void setAnchorPointEnum(AnchorPoint point) { projectiles[0].anchor.anchorPoint = point; }
|
||||
public AnchorPoint getAnchorPointEnum() {
|
||||
return projectiles[0].anchor.anchorPoint;
|
||||
}
|
||||
|
||||
public float getAnchorOffsetX() { return projectiles[0].anchor.anchorOffsetX; }
|
||||
public void setAnchorOffsetX(float x) { projectiles[0].anchor.anchorOffsetX = x; }
|
||||
public void setAnchorPointEnum(AnchorPoint point) {
|
||||
projectiles[0].anchor.anchorPoint = point;
|
||||
}
|
||||
|
||||
public float getAnchorOffsetY() { return projectiles[0].anchor.anchorOffsetY; }
|
||||
public void setAnchorOffsetY(float y) { projectiles[0].anchor.anchorOffsetY = y; }
|
||||
public float getAnchorOffsetX() {
|
||||
return projectiles[0].anchor.anchorOffsetX;
|
||||
}
|
||||
|
||||
public float getAnchorOffsetZ() { return projectiles[0].anchor.anchorOffsetZ; }
|
||||
public void setAnchorOffsetZ(float z) { projectiles[0].anchor.anchorOffsetZ = z; }
|
||||
public void setAnchorOffsetX(float x) {
|
||||
projectiles[0].anchor.anchorOffsetX = x;
|
||||
}
|
||||
|
||||
@Override public int getAnchorPoint() { return projectiles[0].anchor.anchorPoint.ordinal(); }
|
||||
@Override public void setAnchorPoint(int point) { projectiles[0].anchor.anchorPoint = AnchorPoint.fromOrdinal(point); }
|
||||
public float getAnchorOffsetY() {
|
||||
return projectiles[0].anchor.anchorOffsetY;
|
||||
}
|
||||
|
||||
public void setAnchorOffsetY(float y) {
|
||||
projectiles[0].anchor.anchorOffsetY = y;
|
||||
}
|
||||
|
||||
public float getAnchorOffsetZ() {
|
||||
return projectiles[0].anchor.anchorOffsetZ;
|
||||
}
|
||||
|
||||
public void setAnchorOffsetZ(float z) {
|
||||
projectiles[0].anchor.anchorOffsetZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAnchorPoint() {
|
||||
return projectiles[0].anchor.anchorPoint.ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAnchorPoint(int point) {
|
||||
projectiles[0].anchor.anchorPoint = AnchorPoint.fromOrdinal(point);
|
||||
}
|
||||
|
||||
// Indexed API methods
|
||||
public int getInnerColor(int index) {
|
||||
ProjectileData p = projectiles[clampIndex(index)];
|
||||
return p.colorOverride ? p.innerColor : displayData.innerColor;
|
||||
}
|
||||
|
||||
public void setInnerColor(int index, int color) {
|
||||
ProjectileData p = projectiles[clampIndex(index)];
|
||||
p.colorOverride = true;
|
||||
@@ -517,17 +639,32 @@ public abstract class AbilityEnergyProjectile<E extends EntityEnergyProjectile>
|
||||
ProjectileData p = projectiles[clampIndex(index)];
|
||||
return p.colorOverride ? p.outerColor : displayData.outerColor;
|
||||
}
|
||||
|
||||
public void setOuterColor(int index, int color) {
|
||||
ProjectileData p = projectiles[clampIndex(index)];
|
||||
p.colorOverride = true;
|
||||
p.outerColor = color;
|
||||
}
|
||||
|
||||
public int getAnchorPoint(int index) { return projectiles[clampIndex(index)].anchor.anchorPoint.ordinal(); }
|
||||
public void setAnchorPoint(int index, int point) { projectiles[clampIndex(index)].anchor.anchorPoint = AnchorPoint.fromOrdinal(point); }
|
||||
public void setAnchorOffsetX(int index, float offset) { projectiles[clampIndex(index)].anchor.anchorOffsetX = offset; }
|
||||
public void setAnchorOffsetY(int index, float offset) { projectiles[clampIndex(index)].anchor.anchorOffsetY = offset; }
|
||||
public void setAnchorOffsetZ(int index, float offset) { projectiles[clampIndex(index)].anchor.anchorOffsetZ = offset; }
|
||||
public int getAnchorPoint(int index) {
|
||||
return projectiles[clampIndex(index)].anchor.anchorPoint.ordinal();
|
||||
}
|
||||
|
||||
public void setAnchorPoint(int index, int point) {
|
||||
projectiles[clampIndex(index)].anchor.anchorPoint = AnchorPoint.fromOrdinal(point);
|
||||
}
|
||||
|
||||
public void setAnchorOffsetX(int index, float offset) {
|
||||
projectiles[clampIndex(index)].anchor.anchorOffsetX = offset;
|
||||
}
|
||||
|
||||
public void setAnchorOffsetY(int index, float offset) {
|
||||
projectiles[clampIndex(index)].anchor.anchorOffsetY = offset;
|
||||
}
|
||||
|
||||
public void setAnchorOffsetZ(int index, float offset) {
|
||||
projectiles[clampIndex(index)].anchor.anchorOffsetZ = offset;
|
||||
}
|
||||
|
||||
// ==================== GUI FIELD DEFINITIONS ====================
|
||||
|
||||
@@ -555,7 +692,7 @@ public abstract class AbilityEnergyProjectile<E extends EntityEnergyProjectile>
|
||||
.visibleWhen(() -> idx < projectileCount));
|
||||
|
||||
defs.add(FieldDef.enumField("ability.anchorPoint", AnchorPoint.class,
|
||||
() -> projectiles[idx].anchor.anchorPoint, v -> projectiles[idx].anchor.anchorPoint = v)
|
||||
() -> projectiles[idx].anchor.anchorPoint, v -> projectiles[idx].anchor.anchorPoint = v)
|
||||
.tab("ability.tab.visual").visibleWhen(() -> idx < projectileCount));
|
||||
defs.add(FieldDef.row(
|
||||
FieldDef.floatField("ability.anchor.offsetX", () -> projectiles[idx].anchor.anchorOffsetX, v -> projectiles[idx].anchor.anchorOffsetX = v)
|
||||
|
||||
+28
-9
@@ -6,7 +6,11 @@ import kamkeel.npcs.controllers.data.ability.AnchorPoint;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.RotationMode;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.data.*;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyCombatData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyHomingData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyLifespanData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.ProjectileData;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.Telegraph;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphInstance;
|
||||
@@ -111,7 +115,7 @@ public class AbilityLaserShot extends AbilityEnergyProjectile<EntityAbilityLaser
|
||||
|
||||
@Override
|
||||
protected EntityAbilityLaser createEntity(EntityLivingBase caster, EntityLivingBase target,
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
return new EntityAbilityLaser(
|
||||
caster.worldObj, caster, target,
|
||||
spawnPos.xCoord, spawnPos.yCoord, spawnPos.zCoord,
|
||||
@@ -133,7 +137,7 @@ public class AbilityLaserShot extends AbilityEnergyProjectile<EntityAbilityLaser
|
||||
|
||||
@Override
|
||||
protected void setupEntityPreview(EntityAbilityLaser laser, EntityLivingBase caster,
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
laser.setupPreview(caster, laserWidth, resolved, lightningData, expansionSpeed, lifespanData.maxDistance);
|
||||
}
|
||||
|
||||
@@ -165,14 +169,29 @@ public class AbilityLaserShot extends AbilityEnergyProjectile<EntityAbilityLaser
|
||||
|
||||
// ==================== TYPE-SPECIFIC GETTERS ====================
|
||||
|
||||
public float getLaserWidth() { return laserWidth; }
|
||||
public void setLaserWidth(float laserWidth) { this.laserWidth = laserWidth; }
|
||||
public float getLaserWidth() {
|
||||
return laserWidth;
|
||||
}
|
||||
|
||||
public float getExpansionSpeed() { return expansionSpeed; }
|
||||
public void setExpansionSpeed(float expansionSpeed) { this.expansionSpeed = expansionSpeed; }
|
||||
public void setLaserWidth(float laserWidth) {
|
||||
this.laserWidth = laserWidth;
|
||||
}
|
||||
|
||||
public int getLingerTicks() { return lingerTicks; }
|
||||
public void setLingerTicks(int lingerTicks) { this.lingerTicks = lingerTicks; }
|
||||
public float getExpansionSpeed() {
|
||||
return expansionSpeed;
|
||||
}
|
||||
|
||||
public void setExpansionSpeed(float expansionSpeed) {
|
||||
this.expansionSpeed = expansionSpeed;
|
||||
}
|
||||
|
||||
public int getLingerTicks() {
|
||||
return lingerTicks;
|
||||
}
|
||||
|
||||
public void setLingerTicks(int lingerTicks) {
|
||||
this.lingerTicks = lingerTicks;
|
||||
}
|
||||
|
||||
// ==================== TYPE-SPECIFIC GUI ====================
|
||||
|
||||
|
||||
@@ -5,7 +5,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.AbilityVariant;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.data.*;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyCombatData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyHomingData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyLifespanData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.ProjectileData;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityAbilityOrb;
|
||||
@@ -51,7 +55,7 @@ public class AbilityOrb extends AbilityEnergyProjectile<EntityAbilityOrb> implem
|
||||
|
||||
@Override
|
||||
protected EntityAbilityOrb createEntity(EntityLivingBase caster, EntityLivingBase target,
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
return new EntityAbilityOrb(
|
||||
caster.worldObj, caster, target,
|
||||
spawnPos.xCoord, spawnPos.yCoord, spawnPos.zCoord, orbSize,
|
||||
@@ -74,7 +78,7 @@ public class AbilityOrb extends AbilityEnergyProjectile<EntityAbilityOrb> implem
|
||||
|
||||
@Override
|
||||
protected void setupEntityPreview(EntityAbilityOrb orb, EntityLivingBase caster,
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
orb.setupPreview(caster, orbSize, resolved, lightningData, projData.anchor, windUpTicks);
|
||||
}
|
||||
|
||||
@@ -137,11 +141,21 @@ public class AbilityOrb extends AbilityEnergyProjectile<EntityAbilityOrb> implem
|
||||
|
||||
// ==================== TYPE-SPECIFIC GETTERS ====================
|
||||
|
||||
public float getOrbSpeed() { return homingData.speed; }
|
||||
public void setOrbSpeed(float speed) { homingData.speed = speed; }
|
||||
public float getOrbSpeed() {
|
||||
return homingData.speed;
|
||||
}
|
||||
|
||||
public float getOrbSize() { return orbSize; }
|
||||
public void setOrbSize(float size) { this.orbSize = size; }
|
||||
public void setOrbSpeed(float speed) {
|
||||
homingData.speed = speed;
|
||||
}
|
||||
|
||||
public float getOrbSize() {
|
||||
return orbSize;
|
||||
}
|
||||
|
||||
public void setOrbSize(float size) {
|
||||
this.orbSize = size;
|
||||
}
|
||||
|
||||
// ==================== TYPE-SPECIFIC GUI ====================
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import kamkeel.npcs.controllers.data.ability.data.EnergyPanelData;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyPanel;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -124,11 +123,21 @@ public class AbilityShield extends AbilityEnergyBarrier {
|
||||
|
||||
// ==================== GETTERS & SETTERS ====================
|
||||
|
||||
public float getShieldWidth() { return shieldWidth; }
|
||||
public void setShieldWidth(float width) { this.shieldWidth = Math.max(0.5f, width); }
|
||||
public float getShieldWidth() {
|
||||
return shieldWidth;
|
||||
}
|
||||
|
||||
public float getShieldHeight() { return shieldHeight; }
|
||||
public void setShieldHeight(float height) { this.shieldHeight = Math.max(0.5f, height); }
|
||||
public void setShieldWidth(float width) {
|
||||
this.shieldWidth = Math.max(0.5f, width);
|
||||
}
|
||||
|
||||
public float getShieldHeight() {
|
||||
return shieldHeight;
|
||||
}
|
||||
|
||||
public void setShieldHeight(float height) {
|
||||
this.shieldHeight = Math.max(0.5f, height);
|
||||
}
|
||||
|
||||
// ==================== TYPE-SPECIFIC GUI ====================
|
||||
|
||||
|
||||
+35
-11
@@ -5,7 +5,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.AbilityVariant;
|
||||
import kamkeel.npcs.controllers.data.ability.LockMovementType;
|
||||
import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.data.*;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyCombatData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyHomingData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyLifespanData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.ProjectileData;
|
||||
import kamkeel.npcs.controllers.data.ability.gui.AbilityFieldDefs;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityEnergySlicer;
|
||||
@@ -53,7 +57,7 @@ public class AbilitySlicer extends AbilityEnergyProjectile<EntityEnergySlicer> {
|
||||
|
||||
@Override
|
||||
protected EntityEnergySlicer createEntity(EntityLivingBase caster, EntityLivingBase target,
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
Vec3 spawnPos, EnergyDisplayData resolved, int index) {
|
||||
return new EntityEnergySlicer(
|
||||
caster.worldObj, caster, target,
|
||||
spawnPos.xCoord, spawnPos.yCoord, spawnPos.zCoord,
|
||||
@@ -79,7 +83,7 @@ public class AbilitySlicer extends AbilityEnergyProjectile<EntityEnergySlicer> {
|
||||
|
||||
@Override
|
||||
protected void setupEntityPreview(EntityEnergySlicer slicer, EntityLivingBase caster,
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
EnergyDisplayData resolved, ProjectileData projData, int index) {
|
||||
slicer.setupPreview(caster, sliceWidth, sliceThickness, resolved, lightningData, projData.anchor, windUpTicks);
|
||||
}
|
||||
|
||||
@@ -130,17 +134,37 @@ public class AbilitySlicer extends AbilityEnergyProjectile<EntityEnergySlicer> {
|
||||
|
||||
// ==================== TYPE-SPECIFIC GETTERS ====================
|
||||
|
||||
public float getSlicerSpeed() { return homingData.speed; }
|
||||
public void setSlicerSpeed(float speed) { homingData.speed = speed; }
|
||||
public float getSlicerSpeed() {
|
||||
return homingData.speed;
|
||||
}
|
||||
|
||||
public float getSliceWidth() { return sliceWidth; }
|
||||
public void setSliceWidth(float width) { this.sliceWidth = Math.max(0.5f, width); }
|
||||
public void setSlicerSpeed(float speed) {
|
||||
homingData.speed = speed;
|
||||
}
|
||||
|
||||
public float getSliceThickness() { return sliceThickness; }
|
||||
public void setSliceThickness(float thickness) { this.sliceThickness = Math.max(0.05f, thickness); }
|
||||
public float getSliceWidth() {
|
||||
return sliceWidth;
|
||||
}
|
||||
|
||||
public boolean isPiercing() { return piercing; }
|
||||
public void setPiercing(boolean piercing) { this.piercing = piercing; }
|
||||
public void setSliceWidth(float width) {
|
||||
this.sliceWidth = Math.max(0.5f, width);
|
||||
}
|
||||
|
||||
public float getSliceThickness() {
|
||||
return sliceThickness;
|
||||
}
|
||||
|
||||
public void setSliceThickness(float thickness) {
|
||||
this.sliceThickness = Math.max(0.05f, thickness);
|
||||
}
|
||||
|
||||
public boolean isPiercing() {
|
||||
return piercing;
|
||||
}
|
||||
|
||||
public void setPiercing(boolean piercing) {
|
||||
this.piercing = piercing;
|
||||
}
|
||||
|
||||
// ==================== TYPE-SPECIFIC GUI ====================
|
||||
|
||||
|
||||
+72
-19
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
* Sweeper ability: A low sweeping beam that rotates around the NPC.
|
||||
* Players can jump over it. The beam completes a set number of rotations before ending.
|
||||
* Telegraph shows a large circle on the ground indicating range.
|
||||
*
|
||||
* <p>
|
||||
* All damage logic is handled by the EntityAbilitySweeper entity to ensure
|
||||
* visual and damage hitbox alignment.
|
||||
*/
|
||||
@@ -173,24 +173,77 @@ public class AbilitySweeper extends AbilityEnergy implements IAbilitySweeper {
|
||||
}
|
||||
|
||||
// Getters & Setters (type-specific only; color/lightning inherited from AbilityEnergy)
|
||||
public float getBeamLength() { return beamLength; }
|
||||
public void setBeamLength(float beamLength) { this.beamLength = beamLength; }
|
||||
public float getBeamWidth() { return beamWidth; }
|
||||
public void setBeamWidth(float beamWidth) { this.beamWidth = beamWidth; }
|
||||
public float getBeamHeight() { return beamHeight; }
|
||||
public void setBeamHeight(float beamHeight) { this.beamHeight = beamHeight; }
|
||||
public float getDamage() { return damage; }
|
||||
public void setDamage(float damage) { this.damage = damage; }
|
||||
public int getDamageInterval() { return damageInterval; }
|
||||
public void setDamageInterval(int damageInterval) { this.damageInterval = damageInterval; }
|
||||
public boolean isPiercing() { return piercing; }
|
||||
public void setPiercing(boolean piercing) { this.piercing = piercing; }
|
||||
public float getSweepSpeed() { return sweepSpeed; }
|
||||
public void setSweepSpeed(float sweepSpeed) { this.sweepSpeed = sweepSpeed; }
|
||||
public int getNumberOfRotations() { return numberOfRotations; }
|
||||
public void setNumberOfRotations(int numberOfRotations) { this.numberOfRotations = numberOfRotations; }
|
||||
public boolean isLockOnTarget() { return lockOnTarget; }
|
||||
public void setLockOnTarget(boolean lockOnTarget) { this.lockOnTarget = lockOnTarget; }
|
||||
public float getBeamLength() {
|
||||
return beamLength;
|
||||
}
|
||||
|
||||
public void setBeamLength(float beamLength) {
|
||||
this.beamLength = beamLength;
|
||||
}
|
||||
|
||||
public float getBeamWidth() {
|
||||
return beamWidth;
|
||||
}
|
||||
|
||||
public void setBeamWidth(float beamWidth) {
|
||||
this.beamWidth = beamWidth;
|
||||
}
|
||||
|
||||
public float getBeamHeight() {
|
||||
return beamHeight;
|
||||
}
|
||||
|
||||
public void setBeamHeight(float beamHeight) {
|
||||
this.beamHeight = beamHeight;
|
||||
}
|
||||
|
||||
public float getDamage() {
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void setDamage(float damage) {
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
public int getDamageInterval() {
|
||||
return damageInterval;
|
||||
}
|
||||
|
||||
public void setDamageInterval(int damageInterval) {
|
||||
this.damageInterval = damageInterval;
|
||||
}
|
||||
|
||||
public boolean isPiercing() {
|
||||
return piercing;
|
||||
}
|
||||
|
||||
public void setPiercing(boolean piercing) {
|
||||
this.piercing = piercing;
|
||||
}
|
||||
|
||||
public float getSweepSpeed() {
|
||||
return sweepSpeed;
|
||||
}
|
||||
|
||||
public void setSweepSpeed(float sweepSpeed) {
|
||||
this.sweepSpeed = sweepSpeed;
|
||||
}
|
||||
|
||||
public int getNumberOfRotations() {
|
||||
return numberOfRotations;
|
||||
}
|
||||
|
||||
public void setNumberOfRotations(int numberOfRotations) {
|
||||
this.numberOfRotations = numberOfRotations;
|
||||
}
|
||||
|
||||
public boolean isLockOnTarget() {
|
||||
return lockOnTarget;
|
||||
}
|
||||
|
||||
public void setLockOnTarget(boolean lockOnTarget) {
|
||||
this.lockOnTarget = lockOnTarget;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxPreviewDuration() {
|
||||
|
||||
@@ -11,7 +11,6 @@ import kamkeel.npcs.controllers.data.ability.data.EnergyPanelData;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyPanel;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -139,28 +138,65 @@ public class AbilityWall extends AbilityEnergyBarrier {
|
||||
|
||||
// ==================== GETTERS & SETTERS ====================
|
||||
|
||||
public EnergyPanelData getPanelData() { return panelData; }
|
||||
public EnergyPanelData getPanelData() {
|
||||
return panelData;
|
||||
}
|
||||
|
||||
public float getPanelWidth() { return panelData.panelWidth; }
|
||||
public void setPanelWidth(float width) { panelData.setPanelWidth(width); }
|
||||
public float getPanelWidth() {
|
||||
return panelData.panelWidth;
|
||||
}
|
||||
|
||||
public float getPanelHeight() { return panelData.panelHeight; }
|
||||
public void setPanelHeight(float height) { panelData.setPanelHeight(height); }
|
||||
public void setPanelWidth(float width) {
|
||||
panelData.setPanelWidth(width);
|
||||
}
|
||||
|
||||
public float getHeightOffset() { return panelData.heightOffset; }
|
||||
public void setHeightOffset(float offset) { panelData.heightOffset = offset; }
|
||||
public float getPanelHeight() {
|
||||
return panelData.panelHeight;
|
||||
}
|
||||
|
||||
public boolean isLaunching() { return panelData.launching; }
|
||||
public void setLaunching(boolean launching) { panelData.launching = launching; }
|
||||
public void setPanelHeight(float height) {
|
||||
panelData.setPanelHeight(height);
|
||||
}
|
||||
|
||||
public float getLaunchSpeed() { return panelData.launchSpeed; }
|
||||
public void setLaunchSpeed(float speed) { panelData.setLaunchSpeed(speed); }
|
||||
public float getHeightOffset() {
|
||||
return panelData.heightOffset;
|
||||
}
|
||||
|
||||
public float getLaunchDamage() { return panelData.launchDamage; }
|
||||
public void setLaunchDamage(float damage) { panelData.setLaunchDamage(damage); }
|
||||
public void setHeightOffset(float offset) {
|
||||
panelData.heightOffset = offset;
|
||||
}
|
||||
|
||||
public float getLaunchKnockback() { return panelData.launchKnockback; }
|
||||
public void setLaunchKnockback(float kb) { panelData.setLaunchKnockback(kb); }
|
||||
public boolean isLaunching() {
|
||||
return panelData.launching;
|
||||
}
|
||||
|
||||
public void setLaunching(boolean launching) {
|
||||
panelData.launching = launching;
|
||||
}
|
||||
|
||||
public float getLaunchSpeed() {
|
||||
return panelData.launchSpeed;
|
||||
}
|
||||
|
||||
public void setLaunchSpeed(float speed) {
|
||||
panelData.setLaunchSpeed(speed);
|
||||
}
|
||||
|
||||
public float getLaunchDamage() {
|
||||
return panelData.launchDamage;
|
||||
}
|
||||
|
||||
public void setLaunchDamage(float damage) {
|
||||
panelData.setLaunchDamage(damage);
|
||||
}
|
||||
|
||||
public float getLaunchKnockback() {
|
||||
return panelData.launchKnockback;
|
||||
}
|
||||
|
||||
public void setLaunchKnockback(float kb) {
|
||||
panelData.setLaunchKnockback(kb);
|
||||
}
|
||||
|
||||
// ==================== TYPE-SPECIFIC GUI ====================
|
||||
|
||||
|
||||
Reference in new issue
Block a user