mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 03:15:42 +00:00
Renaming for Better Schema
This commit is contained in:
1 parent
7202f74e78
commit
6f1a837296
34 files changed
+175
-175
No files matched your search
@@ -19,9 +19,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 kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyDome;
|
||||
import kamkeel.npcs.entity.EntityEnergyPanel;
|
||||
import kamkeel.npcs.util.FileNameHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -2475,9 +2475,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<EntityAbilityBarrier> barriers = world.getEntitiesWithinAABB(EntityAbilityBarrier.class, searchBox);
|
||||
List<EntityEnergyBarrier> barriers = world.getEntitiesWithinAABB(EntityEnergyBarrier.class, searchBox);
|
||||
|
||||
for (EntityAbilityBarrier barrier : barriers) {
|
||||
for (EntityEnergyBarrier barrier : barriers) {
|
||||
if (barrier.isDead) continue;
|
||||
if (barrier.isCharging()) continue;
|
||||
|
||||
@@ -2488,10 +2488,10 @@ public abstract class Ability implements IAbility, IAbilityAction {
|
||||
if (AbilityTargetHelper.isAlly(caster, (EntityLivingBase) barrierOwner)) continue;
|
||||
}
|
||||
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2502,7 +2502,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(EntityAbilityDome dome, EntityLivingBase caster, EntityLivingBase target) {
|
||||
private static boolean isDomeBlocking(EntityEnergyDome dome, EntityLivingBase caster, EntityLivingBase target) {
|
||||
float radius = dome.getDomeRadius();
|
||||
|
||||
double cdx = caster.posX - dome.posX;
|
||||
@@ -2523,7 +2523,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(EntityAbilityPanel panel, EntityLivingBase caster, EntityLivingBase target) {
|
||||
private static boolean isPanelBlocking(EntityEnergyPanel panel, EntityLivingBase caster, EntityLivingBase target) {
|
||||
float halfW = panel.getPanelData().panelWidth * 0.5f;
|
||||
float halfH = panel.getPanelData().panelHeight * 0.5f;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.AbilityController;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyBarrierData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyDisplayData;
|
||||
import kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
@@ -27,7 +27,7 @@ public abstract class AbilityBarrier extends AbilityEnergy {
|
||||
protected float offsetZ = 0.0f;
|
||||
|
||||
// Runtime entity tracking
|
||||
protected transient EntityAbilityBarrier barrierEntity;
|
||||
protected transient EntityEnergyBarrier barrierEntity;
|
||||
|
||||
protected AbilityBarrier(EnergyDisplayData displayData, EnergyBarrierData barrierData) {
|
||||
super(displayData);
|
||||
@@ -39,7 +39,7 @@ public abstract class AbilityBarrier extends AbilityEnergy {
|
||||
/**
|
||||
* Create and spawn the barrier entity during execution.
|
||||
*/
|
||||
protected abstract EntityAbilityBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target);
|
||||
protected abstract EntityEnergyBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target);
|
||||
|
||||
/**
|
||||
* Add type-specific GUI field definitions.
|
||||
|
||||
@@ -8,8 +8,8 @@ import kamkeel.npcs.controllers.data.ability.enums.TargetingMode;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyBarrierData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import kamkeel.npcs.entity.EntityAbilityDome;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyDome;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -52,8 +52,8 @@ public class AbilityDome extends AbilityBarrier {
|
||||
// ==================== ABSTRACT IMPLEMENTATIONS ====================
|
||||
|
||||
@Override
|
||||
protected EntityAbilityBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
EntityAbilityDome dome = new EntityAbilityDome(
|
||||
protected EntityEnergyBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
EntityEnergyDome dome = new EntityEnergyDome(
|
||||
caster.worldObj, caster,
|
||||
caster.posX + offsetX, caster.posY + offsetY, caster.posZ + offsetZ,
|
||||
domeRadius, displayData.copy(), lightningData.copy(), barrierData.copy()
|
||||
|
||||
@@ -10,8 +10,8 @@ import kamkeel.npcs.controllers.data.ability.data.energy.EnergyBarrierData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyPanelData;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import kamkeel.npcs.entity.EntityAbilityPanel;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyPanel;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -55,7 +55,7 @@ public class AbilityShield extends AbilityBarrier {
|
||||
// ==================== ABSTRACT IMPLEMENTATIONS ====================
|
||||
|
||||
@Override
|
||||
protected EntityAbilityBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
protected EntityEnergyBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
EnergyPanelData panelData = new EnergyPanelData(shieldWidth, shieldHeight, offsetY);
|
||||
panelData.offsetX = offsetX;
|
||||
panelData.offsetZ = offsetZ;
|
||||
@@ -66,10 +66,10 @@ public class AbilityShield extends AbilityBarrier {
|
||||
double spawnY = caster.posY + (caster.height * 0.5f);
|
||||
double spawnZ = caster.posZ + (Math.cos(yawRad) * frontDist) + offsetZ;
|
||||
|
||||
EntityAbilityPanel panel = new EntityAbilityPanel(
|
||||
EntityEnergyPanel panel = new EntityEnergyPanel(
|
||||
caster.worldObj, caster,
|
||||
spawnX, spawnY, spawnZ, caster.rotationYaw,
|
||||
EntityAbilityPanel.PanelMode.HELD,
|
||||
EntityEnergyPanel.PanelMode.HELD,
|
||||
displayData.copy(), lightningData.copy(), barrierData.copy(), panelData
|
||||
);
|
||||
panel.setSourceAbility(this);
|
||||
|
||||
@@ -9,7 +9,7 @@ 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;
|
||||
import kamkeel.npcs.entity.EntityAbilitySweeper;
|
||||
import kamkeel.npcs.entity.EntityEnergySweeper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.api.ability.type.IAbilitySweeper;
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
* 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
|
||||
* All damage logic is handled by the EntityEnergySweeper entity to ensure
|
||||
* visual and damage hitbox alignment.
|
||||
*/
|
||||
public class AbilitySweeper extends AbilityEnergy implements IAbilitySweeper {
|
||||
@@ -40,7 +40,7 @@ public class AbilitySweeper extends AbilityEnergy implements IAbilitySweeper {
|
||||
private boolean lockOnTarget = false;
|
||||
|
||||
// Runtime state (transient)
|
||||
private transient EntityAbilitySweeper activeEntity = null;
|
||||
private transient EntityEnergySweeper activeEntity = null;
|
||||
|
||||
public AbilitySweeper() {
|
||||
super(new EnergyDisplayData(0xFF6600, 0xFF0000, true, 1.8f, 0.5f, 0.0f));
|
||||
@@ -98,7 +98,7 @@ public class AbilitySweeper extends AbilityEnergy implements IAbilitySweeper {
|
||||
// Spawn the sweeper entity that handles BOTH visuals AND damage.
|
||||
// NPC: target is the aggro target — lockOnTarget tracks it during sweep.
|
||||
// Player: target is null — sweep rotates around caster's facing direction, lockOnTarget has no effect.
|
||||
activeEntity = new EntityAbilitySweeper(caster.worldObj, caster, target,
|
||||
activeEntity = new EntityEnergySweeper(caster.worldObj, caster, target,
|
||||
beamLength, beamWidth, beamHeight,
|
||||
displayData,
|
||||
sweepSpeed, numberOfRotations,
|
||||
|
||||
@@ -9,8 +9,8 @@ import kamkeel.npcs.controllers.data.ability.data.energy.EnergyBarrierData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyDisplayData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyPanelData;
|
||||
import kamkeel.npcs.controllers.data.telegraph.TelegraphType;
|
||||
import kamkeel.npcs.entity.EntityAbilityBarrier;
|
||||
import kamkeel.npcs.entity.EntityAbilityPanel;
|
||||
import kamkeel.npcs.entity.EntityEnergyBarrier;
|
||||
import kamkeel.npcs.entity.EntityEnergyPanel;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.client.gui.builder.FieldDef;
|
||||
@@ -61,7 +61,7 @@ public class AbilityWall extends AbilityBarrier {
|
||||
// ==================== ABSTRACT IMPLEMENTATIONS ====================
|
||||
|
||||
@Override
|
||||
protected EntityAbilityBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
protected EntityEnergyBarrier createBarrierEntity(EntityLivingBase caster, EntityLivingBase target) {
|
||||
// Place wall between caster and target
|
||||
double placeX, placeY, placeZ;
|
||||
float yaw;
|
||||
@@ -97,14 +97,14 @@ public class AbilityWall extends AbilityBarrier {
|
||||
placeY += offsetY;
|
||||
placeZ += offsetZ;
|
||||
|
||||
EntityAbilityPanel.PanelMode mode = panelData.launching
|
||||
? EntityAbilityPanel.PanelMode.LAUNCHED
|
||||
: EntityAbilityPanel.PanelMode.PLACED;
|
||||
EntityEnergyPanel.PanelMode mode = panelData.launching
|
||||
? EntityEnergyPanel.PanelMode.LAUNCHED
|
||||
: EntityEnergyPanel.PanelMode.PLACED;
|
||||
|
||||
EnergyPanelData data = panelData.copy();
|
||||
data.heightOffset = 0.0f; // Y offset now handled by base class via placeY
|
||||
|
||||
EntityAbilityPanel panel = new EntityAbilityPanel(
|
||||
EntityEnergyPanel panel = new EntityEnergyPanel(
|
||||
caster.worldObj, caster,
|
||||
placeX, placeY, placeZ, yaw, mode,
|
||||
displayData.copy(), lightningData.copy(), barrierData.copy(), data
|
||||
|
||||
Reference in new issue
Block a user