mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 08:29:05 +00:00
Fix Beam and Laser Scripting
This commit is contained in:
1 parent
f546bd72b8
commit
2e21b36796
3 files changed
+53
-1
No files matched your search
@@ -3,6 +3,7 @@ package noppes.npcs.scripted.entity;
|
||||
import kamkeel.npcs.entity.EntityAbilityBeam;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import noppes.npcs.api.entity.IEnergyBeam;
|
||||
import noppes.npcs.api.entity.IEntity;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
|
||||
public class ScriptEnergyBeam<T extends EntityAbilityBeam> extends ScriptEnergyProjectile<T> implements IEnergyBeam {
|
||||
@@ -62,4 +63,22 @@ public class ScriptEnergyBeam<T extends EntityAbilityBeam> extends ScriptEnergyP
|
||||
protected void launchFromOwner(EntityLivingBase target) {
|
||||
entity.startFiring(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fireAt(IEntity target) {
|
||||
entity.setAttachedToOwner(false);
|
||||
super.fireAt(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fireAt(double x, double y, double z) {
|
||||
entity.setAttachedToOwner(false);
|
||||
super.fireAt(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fireDirection(float yaw, float pitch) {
|
||||
entity.setAttachedToOwner(false);
|
||||
super.fireDirection(yaw, pitch);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user