This commit is contained in:
ThisIsALegitUsername 2023-03-28 04:06:07 +00:00
parent 79c405d50a
commit 8b76370314
5 changed files with 52458 additions and 52465 deletions

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

@ -9,54 +9,45 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderGlobal; import net.minecraft.client.renderer.RenderGlobal;
import net.minecraft.tileentity.TileEntityMobSpawner; import net.minecraft.tileentity.TileEntityMobSpawner;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
@Module(name = "ESP", category = Category.HUD) @Module(name = "ESP", category = Category.HUD)
public class AdminSpawner extends Mod { public class AdminSpawner extends Mod {
public void draw(){ public void render(){
for(Object o: mc.theWorld.loadedTileEntityList) { for(Object o: mc.theWorld.loadedTileEntityList) {
if(o instanceof TileEntityMobSpawner) { if(o instanceof TileEntityMobSpawner) {
blockESPBox(((TileEntityMobSpawner)o).getPos()); box(((TileEntityMobSpawner)o));
} }
} }
} }
public static void box(TileEntityMobSpawner entity)
{
GlStateManager.blendFunc(770, 771);
GlStateManager.enableBlend();
EaglercraftGPU.glLineWidth(4.0F);
GlStateManager.disableTexture2D();
GlStateManager.disableDepth();
GlStateManager.depthMask(false);
GlStateManager.color(1F, 0.5F, 0.5F, 0.5F);
Minecraft.getMinecraft().getRenderManager();
RenderGlobal.func_181561_a(
new AxisAlignedBB(
entity.getPos().getX()-Minecraft.getMinecraft().getRenderManager().renderPosX+0.1,
entity.getPos().getY()-Minecraft.getMinecraft().getRenderManager().renderPosY+0.1,
entity.getPos().getZ()-Minecraft.getMinecraft().getRenderManager().renderPosZ+0.1,
entity.getPos().getX() -Minecraft.getMinecraft().getRenderManager().renderPosX+0.9,
entity.getPos().getY() -Minecraft.getMinecraft().getRenderManager().renderPosY+0.9,
entity.getPos().getZ()-Minecraft.getMinecraft().getRenderManager().renderPosZ+0.9));
GlStateManager.enableTexture2D();
GlStateManager.enableDepth();
GlStateManager.depthMask(true);
GlStateManager.disableBlend();
}
@Override @Override
public boolean isAdmin(){ public boolean isAdmin(){
return true; return true;
} }
public static void blockESPBox(BlockPos blockPos) {
Minecraft mc = Minecraft.getMinecraft();
double x =
blockPos.getX()
- mc.getRenderManager().renderPosX;
double y =
blockPos.getY()
- mc.getRenderManager().renderPosY;
double z =
blockPos.getZ()
- mc.getRenderManager().renderPosZ;
GlStateManager.disableCull();
GlStateManager.blendFunc(770, 771);
GlStateManager.enableBlend();
EaglercraftGPU.glLineWidth(4.0F);
GlStateManager.color(0, 0, 1, 0.15F);
GlStateManager.disableTexture2D();
GlStateManager.disableAlpha();
GlStateManager.depthMask(false);
//Box
GlStateManager.color(0, 0, 1, 0.5F);
RenderGlobal.func_181561_a(new AxisAlignedBB(x, y, z, x + 1.0, y + 1.0, z + 1.0));
GlStateManager.enableTexture2D();
GlStateManager.enableDepth();
GlStateManager.depthMask(true);
GlStateManager.disableBlend();
GlStateManager.enableCull();
GlStateManager.resetColor();
}
} }

View File

@ -1196,7 +1196,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
this.mc.mcProfiler.endStartSection("hand"); this.mc.mcProfiler.endStartSection("hand");
ModManager.adminSpawner.draw(); ModManager.adminSpawner.render();
if (this.renderHand) { if (this.renderHand) {
GlStateManager.clear(GL_DEPTH_BUFFER_BIT); GlStateManager.clear(GL_DEPTH_BUFFER_BIT);
this.renderHand(partialTicks, pass); this.renderHand(partialTicks, pass);