mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 11:04:25 +00:00
Player Abilities
This commit is contained in:
1 parent
601b0d721e
commit
1b8ad4dd90
92 files changed
+2610
-1025
No files matched your search
@@ -10,7 +10,6 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -73,7 +72,7 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
/**
|
||||
* Full constructor using data classes for grouped parameters.
|
||||
*/
|
||||
public EntityAbilityOrb(World world, EntityNPCInterface owner, EntityLivingBase target,
|
||||
public EntityAbilityOrb(World world, EntityLivingBase owner, EntityLivingBase target,
|
||||
double x, double y, double z, float orbSize,
|
||||
EnergyColorData color, EnergyCombatData combat,
|
||||
EnergyHomingData homing, EnergyLightningData lightning,
|
||||
@@ -134,7 +133,7 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
* Follows anchor point and animations like in the real game.
|
||||
* Can be fired when transitioning to active phase.
|
||||
*/
|
||||
public void setupPreview(EntityNPCInterface owner, float orbSize, EnergyColorData color, EnergyLightningData lightning, EnergyAnchorData anchor, int chargeDuration) {
|
||||
public void setupPreview(EntityLivingBase owner, float orbSize, EnergyColorData color, EnergyLightningData lightning, EnergyAnchorData anchor, int chargeDuration) {
|
||||
this.setPreviewMode(true);
|
||||
this.setPreviewOwner(owner);
|
||||
|
||||
@@ -394,7 +393,7 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
float progress = getChargeProgress();
|
||||
this.size = targetSize * progress;
|
||||
|
||||
// Calculate position based on anchor point
|
||||
// Calculate position based on anchor point, offset downward by half size to center
|
||||
if (owner instanceof EntityLivingBase) {
|
||||
Vec3 pos = AnchorPointHelper.calculateAnchorPosition((EntityLivingBase) owner, anchorData);
|
||||
setPosition(pos.xCoord, pos.yCoord, pos.zCoord);
|
||||
|
||||
Reference in new issue
Block a user