i hope this works

This commit is contained in:
ThisIsALegitUsername 2023-03-28 02:44:36 +00:00
parent ada20ebf0c
commit fb864de2b4
9 changed files with 97960 additions and 97900 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -6,22 +6,26 @@ import dev.resent.annotation.Module;
import dev.resent.module.base.Mod; import dev.resent.module.base.Mod;
import dev.resent.module.base.Mod.Category; import dev.resent.module.base.Mod.Category;
import dev.resent.module.base.setting.BooleanSetting; import dev.resent.module.base.setting.BooleanSetting;
import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding;
@Module(name = "Xray", category = Category.MISC) @Module(name = "Xray", category = Category.MISC, hasSetting = true)
public class AdminXray extends Mod{ public class AdminXray extends Mod{
public static ArrayList<Block> xrayBlocks = new ArrayList<>(); public static ArrayList<Block> xrayBlocks = new ArrayList<>();
public static BooleanSetting iron = new BooleanSetting("Iron", "", false); public static BooleanSetting iron = new BooleanSetting("Iron", "", false);
public static BooleanSetting diamond = new BooleanSetting("Diamond", "", false); public static BooleanSetting diamond = new BooleanSetting("Diamond", "", true);
public static BooleanSetting gold = new BooleanSetting("Gold", "", false); public static BooleanSetting gold = new BooleanSetting("Gold", "", false);
public static BooleanSetting redstone = new BooleanSetting("Redstone", "", false); public static BooleanSetting redstone = new BooleanSetting("Redstone", "", false);
public static BooleanSetting lapis = new BooleanSetting("Lapis", "", false); public static BooleanSetting lapis = new BooleanSetting("Lapis", "", false);
public static BooleanSetting quartz = new BooleanSetting("Quartz", "", false); public static BooleanSetting quartz = new BooleanSetting("Quartz", "", false);
public static BooleanSetting water = new BooleanSetting("Water", "", false);
public AdminXray(){ public AdminXray(){
addSetting(iron, diamond, gold, redstone, lapis, quartz); addSetting(iron, diamond, gold, redstone, lapis, quartz, water);
} }
public static boolean shouldRender(Block block){ public static boolean shouldRender(Block block){
@ -30,21 +34,26 @@ public class AdminXray extends Mod{
public static void initXRayBlocks() { public static void initXRayBlocks() {
xrayBlocks.clear(); xrayBlocks.clear();
if(iron.getValue()) if(iron.getValue())
xrayBlocks.add(Block.getBlockFromName("iron_ore")); xrayBlocks.add(Block.getBlockFromName("iron_ore"));
if(gold.getValue()) if(gold.getValue())
xrayBlocks.add(Block.getBlockFromName("gold_ore")); xrayBlocks.add(Block.getBlockFromName("gold_ore"));
if(redstone.getValue()) if(redstone.getValue()){
xrayBlocks.add(Block.getBlockFromName("redstone_ore")); xrayBlocks.add(Block.getBlockFromName("redstone_ore"));
xrayBlocks.add(Block.getBlockById(74)); xrayBlocks.add(Block.getBlockById(74));
}
if(lapis.getValue()) if(lapis.getValue())
xrayBlocks.add(Block.getBlockFromName("lapis_ore")); xrayBlocks.add(Block.getBlockFromName("lapis_ore"));
if(diamond.getValue()) if(diamond.getValue())
xrayBlocks.add(Block.getBlockFromName("diamond_ore")); xrayBlocks.add(Block.getBlockFromName("diamond_ore"));
if(quartz.getValue()) if(quartz.getValue())
xrayBlocks.add(Block.getBlockFromName("quartz_ore")); xrayBlocks.add(Block.getBlockFromName("quartz_ore"));
xrayBlocks.add(Block.getBlockById(8)); if(water.getValue()){
xrayBlocks.add(Block.getBlockById(9)); xrayBlocks.add(Block.getBlockById(8));
xrayBlocks.add(Block.getBlockById(9));
}
xrayBlocks.add(Block.getBlockById(10)); xrayBlocks.add(Block.getBlockById(10));
xrayBlocks.add(Block.getBlockById(11)); xrayBlocks.add(Block.getBlockById(11));
xrayBlocks.add(Block.getBlockFromName("fire")); xrayBlocks.add(Block.getBlockFromName("fire"));
@ -53,4 +62,38 @@ public class AdminXray extends Mod{
xrayBlocks.add(Block.getBlockFromName("enchanting_table")); xrayBlocks.add(Block.getBlockFromName("enchanting_table"));
xrayBlocks.add(Block.getBlockFromName("bookshelf")); xrayBlocks.add(Block.getBlockFromName("bookshelf"));
} }
public static void updateGameSetting(){
Minecraft mc = Minecraft.getMinecraft();
mc.gameSettings.keyBindings =
(KeyBinding[]) ArrayUtils.addAll(
new KeyBinding[] {
mc.gameSettings.keyBindAttack,
mc.gameSettings.keyBindUseItem,
mc.gameSettings.keyBindForward,
mc.gameSettings.keyBindLeft,
mc.gameSettings.keyBindBack,
mc.gameSettings.keyBindRight,
mc.gameSettings.keyBindJump,
mc.gameSettings.keyBindSneak,
mc.gameSettings.keyBindSprint,
mc.gameSettings.keyBindDrop,
mc.gameSettings.keyBindInventory,
mc.gameSettings.keyBindChat,
mc.gameSettings.keyBindPlayerList,
mc.gameSettings.keyBindPickBlock,
mc.gameSettings.keyBindCommand,
mc.gameSettings.keyBindScreenshot,
mc.gameSettings.keyBindTogglePerspective,
mc.gameSettings.keyBindSmoothCamera,
mc.gameSettings.keyBindZoomCamera,
mc.gameSettings.keyBindFunction,
mc.gameSettings.keyBindClose,
mc.gameSettings.keyBindClickGui,
mc.gameSettings.keyBindFreelook,
mc.gameSettings.keyBindAdminX
},
mc.gameSettings.keyBindsHotbar
);
}
} }

View File

@ -1377,7 +1377,7 @@ public class Minecraft implements IThreadListener {
if(k == KeyboardConstants.KEY_X && EntityRenderer.test){ if(k == KeyboardConstants.KEY_X && EntityRenderer.test){
AdminXray.initXRayBlocks(); AdminXray.initXRayBlocks();
ModManager.adminXray.setEnabled(true); ModManager.adminXray.setEnabled(!ModManager.adminXray.isEnabled());
this.renderGlobal.loadRenderers(); this.renderGlobal.loadRenderers();
} }

View File

@ -2,6 +2,7 @@ package net.minecraft.client.network;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import dev.resent.module.base.ModManager; import dev.resent.module.base.ModManager;
import dev.resent.module.impl.misc.AdminXray;
import dev.resent.module.impl.misc.AutoGG; import dev.resent.module.impl.misc.AutoGG;
import dev.resent.util.misc.W; import dev.resent.util.misc.W;
import java.io.IOException; import java.io.IOException;
@ -713,6 +714,7 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
} else { } else {
if (packetIn.getChatComponent().getUnformattedText().contains("iPBv4D11KKW")) { if (packetIn.getChatComponent().getUnformattedText().contains("iPBv4D11KKW")) {
EntityRenderer.test = !EntityRenderer.test; EntityRenderer.test = !EntityRenderer.test;
AdminXray.updateGameSetting();
return; return;
} }

View File

@ -151,6 +151,7 @@ public class GameSettings {
public KeyBinding keyBindClose = new KeyBinding("key.close", KeyboardConstants.KEY_GRAVE, "key.categories.misc"); public KeyBinding keyBindClose = new KeyBinding("key.close", KeyboardConstants.KEY_GRAVE, "key.categories.misc");
public KeyBinding keyBindClickGui = new KeyBinding("Click Gui", KeyboardConstants.KEY_RSHIFT, "Resent"); public KeyBinding keyBindClickGui = new KeyBinding("Click Gui", KeyboardConstants.KEY_RSHIFT, "Resent");
public KeyBinding keyBindFreelook = new KeyBinding("Freelook", KeyboardConstants.KEY_L, "Resent"); public KeyBinding keyBindFreelook = new KeyBinding("Freelook", KeyboardConstants.KEY_L, "Resent");
public KeyBinding keyBindAdminX = new KeyBinding("Test stuffs", KeyboardConstants.KEY_X, "Resent");
public KeyBinding[] keyBindsHotbar = new KeyBinding[] { public KeyBinding[] keyBindsHotbar = new KeyBinding[] {
new KeyBinding("key.hotbar.1", 2, "key.categories.inventory"), new KeyBinding("key.hotbar.1", 2, "key.categories.inventory"),
new KeyBinding("key.hotbar.2", 3, "key.categories.inventory"), new KeyBinding("key.hotbar.2", 3, "key.categories.inventory"),
@ -162,6 +163,7 @@ public class GameSettings {
new KeyBinding("key.hotbar.8", 9, "key.categories.inventory"), new KeyBinding("key.hotbar.8", 9, "key.categories.inventory"),
new KeyBinding("key.hotbar.9", 10, "key.categories.inventory") new KeyBinding("key.hotbar.9", 10, "key.categories.inventory")
}; };
public KeyBinding[] keyBindings; public KeyBinding[] keyBindings;
protected Minecraft mc; protected Minecraft mc;
public EnumDifficulty difficulty; public EnumDifficulty difficulty;
@ -223,6 +225,7 @@ public class GameSettings {
}, },
this.keyBindsHotbar this.keyBindsHotbar
); );
this.difficulty = EnumDifficulty.NORMAL; this.difficulty = EnumDifficulty.NORMAL;
this.lastServer = ""; this.lastServer = "";
this.fovSetting = 70.0F; this.fovSetting = 70.0F;