mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 08:02:20 +00:00
Fix to setting animation names.
This commit is contained in:
1 parent
354c9808e4
commit
e65ba59b8e
2 files changed
+9
-2
No files matched your search
@@ -450,7 +450,13 @@ public class GuiNPCManageAnimations extends GuiModelInterface implements IScroll
|
||||
FramePart part = this.editingPart();
|
||||
|
||||
if (textfield.id == 30 && !text.isEmpty()) {
|
||||
animation.name = text.replaceAll("[^a-zA-Z0-9_-]", "_");
|
||||
String nameText = text.replaceAll("[^a-zA-Z0-9_-]", "_");
|
||||
if (!scroll.getList().contains(nameText)) {
|
||||
animation.name = nameText;
|
||||
Client.sendData(EnumPacketServer.AnimationSave, prevSelected, animation.writeToNBT());
|
||||
} else {
|
||||
textfield.setText(animation.name);
|
||||
}
|
||||
} else if (textfield.id == 32) {
|
||||
if (editingMode == 0) {
|
||||
animation.speed = textfield.getFloat();
|
||||
|
||||
Reference in new issue
Block a user