mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 15:44:30 +00:00
- Barrier Health Scaling with DBC Addon
- Healing Health Scaling with DBC Addon - Ki Attacks collided with Barriers - Remove Ability Slot (Deprecated) - Refactored Naming Scheme for Barrier Abilities - Fixed Player Settings for Ignore Dex, DBC Stats, etc.
This commit is contained in:
1 parent
3e58013ad6
commit
ecfedff9d2
25 files changed
+201
-276
No files matched your search
@@ -7,6 +7,9 @@ import kamkeel.npcs.controllers.data.ability.conditions.AbilityCondition;
|
||||
import kamkeel.npcs.controllers.data.telegraph.Telegraph;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphInstance;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import kamkeel.npcs.entity.EntityAbilityDome;
|
||||
import kamkeel.npcs.entity.EntityAbilityPanel;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -20,9 +23,6 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyDome;
|
||||
import kamkeel.npcs.entity.EntityEnergyPanel;
|
||||
import noppes.npcs.DataAbilities;
|
||||
import noppes.npcs.NpcDamageSource;
|
||||
import noppes.npcs.api.INbt;
|
||||
@@ -2264,9 +2264,9 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
double maxZ = Math.max(caster.posZ, target.posZ) + searchRange;
|
||||
|
||||
AxisAlignedBB searchBox = AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
List<EntityEnergyBarrier> barriers = world.getEntitiesWithinAABB(EntityEnergyBarrier.class, searchBox);
|
||||
List<EntityAbilityBarrier> barriers = world.getEntitiesWithinAABB(EntityAbilityBarrier.class, searchBox);
|
||||
|
||||
for (EntityEnergyBarrier barrier : barriers) {
|
||||
for (EntityAbilityBarrier barrier : barriers) {
|
||||
if (barrier.isDead) continue;
|
||||
if (barrier.isCharging()) continue;
|
||||
|
||||
@@ -2277,10 +2277,10 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
if (AbilityTargetHelper.isAlly(caster, (EntityLivingBase) barrierOwner)) continue;
|
||||
}
|
||||
|
||||
if (barrier instanceof EntityEnergyDome) {
|
||||
if (isDomeBlocking((EntityEnergyDome) barrier, caster, target)) return true;
|
||||
} else if (barrier instanceof EntityEnergyPanel) {
|
||||
if (isPanelBlocking((EntityEnergyPanel) barrier, caster, target)) return true;
|
||||
if (barrier instanceof EntityAbilityDome) {
|
||||
if (isDomeBlocking((EntityAbilityDome) barrier, caster, target)) return true;
|
||||
} else if (barrier instanceof EntityAbilityPanel) {
|
||||
if (isPanelBlocking((EntityAbilityPanel) barrier, caster, target)) return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2291,7 +2291,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
* Check if a dome blocks an attack from caster to target.
|
||||
* Blocks when caster is outside and target is inside the dome.
|
||||
*/
|
||||
private static boolean isDomeBlocking(EntityEnergyDome dome, EntityLivingBase caster, EntityLivingBase target) {
|
||||
private static boolean isDomeBlocking(EntityAbilityDome dome, EntityLivingBase caster, EntityLivingBase target) {
|
||||
float radius = dome.getDomeRadius();
|
||||
|
||||
double cdx = caster.posX - dome.posX;
|
||||
@@ -2312,7 +2312,7 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
* Check if a panel blocks an attack from caster to target.
|
||||
* Checks if the line from caster to target crosses through the panel bounds.
|
||||
*/
|
||||
private static boolean isPanelBlocking(EntityEnergyPanel panel, EntityLivingBase caster, EntityLivingBase target) {
|
||||
private static boolean isPanelBlocking(EntityAbilityPanel panel, EntityLivingBase caster, EntityLivingBase target) {
|
||||
float halfW = panel.getPanelData().panelWidth * 0.5f;
|
||||
float halfH = panel.getPanelData().panelHeight * 0.5f;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
/**
|
||||
* Unified slot for storing any combat action: inline ability, ability reference, or chain reference.
|
||||
* Replaces {@link AbilitySlot} with support for all {@link IAbilityAction} types.
|
||||
* Support for all {@link IAbilityAction} types.
|
||||
* <p>
|
||||
* References are lazy-resolved via their respective controllers and cached until
|
||||
* the controller revision changes.
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
package kamkeel.npcs.controllers.data.ability;
|
||||
|
||||
import kamkeel.npcs.controllers.AbilityController;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
/**
|
||||
* Wrapper that stores either an inline ability (full NBT) or a reference
|
||||
* to a built-in/custom ability (by name or UUID).
|
||||
* <p>
|
||||
* References are lazy-resolved via {@link AbilityController#resolveAbility(String)}
|
||||
* and cached until the controller version changes.
|
||||
*
|
||||
* @deprecated Use {@link AbilityAction} instead, which supports abilities and chained abilities.
|
||||
*/
|
||||
@Deprecated
|
||||
public class AbilitySlot {
|
||||
|
||||
private Ability inlineAbility;
|
||||
private String referenceId;
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a slot with an inline (embedded) ability.
|
||||
*/
|
||||
public static AbilitySlot inline(Ability ability) {
|
||||
AbilitySlot slot = new AbilitySlot();
|
||||
slot.inlineAbility = ability;
|
||||
slot.referenceId = null;
|
||||
return slot;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a slot that references a built-in ability (by name) or custom ability (by name).
|
||||
*/
|
||||
public static AbilitySlot reference(String referenceId) {
|
||||
AbilitySlot slot = new AbilitySlot();
|
||||
slot.inlineAbility = null;
|
||||
slot.referenceId = referenceId;
|
||||
return slot;
|
||||
}
|
||||
|
||||
public boolean isReference() {
|
||||
return referenceId != null;
|
||||
}
|
||||
|
||||
public String getReferenceId() {
|
||||
return referenceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the resolved ability. For inline slots, returns the ability directly.
|
||||
* For reference slots, lazily resolves from AbilityController and caches.
|
||||
* Returns null if the reference cannot be resolved (broken ref).
|
||||
*/
|
||||
public Ability getAbility() {
|
||||
if (!isReference()) {
|
||||
return inlineAbility;
|
||||
}
|
||||
|
||||
// Lazy resolve with version-based cache invalidation
|
||||
AbilityController controller = AbilityController.Instance;
|
||||
if (controller == null) return null;
|
||||
|
||||
int currentVersion = controller.getCustomAbilityRevision();
|
||||
if (cachedAbility != null && cachedVersion == currentVersion) {
|
||||
return cachedAbility;
|
||||
}
|
||||
|
||||
cachedAbility = controller.resolveAbility(referenceId);
|
||||
// Apply per-slot enabled override so NPC-specific enable/disable persists
|
||||
if (cachedAbility != null && enabledOverride != null) {
|
||||
cachedAbility.setEnabled(enabledOverride);
|
||||
}
|
||||
cachedVersion = currentVersion;
|
||||
return cachedAbility;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the per-slot enabled override for reference slots.
|
||||
* For inline slots, delegates directly to the ability.
|
||||
*/
|
||||
public void setEnabled(boolean enabled) {
|
||||
if (!isReference()) {
|
||||
if (inlineAbility != null) {
|
||||
inlineAbility.setEnabled(enabled);
|
||||
}
|
||||
} else {
|
||||
this.enabledOverride = enabled;
|
||||
// Also update the cached ability immediately if present
|
||||
if (cachedAbility != null) {
|
||||
cachedAbility.setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the inline ability directly (null for reference slots).
|
||||
*/
|
||||
public Ability getInlineAbility() {
|
||||
return inlineAbility;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert this reference slot to an inline slot by copying the resolved ability.
|
||||
* No-op if already inline. Returns false if resolution fails.
|
||||
*/
|
||||
public boolean convertToInline() {
|
||||
if (!isReference()) return true;
|
||||
|
||||
Ability resolved = getAbility();
|
||||
if (resolved == null) return false;
|
||||
|
||||
// Deep copy via NBT round-trip
|
||||
inlineAbility = AbilityController.Instance.fromNBT(resolved.writeNBT());
|
||||
referenceId = null;
|
||||
cachedAbility = null;
|
||||
cachedVersion = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// NBT
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
public NBTTagCompound writeNBT() {
|
||||
if (isReference()) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setString("Reference", referenceId);
|
||||
if (enabledOverride != null) {
|
||||
nbt.setBoolean("RefEnabled", enabledOverride);
|
||||
}
|
||||
return nbt;
|
||||
}
|
||||
return inlineAbility != null ? inlineAbility.writeNBT() : new NBTTagCompound();
|
||||
}
|
||||
|
||||
public static AbilitySlot fromNBT(NBTTagCompound nbt) {
|
||||
if (nbt == null) return null;
|
||||
|
||||
if (nbt.hasKey("Reference")) {
|
||||
AbilitySlot slot = reference(nbt.getString("Reference"));
|
||||
if (nbt.hasKey("RefEnabled")) {
|
||||
slot.enabledOverride = nbt.getBoolean("RefEnabled");
|
||||
}
|
||||
return slot;
|
||||
}
|
||||
|
||||
// Inline ability
|
||||
Ability ability = AbilityController.Instance.fromNBT(nbt);
|
||||
if (ability == null) return null;
|
||||
return inline(ability);
|
||||
}
|
||||
}
|
||||
@@ -87,4 +87,32 @@ public interface IAbilityExtender {
|
||||
default float modifyProjectileDamage(Ability ability, EntityLivingBase caster, float baseDamage) {
|
||||
return baseDamage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a barrier entity is about to be created, allowing extenders to modify its max health.
|
||||
* Cumulative: all extenders apply in sequence, each receiving the previous output.
|
||||
*
|
||||
* @param ability The barrier ability being executed
|
||||
* @param caster The entity creating the barrier
|
||||
* @param baseHealth The base max health from EnergyBarrierData.maxHealth
|
||||
* @return The modified max health value
|
||||
*/
|
||||
default float modifyBarrierHealth(Ability ability, EntityLivingBase caster, float baseHealth) {
|
||||
return baseHealth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an ability is about to heal an entity.
|
||||
* Return true to handle the healing (skip default entity.heal()).
|
||||
* Chain of responsibility: first returning true wins.
|
||||
*
|
||||
* @param ability The ability performing the heal
|
||||
* @param caster The entity casting the ability
|
||||
* @param target The entity being healed
|
||||
* @param healAmount The heal amount calculated by the ability
|
||||
* @return true if healing was handled (skip default), false to pass to next extender or default
|
||||
*/
|
||||
default boolean onAbilityHeal(Ability ability, EntityLivingBase caster, EntityLivingBase target, float healAmount) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public class AbilityEffect extends Ability implements IAbilityEffect {
|
||||
|
||||
if (instantHeal) {
|
||||
for (EntityLivingBase entity : getAffectedEntities()) {
|
||||
healEntity(entity);
|
||||
healEntity(caster, entity);
|
||||
applyAllEffects(caster, entity);
|
||||
spawnHealParticles(caster.worldObj, entity);
|
||||
}
|
||||
@@ -159,7 +159,9 @@ public class AbilityEffect extends Ability implements IAbilityEffect {
|
||||
}
|
||||
|
||||
if (totalTickHeal > 0) {
|
||||
entity.heal(totalTickHeal);
|
||||
if (!AbilityController.Instance.fireOnAbilityHeal(this, caster, entity, totalTickHeal)) {
|
||||
entity.heal(totalTickHeal);
|
||||
}
|
||||
}
|
||||
|
||||
if (tick % 20 == 0) {
|
||||
@@ -226,13 +228,15 @@ public class AbilityEffect extends Ability implements IAbilityEffect {
|
||||
}
|
||||
}
|
||||
|
||||
private void healEntity(EntityLivingBase entity) {
|
||||
private void healEntity(EntityLivingBase caster, EntityLivingBase entity) {
|
||||
float totalHeal = healAmount;
|
||||
if (healPercent > 0) {
|
||||
totalHeal += entity.getMaxHealth() * healPercent;
|
||||
}
|
||||
if (totalHeal > 0) {
|
||||
entity.heal(totalHeal);
|
||||
if (!AbilityController.Instance.fireOnAbilityHeal(this, caster, entity, totalHeal)) {
|
||||
entity.heal(totalHeal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-5
@@ -2,9 +2,10 @@ package kamkeel.npcs.controllers.data.ability.type.energy;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.AbilityController;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyBarrierData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
@@ -16,14 +17,14 @@ import java.util.List;
|
||||
* Abstract base for energy barrier abilities (Dome, Wall, Shield).
|
||||
* Handles shared visual data, barrier configuration, and lifecycle management.
|
||||
*/
|
||||
public abstract class AbilityEnergyBarrier extends AbilityEnergy {
|
||||
public abstract class AbilityBarrier extends AbilityEnergy {
|
||||
|
||||
protected final EnergyBarrierData barrierData;
|
||||
|
||||
// Runtime entity tracking
|
||||
protected transient EntityEnergyBarrier barrierEntity;
|
||||
protected transient EntityAbilityBarrier barrierEntity;
|
||||
|
||||
protected AbilityEnergyBarrier(EnergyDisplayData displayData, EnergyBarrierData barrierData) {
|
||||
protected AbilityBarrier(EnergyDisplayData displayData, EnergyBarrierData barrierData) {
|
||||
super(displayData);
|
||||
this.barrierData = barrierData;
|
||||
}
|
||||
@@ -33,7 +34,7 @@ public abstract class AbilityEnergyBarrier extends AbilityEnergy {
|
||||
/**
|
||||
* Create and spawn the barrier entity during execution.
|
||||
*/
|
||||
protected abstract EntityEnergyBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target);
|
||||
protected abstract EntityAbilityBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target);
|
||||
|
||||
/**
|
||||
* Add type-specific GUI field definitions.
|
||||
@@ -80,6 +81,7 @@ public abstract class AbilityEnergyBarrier extends AbilityEnergy {
|
||||
if (tick == 1) {
|
||||
barrierEntity = createBarrierEntity(caster, target);
|
||||
if (barrierEntity != null) {
|
||||
applyBarrierHealthModifiers(caster);
|
||||
barrierEntity.setupCharging(getWindUpTicks());
|
||||
spawnAbilityEntity(barrierEntity);
|
||||
}
|
||||
@@ -95,6 +97,7 @@ public abstract class AbilityEnergyBarrier extends AbilityEnergy {
|
||||
// No windup or entity died — create fresh
|
||||
barrierEntity = createBarrierEntity(caster, target);
|
||||
if (barrierEntity != null) {
|
||||
applyBarrierHealthModifiers(caster);
|
||||
spawnAbilityEntity(barrierEntity);
|
||||
}
|
||||
}
|
||||
@@ -124,6 +127,16 @@ public abstract class AbilityEnergyBarrier extends AbilityEnergy {
|
||||
public void onComplete(EntityLivingBase caster, EntityLivingBase target) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow extenders to modify the barrier's max health at spawn time.
|
||||
*/
|
||||
private void applyBarrierHealthModifiers(EntityLivingBase caster) {
|
||||
float modHealth = AbilityController.Instance.fireModifyBarrierHealth(this, caster, barrierData.maxHealth);
|
||||
if (modHealth != barrierData.maxHealth) {
|
||||
barrierEntity.setBarrierMaxHealth(modHealth);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInterrupt(EntityLivingBase caster, DamageSource source, float damage) {
|
||||
cleanup();
|
||||
@@ -8,8 +8,8 @@ import kamkeel.npcs.controllers.data.ability.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyBarrierData;
|
||||
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 kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import kamkeel.npcs.entity.EntityAbilityDome;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
* Blocks incoming energy projectiles with configurable damage multipliers.
|
||||
* Duration and/or HP based.
|
||||
*/
|
||||
public class AbilityDome extends AbilityEnergyBarrier {
|
||||
public class AbilityDome extends AbilityBarrier {
|
||||
|
||||
private float domeRadius = 5.0f;
|
||||
private boolean followCaster = false;
|
||||
@@ -47,8 +47,8 @@ public class AbilityDome extends AbilityEnergyBarrier {
|
||||
// ==================== ABSTRACT IMPLEMENTATIONS ====================
|
||||
|
||||
@Override
|
||||
protected EntityEnergyBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
EntityEnergyDome dome = new EntityEnergyDome(
|
||||
protected EntityAbilityBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
EntityAbilityDome dome = new EntityAbilityDome(
|
||||
caster.worldObj, caster,
|
||||
caster.posX, caster.posY, caster.posZ,
|
||||
domeRadius, displayData.copy(), lightningData.copy(), barrierData.copy()
|
||||
|
||||
@@ -10,8 +10,8 @@ import kamkeel.npcs.controllers.data.ability.data.EnergyBarrierData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
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 kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import kamkeel.npcs.entity.EntityAbilityPanel;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* The shield follows the caster's position and rotates with their look direction.
|
||||
* Cannot be placed — it's always held.
|
||||
*/
|
||||
public class AbilityShield extends AbilityEnergyBarrier {
|
||||
public class AbilityShield extends AbilityBarrier {
|
||||
|
||||
private float shieldWidth = 2.5f;
|
||||
private float shieldHeight = 2.5f;
|
||||
@@ -50,7 +50,7 @@ public class AbilityShield extends AbilityEnergyBarrier {
|
||||
// ==================== ABSTRACT IMPLEMENTATIONS ====================
|
||||
|
||||
@Override
|
||||
protected EntityEnergyBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
protected EntityAbilityBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
EnergyPanelData panelData = new EnergyPanelData(shieldWidth, shieldHeight, 0.0f);
|
||||
|
||||
float frontDist = 1.5f;
|
||||
@@ -59,10 +59,10 @@ public class AbilityShield extends AbilityEnergyBarrier {
|
||||
double spawnY = caster.posY + (caster.height * 0.5f);
|
||||
double spawnZ = caster.posZ + (Math.cos(yawRad) * frontDist);
|
||||
|
||||
EntityEnergyPanel panel = new EntityEnergyPanel(
|
||||
EntityAbilityPanel panel = new EntityAbilityPanel(
|
||||
caster.worldObj, caster,
|
||||
spawnX, spawnY, spawnZ, caster.rotationYaw,
|
||||
EntityEnergyPanel.PanelMode.HELD,
|
||||
EntityAbilityPanel.PanelMode.HELD,
|
||||
displayData.copy(), lightningData.copy(), barrierData.copy(), panelData
|
||||
);
|
||||
panel.setSourceAbility(this);
|
||||
|
||||
@@ -9,8 +9,8 @@ import kamkeel.npcs.controllers.data.ability.data.EnergyBarrierData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.EnergyDisplayData;
|
||||
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 kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import kamkeel.npcs.entity.EntityAbilityPanel;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
* Can float above ground (configurable height offset).
|
||||
* Optional launching mode fires the wall forward with damage/knockback.
|
||||
*/
|
||||
public class AbilityWall extends AbilityEnergyBarrier {
|
||||
public class AbilityWall extends AbilityBarrier {
|
||||
|
||||
private final EnergyPanelData panelData;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class AbilityWall extends AbilityEnergyBarrier {
|
||||
// ==================== ABSTRACT IMPLEMENTATIONS ====================
|
||||
|
||||
@Override
|
||||
protected EntityEnergyBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
protected EntityAbilityBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
// Place wall between caster and target
|
||||
double placeX, placeY, placeZ;
|
||||
float yaw;
|
||||
@@ -87,11 +87,11 @@ public class AbilityWall extends AbilityEnergyBarrier {
|
||||
yaw = caster.rotationYaw;
|
||||
}
|
||||
|
||||
EntityEnergyPanel.PanelMode mode = panelData.launching
|
||||
? EntityEnergyPanel.PanelMode.LAUNCHED
|
||||
: EntityEnergyPanel.PanelMode.PLACED;
|
||||
EntityAbilityPanel.PanelMode mode = panelData.launching
|
||||
? EntityAbilityPanel.PanelMode.LAUNCHED
|
||||
: EntityAbilityPanel.PanelMode.PLACED;
|
||||
|
||||
EntityEnergyPanel panel = new EntityEnergyPanel(
|
||||
EntityAbilityPanel panel = new EntityAbilityPanel(
|
||||
caster.worldObj, caster,
|
||||
placeX, placeY, placeZ, yaw, mode,
|
||||
displayData.copy(), lightningData.copy(), barrierData.copy(), panelData.copy()
|
||||
|
||||
Reference in new issue
Block a user