mirror of
https://github.com/KAMKEEL/CustomNPC-Gecko-Addon.git
synced 2026-11-13 06:37:35 +00:00
Minor Bug Fix to GuiModelAnimation
- Fixed setAnimFile to setAttackAnim - iSubGuiListener so that when you close the GUI the names on the textfields properly update
This commit is contained in:
1 parent
27c9b92f3d
commit
96d73aafdb
1 file changed
+8
-2
@@ -9,9 +9,10 @@ import noppes.npcs.client.gui.util.*;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import software.bernie.geckolib3.resource.GeckoLibCache;
|
||||
|
||||
public class SubGuiModelAnimation extends SubGuiInterface implements ITextfieldListener {
|
||||
public class SubGuiModelAnimation extends SubGuiInterface implements ITextfieldListener, ISubGuiListener {
|
||||
public SubGuiModelAnimation(EntityNPCInterface npc){
|
||||
this.npc = npc;
|
||||
closeOnEsc = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,7 +61,7 @@ public class SubGuiModelAnimation extends SubGuiInterface implements ITextfieldL
|
||||
if(button.id==4){
|
||||
setSubGui(new GuiStringSelection(this,"Selecting geckolib attack animation:",
|
||||
AnimationFileUtil.getAnimationList(getModelData(npc).getAnimFile()),
|
||||
(name)-> getModelData(npc).setAnimFile(name)));
|
||||
(name)-> getModelData(npc).setAttackAnim(name)));
|
||||
}
|
||||
if(button.id==5){
|
||||
setSubGui(new GuiStringSelection(this,"Selecting geckolib hurt animation:",
|
||||
@@ -110,4 +111,9 @@ public class SubGuiModelAnimation extends SubGuiInterface implements ITextfieldL
|
||||
textfield.setText(getModelData(npc).getHurtAnim());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void subGuiClosed(SubGuiInterface subGuiInterface) {
|
||||
initGui();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user