Java Code Examples for net.minecraft.client.renderer.entity.RenderManager#renderPosX()

The following examples show how to use net.minecraft.client.renderer.entity.RenderManager#renderPosX() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IronChestFinder.java    From ehacks-pro with GNU General Public License v3.0 8 votes vote down vote up
@Override
public void onWorldRender(RenderWorldLastEvent event) {
    try {
        for (Object o : Wrapper.INSTANCE.world().loadedTileEntityList) {
            if (Class.forName("cpw.mods.ironchest.TileEntityIronChest").isInstance(o)) {
                TileEntity chest = (TileEntity) o;
                double renderX = chest.xCoord - RenderManager.renderPosX;
                double renderY = chest.yCoord - RenderManager.renderPosY;
                double renderZ = chest.zCoord - RenderManager.renderPosZ;
                GL11.glPushMatrix();
                GL11.glTranslated(renderX, renderY, renderZ);
                GL11.glColor3f(1.0f, 1.0f, 0.0f);
                AltAxisAlignedBB boundingBox = AltAxisAlignedBB.getBoundingBox(0.0, 0.0, 0.0, 1.0, 1.0, 1.0);
                GL11.glColor4f(0.0f, 1.0f, 1.0f, 0.1f);
                GLUtils.startDrawingESPs(boundingBox, 0.3f, 0.8f, 1.0f);
                GL11.glPopMatrix();
            }
        }
    } catch (Exception e) {

    }
}
 
Example 2
Source File: BlockOverlay.java    From ehacks-pro with GNU General Public License v3.0 5 votes vote down vote up
private void drawESP(MovingObjectPosition position) {
    GL11.glPushMatrix();
    GL11.glEnable(3042);
    GL11.glBlendFunc(770, 771);
    GL11.glLineWidth(1.0f);
    GL11.glDisable(2896);
    GL11.glDisable(3553);
    GL11.glEnable(2848);
    GL11.glDisable(2929);
    GL11.glDepthMask(false);
    double blockX = RenderManager.renderPosX;
    double blockY = RenderManager.renderPosY;
    double blockZ = RenderManager.renderPosZ;
    Block block = Wrapper.INSTANCE.world().getBlock(position.blockX, position.blockY, position.blockZ);
    GL11.glColor4f(0.0f, 0.0f, 0.0f, 0.2f);
    BlockOverlay.drawOutlinedBoundingBox(block.getSelectedBoundingBoxFromPool(Wrapper.INSTANCE.world(), position.blockX, position.blockY, position.blockZ).expand(0.002, 0.002, 0.002).getOffsetBoundingBox(-blockX, -blockY, -blockZ));
    GL11.glColor4f(0.0f, 0.4f, 0.0f, 0.2f);
    BlockOverlay.drawBoundingBox(block.getSelectedBoundingBoxFromPool(Wrapper.INSTANCE.world(), position.blockX, position.blockY, position.blockZ).expand(0.002, 0.002, 0.002).getOffsetBoundingBox(-blockX, -blockY, -blockZ));
    GL11.glLineWidth(1.0f);
    GL11.glDisable(2848);
    GL11.glEnable(3553);
    GL11.glEnable(2896);
    GL11.glEnable(2929);
    GL11.glDepthMask(true);
    GL11.glDisable(3042);
    GL11.glPopMatrix();
}
 
Example 3
Source File: XRay.java    From ehacks-pro with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onWorldRender(RenderWorldLastEvent event) {
    if (Wrapper.INSTANCE.world() != null && displayListId != 0) {
        double doubleX = RenderManager.renderPosX;
        double doubleY = RenderManager.renderPosY;
        double doubleZ = RenderManager.renderPosZ;
        GL11.glPushMatrix();
        GL11.glTranslated((-doubleX), (-doubleY), (-doubleZ));
        GL11.glCallList(displayListId);
        GL11.glPopMatrix();
    }
}