Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey!
I want to make an EntityESP. The EntityESP should color-mark the outlines of the mobs through the walls.
The only problem is that the entity also changes color with my method.
Screen:
https://prnt.sc/26kyk2n

My Method:
 

Quote

public static void entityESPBox(Entity entity, int mode)
    {
        GL11.glBlendFunc(770, 771);
        GL11.glEnable(GL11.GL_BLEND);
        GL11.glLineWidth(1.0F);
        GL11.glDisable(GL11.GL_TEXTURE_2D);
        GL11.glDisable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(false);
        if(mode == 0)// Enemy
            GL11.glColor4d(
                1 - Minecraft.getMinecraft().thePlayer
                    .getDistanceToEntity(entity) / 40,
                Minecraft.getMinecraft().thePlayer.getDistanceToEntity(entity) / 40,
                0, 0.5F);
        else if(mode == 1)// Friend
            GL11.glColor4d(0, 0, 1, 0.5F);
        else if(mode == 2)// Other
            GL11.glColor4d(1, 1, 0, 0.5F);
        else if(mode == 3)// Target
            GL11.glColor4d(1, 0, 0, 0.5F);
        else if(mode == 4)// Team
            GL11.glColor4d(0, 1, 0, 0.5F);
        Minecraft.getMinecraft().getRenderManager();
        
        RenderGlobal.drawSelectionBoundingBox(
                new AxisAlignedBB(
                entity.getCollisionBoundingBox().minX
                    - 0.05
                    - entity.posX
                    + (entity.posX - Minecraft.getMinecraft()
                        .getRenderManager().viewerPosX),
                entity.getCollisionBoundingBox().minY
                    - entity.posY
                    + (entity.posY - Minecraft.getMinecraft()
                        .getRenderManager().viewerPosY),
                entity.getCollisionBoundingBox().minZ
                    - 0.05
                    - entity.posZ
                    + (entity.posZ - Minecraft.getMinecraft()
                        .getRenderManager().viewerPosZ),
                entity.getCollisionBoundingBox().maxX
                    + 0.05
                    - entity.posX
                    + (entity.posX - Minecraft.getMinecraft()
                        .getRenderManager().viewerPosX),
                entity.getCollisionBoundingBox().maxY
                    + 0.1
                    - entity.posY
                    + (entity.posY - Minecraft.getMinecraft()
                        .getRenderManager().viewerPosY),
                entity.getCollisionBoundingBox().maxZ
                    + 0.05
                    - entity.posZ
                    + (entity.posZ - Minecraft.getMinecraft()
                        .getRenderManager().viewerPosZ)));
        GL11.glEnable(GL11.GL_TEXTURE_2D);
        GL11.glEnable(GL11.GL_DEPTH_TEST);
        GL11.glDepthMask(true);
        GL11.glDisable(GL11.GL_BLEND);
    }

Can anyone help me?

Guest
This topic is now closed to further replies.

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.