This commit is contained in:
ThisIsALegitUsername 2023-03-26 14:02:54 +00:00
parent ed4936b16a
commit ed8b43405a
12 changed files with 118901 additions and 118724 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

@ -61,7 +61,7 @@ public abstract class Mod {
if (Theme.getFontColor() == 6942069) { if (Theme.getFontColor() == 6942069) {
RenderUtils.drawChromaString(text, x, y, Theme.getTextShadow()); RenderUtils.drawChromaString(text, x, y, Theme.getTextShadow());
} else { } else {
Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, Theme.getFontColor()); Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, Theme.getFontColor(), Theme.getTextShadow());
} }
return x; return x;

View File

@ -19,6 +19,7 @@ import dev.resent.module.impl.hud.KeyStrokes;
import dev.resent.module.impl.hud.PotCounter; import dev.resent.module.impl.hud.PotCounter;
import dev.resent.module.impl.hud.PotionHUD; import dev.resent.module.impl.hud.PotionHUD;
import dev.resent.module.impl.hud.ReachDisplay; import dev.resent.module.impl.hud.ReachDisplay;
import dev.resent.module.impl.misc.AdminXray;
import dev.resent.module.impl.misc.Animations; import dev.resent.module.impl.misc.Animations;
import dev.resent.module.impl.misc.AutoGG; import dev.resent.module.impl.misc.AutoGG;
import dev.resent.module.impl.misc.AutoRespawn; import dev.resent.module.impl.misc.AutoRespawn;
@ -76,9 +77,11 @@ public class ModManager {
public static ClickGui clickGui = new ClickGui(); public static ClickGui clickGui = new ClickGui();
public static ItemPhysics itemPhysics = new ItemPhysics(); public static ItemPhysics itemPhysics = new ItemPhysics();
public static FPSOptions fpsOptions = new FPSOptions(); public static FPSOptions fpsOptions = new FPSOptions();
public static AdminXray adminXray = new AdminXray();
public ModManager() { public ModManager() {
//Hud //Hud
register(adminXray);
register(fpsOptions); register(fpsOptions);
register(itemPhysics); register(itemPhysics);
register(clickGui); register(clickGui);

View File

@ -0,0 +1,64 @@
package dev.resent.module.impl.misc;
import java.util.ArrayList;
import dev.resent.annotation.Module;
import dev.resent.module.base.Mod;
import dev.resent.module.base.Mod.Category;
import net.minecraft.block.Block;
@Module(name = "Xray", category = Category.MISC)
public class AdminXray extends Mod{
public static ArrayList<Block> xrayBlocks = new ArrayList<>();
public void onEnable(){
mc.renderGlobal.loadRenderers();
}
public void onDisable(){
mc.renderGlobal.loadRenderers();
}
public static boolean shouldRender(Block block){
return xrayBlocks.contains(block);
}
public static void initXRayBlocks() {
xrayBlocks.add(Block.getBlockFromName("coal_ore"));
xrayBlocks.add(Block.getBlockFromName("iron_ore"));
xrayBlocks.add(Block.getBlockFromName("gold_ore"));
xrayBlocks.add(Block.getBlockFromName("redstone_ore"));
xrayBlocks.add(Block.getBlockById(74));
xrayBlocks.add(Block.getBlockFromName("lapis_ore"));
xrayBlocks.add(Block.getBlockFromName("diamond_ore"));
xrayBlocks.add(Block.getBlockFromName("emerald_ore"));
xrayBlocks.add(Block.getBlockFromName("quartz_ore"));
xrayBlocks.add(Block.getBlockFromName("clay"));
xrayBlocks.add(Block.getBlockFromName("glowstone"));
xrayBlocks.add(Block.getBlockById(8));
xrayBlocks.add(Block.getBlockById(9));
xrayBlocks.add(Block.getBlockById(10));
xrayBlocks.add(Block.getBlockById(11));
xrayBlocks.add(Block.getBlockFromName("crafting_table"));
xrayBlocks.add(Block.getBlockById(61));
xrayBlocks.add(Block.getBlockById(62));
xrayBlocks.add(Block.getBlockFromName("torch"));
xrayBlocks.add(Block.getBlockFromName("ladder"));
xrayBlocks.add(Block.getBlockFromName("tnt"));
xrayBlocks.add(Block.getBlockFromName("coal_block"));
xrayBlocks.add(Block.getBlockFromName("iron_block"));
xrayBlocks.add(Block.getBlockFromName("gold_block"));
xrayBlocks.add(Block.getBlockFromName("diamond_block"));
xrayBlocks.add(Block.getBlockFromName("emerald_block"));
xrayBlocks.add(Block.getBlockFromName("redstone_block"));
xrayBlocks.add(Block.getBlockFromName("lapis_block"));
xrayBlocks.add(Block.getBlockFromName("fire"));
xrayBlocks.add(Block.getBlockFromName("mossy_cobblestone"));
xrayBlocks.add(Block.getBlockFromName("mob_spawner"));
xrayBlocks.add(Block.getBlockFromName("end_portal_frame"));
xrayBlocks.add(Block.getBlockFromName("enchanting_table"));
xrayBlocks.add(Block.getBlockFromName("bookshelf"));
xrayBlocks.add(Block.getBlockFromName("command_block"));
}
}

View File

@ -2,9 +2,8 @@ package dev.resent.module.impl.misc;
import dev.resent.annotation.RenderModule; import dev.resent.annotation.RenderModule;
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.RenderMod; import dev.resent.module.base.RenderMod;
import dev.resent.visual.ui.Theme; import dev.resent.module.base.setting.BooleanSetting;
@RenderModule(name = "ToggleSprint", category = Category.MISC, x = 4, y = 122, hasSetting = true) @RenderModule(name = "ToggleSprint", category = Category.MISC, x = 4, y = 122, hasSetting = true)
public class Sprint extends RenderMod { public class Sprint extends RenderMod {

View File

@ -22,12 +22,14 @@ import dev.resent.visual.ui.animation.Direction;
import net.lax1dude.eaglercraft.v1_8.Keyboard; import net.lax1dude.eaglercraft.v1_8.Keyboard;
import net.lax1dude.eaglercraft.v1_8.Mouse; import net.lax1dude.eaglercraft.v1_8.Mouse;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -66,6 +68,7 @@ public class ClickGUI extends GuiScreen {
Resent.INSTANCE.modManager.modsInCategory(selectedCategory).sort(Comparator.comparingInt(m -> fr.getStringWidth(m.getName()))); Resent.INSTANCE.modManager.modsInCategory(selectedCategory).sort(Comparator.comparingInt(m -> fr.getStringWidth(m.getName())));
for (Mod m : Resent.INSTANCE.modManager.modsInCategory(selectedCategory) ) { for (Mod m : Resent.INSTANCE.modManager.modsInCategory(selectedCategory) ) {
if(m.getName() != "Xray" || EntityRenderer.test){
int fh = 9; int fh = 9;
if (isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 - 1 - offset, this.x + 90 + xo - 1 + 21, height + 30 - fh * (-off) + 30 - 1 + 2 - 1 - offset) && m.doesHaveSetting() && openedMod == null) { if (isMouseInside(mouseX, mouseY, this.x + 90 + xo - 1 + 10, height - 2 - fh * -(off) + 51 - 1 - offset, this.x + 90 + xo - 1 + 21, height + 30 - fh * (-off) + 30 - 1 + 2 - 1 - offset) && m.doesHaveSetting() && openedMod == null) {
@ -94,6 +97,7 @@ public class ClickGUI extends GuiScreen {
xo += 100; xo += 100;
} }
} }
}
if (openedMod != null) { if (openedMod != null) {
int var = 0; int var = 0;
@ -189,7 +193,7 @@ public class ClickGUI extends GuiScreen {
Resent.INSTANCE.modManager.modsInCategory(selectedCategory).sort(Comparator.comparingInt(m -> fr.getStringWidth(m.getName()))); Resent.INSTANCE.modManager.modsInCategory(selectedCategory).sort(Comparator.comparingInt(m -> fr.getStringWidth(m.getName())));
for (Mod m : Resent.INSTANCE.modManager.modsInCategory(selectedCategory)) { for (Mod m : Resent.INSTANCE.modManager.modsInCategory(selectedCategory)) {
if (this.openedMod == null) { if (this.openedMod == null && m.getName() != "Xray" || this.openedMod == null && EntityRenderer.test) {
int fh = 9; int fh = 9;
if (height - 2 - fh * -(off) + 50 - 2 - offset > height + 29 && height + 40 - fh * (-off) + 30 +15 - offset < y + 20 && (introAnimation != null ? introAnimation.isDone() : true)) { if (height - 2 - fh * -(off) + 50 - 2 - offset > height + 29 && height + 40 - fh * (-off) + 30 +15 - offset < y + 20 && (introAnimation != null ? introAnimation.isDone() : true)) {
// Enabled outline // Enabled outline
@ -275,6 +279,7 @@ public class ClickGUI extends GuiScreen {
} }
} }
if(m.getName() != "Xray" || EntityRenderer.test){
if (xo > width / 2) { if (xo > width / 2) {
xo = 0; xo = 0;
off += 5; off += 5;
@ -283,6 +288,7 @@ public class ClickGUI extends GuiScreen {
} }
} }
} }
}
public boolean doesGuiPauseGame() { public boolean doesGuiPauseGame() {
return false; return false;

View File

@ -3,6 +3,7 @@ package net.minecraft.block;
import java.util.List; import java.util.List;
import dev.resent.module.base.ModManager; import dev.resent.module.base.ModManager;
import dev.resent.module.impl.misc.AdminXray;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import net.minecraft.block.material.MapColor; import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@ -398,6 +399,11 @@ public class Block {
} }
public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos) { public int getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos) {
if(ModManager.adminXray.isEnabled()){
return 99999;
}
Block block = worldIn.getBlockState(pos).getBlock(); Block block = worldIn.getBlockState(pos).getBlock();
int i = worldIn.getCombinedLight(pos, block.getLightValue()); int i = worldIn.getCombinedLight(pos, block.getLightValue());
if (i == 0 && block instanceof BlockSlab) { if (i == 0 && block instanceof BlockSlab) {
@ -410,6 +416,11 @@ public class Block {
} }
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, BlockPos blockpos, EnumFacing enumfacing) { public boolean shouldSideBeRendered(IBlockAccess iblockaccess, BlockPos blockpos, EnumFacing enumfacing) {
if(ModManager.adminXray.isEnabled()){
return AdminXray.shouldRender(this);
}
return enumfacing == EnumFacing.DOWN && this.minY > 0.0D return enumfacing == EnumFacing.DOWN && this.minY > 0.0D
? true ? true
: (enumfacing == EnumFacing.UP && this.maxY < 1.0D ? true : (enumfacing == EnumFacing.NORTH && this.minZ > 0.0D ? true : (enumfacing == EnumFacing.SOUTH && this.maxZ < 1.0D ? true : (enumfacing == EnumFacing.WEST && this.minX > 0.0D ? true : (enumfacing == EnumFacing.EAST && this.maxX < 1.0D ? true : !iblockaccess.getBlockState(blockpos).getBlock().isOpaqueCube()))))); : (enumfacing == EnumFacing.UP && this.maxY < 1.0D ? true : (enumfacing == EnumFacing.NORTH && this.minZ > 0.0D ? true : (enumfacing == EnumFacing.SOUTH && this.maxZ < 1.0D ? true : (enumfacing == EnumFacing.WEST && this.minX > 0.0D ? true : (enumfacing == EnumFacing.EAST && this.maxX < 1.0D ? true : !iblockaccess.getBlockState(blockpos).getBlock().isOpaqueCube())))));

View File

@ -25,6 +25,7 @@ import com.google.common.collect.Lists;
import dev.resent.client.Resent; import dev.resent.client.Resent;
import dev.resent.module.base.ModManager; import dev.resent.module.base.ModManager;
import dev.resent.module.impl.misc.AdminXray;
import dev.resent.util.misc.W; import dev.resent.util.misc.W;
import dev.resent.visual.ui.clickgui.PreGUI; import dev.resent.visual.ui.clickgui.PreGUI;
import net.lax1dude.eaglercraft.v1_8.Display; import net.lax1dude.eaglercraft.v1_8.Display;
@ -446,6 +447,7 @@ public class Minecraft implements IThreadListener {
SkinPreviewRenderer.initialize(); SkinPreviewRenderer.initialize();
this.checkGLError("Post startup"); this.checkGLError("Post startup");
Resent.INSTANCE.init(); Resent.INSTANCE.init();
AdminXray.initXRayBlocks();
this.ingameGUI = new GuiIngame(this); this.ingameGUI = new GuiIngame(this);
ServerList.initServerList(this); ServerList.initServerList(this);
EaglerProfile.read(); EaglerProfile.read();