mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-15 18:24:44 +00:00
Implemented animation events and made some event classes abstract.
This commit is contained in:
1 parent
51d086285e
commit
cd180e4520
6 files changed
+56
-2
No files matched your search
@@ -0,0 +1,8 @@
|
||||
package noppes.npcs.api.entity;
|
||||
|
||||
import noppes.npcs.api.handler.data.IAnimationData;
|
||||
|
||||
public interface IAnimatable {
|
||||
|
||||
IAnimationData getAnimationData();
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.jobs.IJob;
|
||||
import noppes.npcs.api.roles.IRole;
|
||||
|
||||
public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T> {
|
||||
public interface ICustomNpc<T extends EntityCreature> extends IEntityLiving<T>, IAnimatable {
|
||||
/**
|
||||
* @return Returns the current npcs size 1-30
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ import noppes.npcs.api.handler.data.ISound;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.api.overlay.ICustomOverlay;
|
||||
|
||||
public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T> {
|
||||
public interface IPlayer<T extends EntityPlayerMP> extends IEntityLivingBase<T>, IAnimatable {
|
||||
/**
|
||||
* @return Returns the displayed name of the player
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package noppes.npcs.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import noppes.npcs.api.entity.IAnimatable;
|
||||
import noppes.npcs.api.handler.data.IAnimation;
|
||||
import noppes.npcs.api.handler.data.IAnimationData;
|
||||
import noppes.npcs.api.handler.data.IFrame;
|
||||
|
||||
public interface IAnimationEvent extends ICustomNPCsEvent {
|
||||
|
||||
IAnimation getAnimation();
|
||||
|
||||
IAnimationData getAnimationData();
|
||||
|
||||
IAnimatable getEntity();
|
||||
|
||||
@Cancelable
|
||||
interface Started extends IAnimationEvent {
|
||||
|
||||
}
|
||||
|
||||
interface Ended extends IAnimationEvent {
|
||||
|
||||
}
|
||||
|
||||
interface IFrameEvent extends IAnimationEvent {
|
||||
|
||||
int getIndex();
|
||||
|
||||
IFrame getFrame();
|
||||
|
||||
interface Entered extends IFrameEvent {
|
||||
|
||||
}
|
||||
|
||||
interface Exited extends IFrameEvent {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package noppes.npcs.api.handler.data;
|
||||
|
||||
public interface IAnimation {
|
||||
|
||||
IAnimationData getParent();
|
||||
|
||||
IFrame currentFrame();
|
||||
|
||||
IFrame[] getFrames();
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package noppes.npcs.api.handler.data;
|
||||
|
||||
import noppes.npcs.api.entity.IAnimatable;
|
||||
|
||||
public interface IAnimationData {
|
||||
|
||||
IAnimatable getEntity();
|
||||
|
||||
void updateClient();
|
||||
|
||||
boolean isActive();
|
||||
|
||||
Reference in new issue
Block a user