mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 22:15:06 +00:00
Added get/setRotationType to ScriptNpc. Added get/setMotion for x, y, z components to ScriptEntity. Fixed an NPC wand crash.
This commit is contained in:
1 parent
e676c808e3
commit
e6f97784ff
6 files changed
+68
-27
No files matched your search
@@ -2,10 +2,7 @@ package noppes.npcs.scripted.entity;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.constants.EnumAnimation;
|
||||
import noppes.npcs.constants.EnumJobType;
|
||||
import noppes.npcs.constants.EnumNavType;
|
||||
import noppes.npcs.constants.EnumRoleType;
|
||||
import noppes.npcs.constants.*;
|
||||
import noppes.npcs.controllers.Line;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
@@ -90,6 +87,17 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
npc.ai.orientation = (int)rotation;
|
||||
super.setRotation(rotation);
|
||||
}
|
||||
public void setRotationType(int rotationType){
|
||||
for (EnumStandingType e : EnumStandingType.values()) {
|
||||
if (e.ordinal() == rotationType) {
|
||||
npc.ai.standingType = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
public int getRotationType(){
|
||||
return npc.ai.standingType.ordinal();
|
||||
}
|
||||
/**
|
||||
* @param name The name of the npc
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user