Merge pull request #57 from Silent-Client/TEST2

Test2
This commit is contained in:
kirillsaint 2023-10-11 14:27:06 +06:00 committed by GitHub
commit 7927914989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -414,17 +414,17 @@ public class AdminRender extends GuiScreen {
this.currentFrame = 0; this.currentFrame = 0;
break; break;
case "wings": case "wings":
((AbstractClientPlayerExt) mc.thePlayer).silent$setWings(new TestAnimatedResourceLocation(adminRenderPath.listFiles().length - 1, 150)); ((AbstractClientPlayerExt) mc.thePlayer).silent$setWings(new TestAnimatedResourceLocation(adminRenderPath.listFiles().length, 150));
this.frames = 1; this.frames = 1;
this.currentFrame = 0; this.currentFrame = 0;
break; break;
case "bandana": case "bandana":
((AbstractClientPlayerExt) mc.thePlayer).silent$setBandana(new TestAnimatedResourceLocation(adminRenderPath.listFiles().length - 1, 150)); ((AbstractClientPlayerExt) mc.thePlayer).silent$setBandana(new TestAnimatedResourceLocation(adminRenderPath.listFiles().length, 150));
this.frames = ((AbstractClientPlayerExt) mc.thePlayer).silent$getBandana().getFrames(); this.frames = ((AbstractClientPlayerExt) mc.thePlayer).silent$getBandana().getFrames();
this.currentFrame = 0; this.currentFrame = 0;
break; break;
case "shield": case "shield":
((AbstractClientPlayerExt) mc.thePlayer).silent$setShield(new ShieldData(new TestAnimatedResourceLocation(adminRenderPath.listFiles().length - 1, 150), model)); ((AbstractClientPlayerExt) mc.thePlayer).silent$setShield(new ShieldData(new TestAnimatedResourceLocation(adminRenderPath.listFiles().length, 150), model));
this.frames = ((AbstractClientPlayerExt) mc.thePlayer).silent$getShield().getTexture().getFrames(); this.frames = ((AbstractClientPlayerExt) mc.thePlayer).silent$getShield().getTexture().getFrames();
this.currentFrame = 0; this.currentFrame = 0;
break; break;

View File

@ -44,7 +44,7 @@ public class QuickplayModeGui extends SilentScreen {
this.silentInputs.clear(); this.silentInputs.clear();
this.buttonList.add(new IconButton(0, this.width - 14 - 3, 3, 14, 14, 8, 8, new ResourceLocation("silentclient/icons/exit.png"))); this.buttonList.add(new IconButton(0, this.width - 14 - 3, 3, 14, 14, 8, 8, new ResourceLocation("silentclient/icons/exit.png")));
for(QuickPlayMod.QuickplayCommandType quickplayMode : quickplayMode.modes) { for(QuickPlayMod.QuickplayCommandType quickplayMode : quickplayMode.modes) {
this.silentInputs.add(new Input(quickplayMode.name, Client.getInstance().getSettingsManager().getSettingByClass(QuickPlayMod.class, String.format("Quickplay Mode:%s:%s", Server.isRuHypixel() ? "RuHypixel" : "Hypixel", quickplayMode.command)).getKeybind())); this.silentInputs.add(new Input(quickplayMode.name, Client.getInstance().getSettingsManager().getSettingByClass(QuickPlayMod.class, String.format("Quickplay Mode&%s&%s", Server.isRuHypixel() ? "RuHypixel" : "Hypixel", quickplayMode.command)).getKeybind()));
} }
} }
@ -180,7 +180,7 @@ public class QuickplayModeGui extends SilentScreen {
for(QuickPlayMod.QuickplayCommandType quickplayMode : quickplayMode.modes) { for(QuickPlayMod.QuickplayCommandType quickplayMode : quickplayMode.modes) {
if(silentInputs.get(inputIndex).isFocused()) { if(silentInputs.get(inputIndex).isFocused()) {
this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode); this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode);
Client.getInstance().getSettingsManager().getSettingByClass(QuickPlayMod.class, String.format("Quickplay Mode:%s:%s", Server.isRuHypixel() ? "RuHypixel" : "Hypixel", quickplayMode.command)).setKeybind(this.silentInputs.get(inputIndex).getKey()); Client.getInstance().getSettingsManager().getSettingByClass(QuickPlayMod.class, String.format("Quickplay Mode&%s&%s", Server.isRuHypixel() ? "RuHypixel" : "Hypixel", quickplayMode.command)).setKeybind(this.silentInputs.get(inputIndex).getKey());
if(keyCode == Keyboard.KEY_ESCAPE) { if(keyCode == Keyboard.KEY_ESCAPE) {
neededKeyCheck = false; neededKeyCheck = false;
break; break;

View File

@ -54,7 +54,7 @@ public class QuickPlayMod extends Mod {
Client.logger.info(String.format("Initialising Hypixel Quickplay Mode (%s)", mode.name)); Client.logger.info(String.format("Initialising Hypixel Quickplay Mode (%s)", mode.name));
mode.modes.forEach((command) -> { mode.modes.forEach((command) -> {
Client.logger.info(String.format("Initialising Hypixel Quickplay Mode (%s) Command (%s)", mode.name, command.name)); Client.logger.info(String.format("Initialising Hypixel Quickplay Mode (%s) Command (%s)", mode.name, command.name));
this.addKeybindSetting("Quickplay Mode:Hypixel:"+command.command, this, -1); this.addKeybindSetting("Quickplay Mode&Hypixel&"+command.command, this, -1);
}); });
} }
} catch (Exception err) { } catch (Exception err) {
@ -80,7 +80,7 @@ public class QuickPlayMod extends Mod {
Client.logger.info(String.format("Initialising RuHypixel Quickplay Mode (%s)", mode.name)); Client.logger.info(String.format("Initialising RuHypixel Quickplay Mode (%s)", mode.name));
mode.modes.forEach((command) -> { mode.modes.forEach((command) -> {
Client.logger.info(String.format("Initialising RuHypixel Quickplay Mode (%s) Command (%s)", mode.name, command.name)); Client.logger.info(String.format("Initialising RuHypixel Quickplay Mode (%s) Command (%s)", mode.name, command.name));
this.addKeybindSetting("Quickplay Mode:RuHypixel:"+command.command, this, -1); this.addKeybindSetting("Quickplay Mode&RuHypixel&"+command.command, this, -1);
}); });
} }
} catch (Exception err) { } catch (Exception err) {
@ -120,7 +120,7 @@ public class QuickPlayMod extends Mod {
if(sending) { if(sending) {
return; return;
} }
String[] args = setting.getName().split(":"); String[] args = setting.getName().split("&");
if(((args[1].equals("Hypixel") && Server.isHypixel()) || (args[1].equals("RuHypixel") && Server.isRuHypixel())) && setting.isKeyDown()) { if(((args[1].equals("Hypixel") && Server.isHypixel()) || (args[1].equals("RuHypixel") && Server.isRuHypixel())) && setting.isKeyDown()) {
runCommand(args[2]); runCommand(args[2]);
} }