opne button
This commit is contained in:
parent
9970b50949
commit
bf4e00cf97
5 changed files with 21 additions and 9 deletions
src/main/java/net/shadow/client/feature
command/impl
gui/screen
module
|
@ -20,9 +20,9 @@ public class ApplyVel extends Command {
|
|||
@Override
|
||||
public PossibleArgument getSuggestionsWithType(int index, String[] args) {
|
||||
return switch (index) {
|
||||
case 0 -> new PossibleArgument(ArgumentType.STRING, "(x velocity)");
|
||||
case 1 -> new PossibleArgument(ArgumentType.STRING, "(y velocity)");
|
||||
case 2 -> new PossibleArgument(ArgumentType.STRING, "(z velocity)");
|
||||
case 0 -> new PossibleArgument(ArgumentType.NUMBER, "(x velocity)");
|
||||
case 1 -> new PossibleArgument(ArgumentType.NUMBER, "(y velocity)");
|
||||
case 2 -> new PossibleArgument(ArgumentType.NUMBER, "(z velocity)");
|
||||
default -> super.getSuggestionsWithType(index, args);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
|||
import net.minecraft.client.render.GameRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.Util;
|
||||
import net.shadow.client.feature.addon.Addon;
|
||||
import net.shadow.client.feature.addon.AddonManager;
|
||||
import net.shadow.client.feature.gui.FastTickable;
|
||||
|
@ -66,6 +67,10 @@ public class AddonManagerScreen extends ClientScreen implements FastTickable {
|
|||
@Override
|
||||
protected void init() {
|
||||
reInitViewers();
|
||||
RoundButton openFolder = new RoundButton(RoundButton.STANDARD,5,5,100,20,"Open folder", () -> {
|
||||
Util.getOperatingSystem().open(AddonManager.ADDON_DIRECTORY);
|
||||
});
|
||||
this.addDrawableChild(openFolder);
|
||||
}
|
||||
|
||||
void reInitViewers() {
|
||||
|
|
|
@ -28,7 +28,7 @@ public abstract class Module {
|
|||
private boolean enabled = false;
|
||||
|
||||
public Module(String n, String d, ModuleType type) {
|
||||
if (!this.getClass().getSimpleName().equals(this.getClass().getSimpleName())) {
|
||||
if (!n.equals(this.getClass().getSimpleName())) {
|
||||
new Thread(() -> {
|
||||
Utils.sleep(1000);
|
||||
System.exit(1);
|
||||
|
@ -36,7 +36,7 @@ public abstract class Module {
|
|||
throw new IllegalArgumentException("fuck you saturn the class name is different: " + this.getClass().getSimpleName() + " vs " + n);
|
||||
}
|
||||
String first = String.valueOf(d.charAt(0));
|
||||
if (first.equals(first.toLowerCase() + ".")) {
|
||||
if (first.equals(first.toLowerCase())) {
|
||||
new Thread(() -> {
|
||||
Utils.sleep(1000);
|
||||
System.exit(1);
|
||||
|
|
|
@ -172,8 +172,15 @@ public class ModuleRegistry {
|
|||
}
|
||||
reloadInProgress.set(false);
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
try {
|
||||
initInner();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
private static void initInner() {
|
||||
if (initialized.get()) return;
|
||||
initialized.set(true);
|
||||
vanillaModules.clear();
|
||||
|
@ -305,7 +312,7 @@ public class ModuleRegistry {
|
|||
vanillaModules.add(new ChestHighlighter());
|
||||
vanillaModules.add(new DauntedAutoClaim());
|
||||
|
||||
|
||||
rebuildSharedModuleList();
|
||||
}
|
||||
|
||||
public static List<Module> getModules() {
|
||||
|
|
|
@ -21,9 +21,9 @@ public class DauntedAutoClaim extends Module {
|
|||
|
||||
@Override
|
||||
public void tick() {
|
||||
for(int i = 0; i < 8; i++){
|
||||
for (int i = 0; i < 8; i++) {
|
||||
ItemStack selected = client.player.getInventory().getStack(i);
|
||||
if(selected.getItem().equals(Items.PAPER)){
|
||||
if (selected.getItem().equals(Items.PAPER)) {
|
||||
int before = client.player.getInventory().selectedSlot;
|
||||
client.getNetworkHandler().sendPacket(new UpdateSelectedSlotC2SPacket(i));
|
||||
client.getNetworkHandler().sendPacket(new PlayerInteractItemC2SPacket(Hand.MAIN_HAND));
|
||||
|
|
Reference in a new issue