optimised some code

This commit is contained in:
Stachelbeere1248 2023-11-18 02:24:04 +01:00
parent acb51e6a3a
commit c8becf865a
7 changed files with 0 additions and 47 deletions

View file

@ -1,13 +1,11 @@
package com.github.stachelbeere1248.zombiesutils.commands;
import com.github.stachelbeere1248.zombiesutils.timer.Timer;
import com.github.stachelbeere1248.zombiesutils.timer.recorder.Category;
import com.github.stachelbeere1248.zombiesutils.utils.Scoreboard;
import net.minecraft.command.*;
import net.minecraft.util.BlockPos;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;

View file

@ -1,15 +1,11 @@
package com.github.stachelbeere1248.zombiesutils.config;
import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import org.lwjgl.input.Keyboard;
public class Hotkeys {
private final KeyBinding chatMacro;
private final KeyBinding debug;
public Hotkeys() {
chatMacro = new KeyBinding(
@ -17,20 +13,11 @@ public class Hotkeys {
Keyboard.KEY_Q,
"Zombies Utils"
);
debug = new KeyBinding(
"Debug",
Keyboard.KEY_K,
"Zombies Utils"
);
}
public void registerAll() {
ClientRegistry.registerKeyBinding(this.chatMacro);
ClientRegistry.registerKeyBinding(this.debug);
}
public KeyBinding getChatMacro() {
return chatMacro;
}
public KeyBinding getDebugger() {
return debug;
}
}

View file

@ -2,7 +2,6 @@ package com.github.stachelbeere1248.zombiesutils.game;
import org.jetbrains.annotations.NotNull;
@SuppressWarnings("DuplicatedCode")
public class GameMode {
public static GameMode currentGameMode = null;
private final Map map;

View file

@ -1,9 +1,5 @@
package com.github.stachelbeere1248.zombiesutils.game.windows;
import com.github.stachelbeere1248.zombiesutils.ZombiesUtils;
import java.util.Arrays;
public class Window {
private final short[] xyz = new short[3];
private final int id;

View file

@ -4,33 +4,12 @@ import com.github.stachelbeere1248.zombiesutils.ZombiesUtils;
import com.github.stachelbeere1248.zombiesutils.config.Hotkeys;
import com.github.stachelbeere1248.zombiesutils.config.ZombiesUtilsConfig;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import org.lwjgl.input.Keyboard;
public class KeyInputHandler {
/*
@SuppressWarnings("SpellCheckingInspection")
private final String[] secret = new String[]{
"Rule #1: Use Zombies Utils.",
"Rule #2: Use the god damn maarkro.",
"Rule #3: Be as toxic as possible (not).",
"Rule #4: /friend remove 9c3584fe963d4d579081e7e9e225763d",
"Rule #5: Play legit.",
"Rule #6: Don't type wave 3.",
"Rule #7: Don't trust shotgun.",
"Rule #8: Hit your wallshots.",
"Rule #9: Start the recording right now.",
"Rule #10: Don't s1 on wr pace.",
"Rule #11: There can be only one GOAT.",
"Rule #12: Fast T please.",
"Rule #13: Step back if insta.",
"Rule #14: No killing Teammates.",
"rule #15: No arguing because prplx is always left."
};
private int secretIndex = 0;*/
@SubscribeEvent
public void onKeyInput(InputEvent.KeyInputEvent event) {
if (Keyboard.getEventKeyState() && Minecraft.getMinecraft().currentScreen == null) {
@ -39,10 +18,6 @@ public class KeyInputHandler {
Minecraft.getMinecraft().thePlayer.sendChatMessage(
ZombiesUtilsConfig.getChatMacro()
);
} else if (Keyboard.getEventKey() == hotkeys.getDebugger().getKeyCode()) {
for (Entity entity:Minecraft.getMinecraft().theWorld.loadedEntityList) {
System.out.println(entity.getNBTTagCompound());
}
}
}
}

View file

@ -1,7 +1,6 @@
package com.github.stachelbeere1248.zombiesutils.handlers;
import com.github.stachelbeere1248.zombiesutils.utils.Scoreboard;
import net.minecraftforge.client.event.sound.PlaySoundEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.jetbrains.annotations.NotNull;

View file

@ -4,7 +4,6 @@ import com.github.stachelbeere1248.zombiesutils.ZombiesUtils;
import com.github.stachelbeere1248.zombiesutils.game.GameMode;
import com.github.stachelbeere1248.zombiesutils.timer.Timer;
import com.github.stachelbeere1248.zombiesutils.utils.Scoreboard;
import net.minecraft.client.Minecraft;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.network.play.server.S29PacketSoundEffect;
import net.minecraft.network.play.server.S45PacketTitle;