mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 20:25:13 +00:00
Full Animation File Makeup
> Remove JobPuppet > Remove PlayerModelData > REWORK IAnimationPart and IAnimation
This commit is contained in:
1 parent
8e3440bc73
commit
adb581ea64
6 files changed
+296
-80
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package noppes.npcs;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
public class AnimationData extends AnimationDataShared {
|
||||
public EntityNPCInterface npc;
|
||||
|
||||
public boolean whileStanding = true;
|
||||
public boolean whileAttacking = false;
|
||||
public boolean whileMoving = false;
|
||||
|
||||
public AnimationData(EntityNPCInterface npc, Object parent){
|
||||
super(null);
|
||||
this.npc = npc;
|
||||
}
|
||||
|
||||
// CHANGE to CHECK IF PARENT IS NPC LOUIS
|
||||
@Override
|
||||
public void updateClient() {
|
||||
Server.sendToAll(EnumPacketClient.PLAYER_UPDATE_MODEL_DATA, ((PlayerData) parent).player.getCommandSenderName(), this.writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
if (!this.allowAnimation)
|
||||
return false;
|
||||
|
||||
if(!npc.isEntityAlive())
|
||||
return false;
|
||||
|
||||
if(whileAttacking && npc.isAttacking() || whileMoving && npc.isWalking() || whileStanding && !npc.isWalking())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user