mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 15:24:46 +00:00
Create Barrier Abilities + Heavy Refactoring
This commit is contained in:
1 parent
d1f2c9695c
commit
c07e9e7006
53 files changed
+1890
-1460
No files matched your search
@@ -0,0 +1,41 @@
|
||||
package noppes.npcs.scripted.entity;
|
||||
|
||||
import kamkeel.npcs.entity.EntityEnergyPanel;
|
||||
import noppes.npcs.api.entity.IEnergyPanel;
|
||||
import noppes.npcs.scripted.constants.EntityType;
|
||||
|
||||
public class ScriptEnergyPanel<T extends EntityEnergyPanel> extends ScriptEnergyBarrier<T> implements IEnergyPanel {
|
||||
|
||||
public ScriptEnergyPanel(T entity) {
|
||||
super(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return EntityType.ENERGY_PANEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean typeOf(int type) {
|
||||
return type == EntityType.ENERGY_PANEL || super.typeOf(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBarrierType() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// ==================== PANEL-SPECIFIC ====================
|
||||
|
||||
public float getPanelWidth() { return entity.getPanelData().panelWidth; }
|
||||
public void setPanelWidth(float width) { entity.getPanelData().setPanelWidth(width); }
|
||||
|
||||
public float getPanelHeight() { return entity.getPanelData().panelHeight; }
|
||||
public void setPanelHeight(float height) { entity.getPanelData().setPanelHeight(height); }
|
||||
|
||||
public float getPanelYaw() { return entity.getPanelYaw(); }
|
||||
|
||||
public int getPanelMode() { return entity.getMode().ordinal(); }
|
||||
|
||||
public boolean isLaunched() { return entity.getMode() == EntityEnergyPanel.PanelMode.LAUNCHED; }
|
||||
}
|
||||
Reference in new issue
Block a user