mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 02:55:26 +00:00
Removed "id" field from EnumAnimationPart
This commit is contained in:
1 parent
6c9b74ceb0
commit
5af8a15de7
3 files changed
+10
-16
No files matched your search
@@ -1,17 +1,11 @@
|
||||
package noppes.npcs.constants;
|
||||
|
||||
public enum EnumAnimationPart {
|
||||
HEAD(0),
|
||||
BODY(1),
|
||||
RIGHT_ARM(2),
|
||||
LEFT_ARM(3),
|
||||
RIGHT_LEG(4),
|
||||
LEFT_LEG(5),
|
||||
FULL_MODEL(6);
|
||||
|
||||
public int id;
|
||||
|
||||
EnumAnimationPart(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
HEAD,
|
||||
BODY,
|
||||
RIGHT_ARM,
|
||||
LEFT_ARM,
|
||||
RIGHT_LEG,
|
||||
LEFT_LEG,
|
||||
FULL_MODEL;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public class FramePart implements IFramePart {
|
||||
}
|
||||
|
||||
public int getPartId() {
|
||||
return part.id;
|
||||
return part.ordinal();
|
||||
}
|
||||
|
||||
public void setPart(EnumAnimationPart part) {
|
||||
@@ -58,7 +58,7 @@ public class FramePart implements IFramePart {
|
||||
|
||||
public IFramePart setPart(int partId) {
|
||||
for (EnumAnimationPart enumPart : EnumAnimationPart.values()) {
|
||||
if (enumPart.id == partId) {
|
||||
if (enumPart.ordinal() == partId) {
|
||||
this.setPart(enumPart);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ public class NpcAPI extends AbstractNpcAPI {
|
||||
|
||||
public IFramePart createPart(int partId) {
|
||||
for (EnumAnimationPart part : EnumAnimationPart.values()) {
|
||||
if (part.id == partId) {
|
||||
if (part.ordinal() == partId) {
|
||||
return new FramePart(part);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user