many fixes

This commit is contained in:
ThisIsALegitUsername 2023-03-28 00:05:22 +00:00
parent ed8b43405a
commit ada20ebf0c
11 changed files with 122232 additions and 122244 deletions

View File

@ -4,5 +4,6 @@
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx4G -Xms100m -Xlog:disable",
"editor.tabCompletion": "on",
"diffEditor.codeLens": true,
"java.configuration.updateBuildConfiguration": "automatic"
"java.configuration.updateBuildConfiguration": "automatic",
"java.compile.nullAnalysis.mode": "disabled"
}

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

@ -5,6 +5,7 @@ import java.util.ArrayList;
import dev.resent.annotation.Module;
import dev.resent.module.base.Mod;
import dev.resent.module.base.Mod.Category;
import dev.resent.module.base.setting.BooleanSetting;
import net.minecraft.block.Block;
@Module(name = "Xray", category = Category.MISC)
@ -12,53 +13,44 @@ public class AdminXray extends Mod{
public static ArrayList<Block> xrayBlocks = new ArrayList<>();
public void onEnable(){
mc.renderGlobal.loadRenderers();
}
public static BooleanSetting iron = new BooleanSetting("Iron", "", false);
public static BooleanSetting diamond = new BooleanSetting("Diamond", "", false);
public static BooleanSetting gold = new BooleanSetting("Gold", "", false);
public static BooleanSetting redstone = new BooleanSetting("Redstone", "", false);
public static BooleanSetting lapis = new BooleanSetting("Lapis", "", false);
public static BooleanSetting quartz = new BooleanSetting("Quartz", "", false);
public void onDisable(){
mc.renderGlobal.loadRenderers();
}
public AdminXray(){
addSetting(iron, diamond, gold, redstone, lapis, quartz);
}
public static boolean shouldRender(Block block){
return xrayBlocks.contains(block);
}
public static void initXRayBlocks() {
xrayBlocks.add(Block.getBlockFromName("coal_ore"));
xrayBlocks.clear();
if(iron.getValue())
xrayBlocks.add(Block.getBlockFromName("iron_ore"));
if(gold.getValue())
xrayBlocks.add(Block.getBlockFromName("gold_ore"));
if(redstone.getValue())
xrayBlocks.add(Block.getBlockFromName("redstone_ore"));
xrayBlocks.add(Block.getBlockById(74));
if(lapis.getValue())
xrayBlocks.add(Block.getBlockFromName("lapis_ore"));
if(diamond.getValue())
xrayBlocks.add(Block.getBlockFromName("diamond_ore"));
xrayBlocks.add(Block.getBlockFromName("emerald_ore"));
if(quartz.getValue())
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

@ -10,6 +10,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;

View File

@ -40,6 +40,7 @@ import net.lax1dude.eaglercraft.v1_8.futures.FutureTask;
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFuture;
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFutureTask;
import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput;
import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
@ -1374,6 +1375,12 @@ public class Minecraft implements IThreadListener {
this.displayGuiScreen(new PreGUI());
}
if(k == KeyboardConstants.KEY_X && EntityRenderer.test){
AdminXray.initXRayBlocks();
ModManager.adminXray.setEnabled(true);
this.renderGlobal.loadRenderers();
}
if (k == 32 && Keyboard.isKeyDown(61) && this.ingameGUI != null) {
this.ingameGUI.getChatGUI().clearChatMessages();
}

View File

@ -5,6 +5,10 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_COLOR;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SRC_ALPHA;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
@ -12,12 +16,7 @@ import com.google.common.collect.Lists;
import dev.resent.client.Resent;
import dev.resent.module.base.RenderMod;
import dev.resent.util.misc.W;
import dev.resent.util.render.Color;
import dev.resent.visual.ui.animation.SimpleAnimation;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;

View File

@ -657,7 +657,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
}
public void enableLightmap() {
if(!ModManager.fpsOptions.lightUpdates.getValue() || !ModManager.fullbright.isEnabled())
if(ModManager.fpsOptions.lightUpdates.getValue() || ModManager.fullbright.isEnabled())
return;
GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);