mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 16:55:12 +00:00
Various Fixes to CNPC Abilities
- super slow speed orb has weird properites, after awhile it flies weirdly - Binding HUD scroll key to middle mouse button crashes client - Zero Knockback still does knockback to CNPCs - Charge: the telegraph is where you are looking but you actuually charge where your current body rotation is instead - using slam mid air makes it not work correctly - Beam disappears after going out of the render distance but still fires - Player vortex can only pull one target Slam now takes current height when being used to calculate damage
This commit is contained in:
1 parent
ec60a9bb21
commit
d2d5bcc59b
15 files changed
+317
-95
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package kamkeel.npcs.entity;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyAnchorData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyCombatData;
|
||||
import kamkeel.npcs.controllers.data.ability.data.energy.EnergyDisplayData;
|
||||
@@ -67,6 +69,16 @@ public class EntityAbilityBeam extends EntityEnergyProjectile {
|
||||
super(world);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance) {
|
||||
// Beam can extend far from entity position (head); use a generous render distance
|
||||
// that accounts for the full beam length (origin to head)
|
||||
double headDist = Math.sqrt(headOffsetX * headOffsetX + headOffsetY * headOffsetY + headOffsetZ * headOffsetZ);
|
||||
double range = Math.max(128.0D, headDist * 2.0D + 64.0D);
|
||||
return distance < range * range;
|
||||
}
|
||||
|
||||
private static BeamMode modeFromAnchored(boolean anchored) {
|
||||
return anchored ? BeamMode.ANCHORED : BeamMode.FREE_TRAIL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user