本文整理匯總了Java中net.minecraft.client.renderer.RenderGlobal.drawOutlinedBoundingBox方法的典型用法代碼示例。如果您正苦於以下問題:Java RenderGlobal.drawOutlinedBoundingBox方法的具體用法?Java RenderGlobal.drawOutlinedBoundingBox怎麽用?Java RenderGlobal.drawOutlinedBoundingBox使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.renderer.RenderGlobal
的用法示例。
在下文中一共展示了RenderGlobal.drawOutlinedBoundingBox方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: drawHighlight
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
public boolean drawHighlight(final MovingObjectPosition hit, final EntityPlayer player, final float frame) {
GL11.glEnable(3042);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
GL11.glLineWidth(2.0f);
GL11.glDisable(3553);
GL11.glDepthMask(false);
final float f1 = 0.002f;
final double d0 = player.lastTickPosX + (player.posX - player.lastTickPosX) * frame;
final double d2 = player.lastTickPosY + (player.posY - player.lastTickPosY) * frame;
final double d3 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * frame;
RenderGlobal.drawOutlinedBoundingBox(this.getBounds().add(new Vector3((double)this.x(), (double)this.y(), (double)this.z())).toAABB().expand((double)f1, (double)f1, (double)f1).getOffsetBoundingBox(-d0, -d2, -d3), -1);
GL11.glDepthMask(true);
GL11.glEnable(3553);
GL11.glDisable(3042);
return true;
}
示例2: doRender
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
@Override
public void doRender(FlatRayTarget entity, double x, double y, double z, float entityYaw, float partialTicks) {
if (entity.box == null) return;
final Minecraft mc = Minecraft.getMinecraft();
if (mc.objectMouseOver.entityHit != entity) return;
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
AxisAlignedBB offBox = entity.box.offset(-entity.posX, -entity.posY, -entity.posZ);
RenderGlobal.drawSelectionBoundingBox(offBox);
GlStateManager.disableTexture2D();
int c = 0xB0;
GL11.glLineWidth(4);
RenderGlobal.drawOutlinedBoundingBox(offBox, c, c, c, 0xFF);
GlStateManager.enableTexture2D();
GL11.glPopMatrix();
}
示例3: drawESP
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
public static void drawESP(double d, double d1, double d2, double r, double b, double g) {
GL11.glPushMatrix();
GL11.glEnable(3042);
GL11.glBlendFunc(770, 771);
GL11.glLineWidth(1.5F);
// GL11.glDisable( GL11.GL_LIGHTING );
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glDisable(2929);
GL11.glDepthMask(false);
GL11.glColor4d(r, g, b, 0.1825F);
RenderUtils.drawColorBox(new AxisAlignedBB(d, d1, d2, d + 1.0, d1 + 1.0, d2 + 1.0));
GL11.glColor4d(r, g, b, 1.0F);
RenderGlobal.drawOutlinedBoundingBox(new AxisAlignedBB(d, d1, d2, d + 1.0, d1 + 1.0, d2 + 1.0),
new Color(1f, 0.25f, 0.25f).getRGB());
GL11.glLineWidth(2.0F);
GL11.glDisable(GL11.GL_LINE_SMOOTH);
GL11.glEnable(GL11.GL_TEXTURE_2D);
// GL11.glEnable( GL11.GL_LIGHTING );
GL11.glEnable(2929);
GL11.glDepthMask(true);
GL11.glDisable(3042);
GL11.glPopMatrix();
}
示例4: box
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
/**
* Renders a box with any size and any color.
*/
public static void box(double x, double y, double z, double x2, double y2, double z2, Color color) {
x = x - Minecraft.getMinecraft().getRenderManager().renderPosX;
y = y - Minecraft.getMinecraft().getRenderManager().renderPosY;
z = z - Minecraft.getMinecraft().getRenderManager().renderPosZ;
x2 = x2 - Minecraft.getMinecraft().getRenderManager().renderPosX;
y2 = y2 - Minecraft.getMinecraft().getRenderManager().renderPosY;
z2 = z2 - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL_BLEND);
GL11.glLineWidth(2.0F);
RenderUtil.setColor(color);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL_DEPTH_TEST);
GL11.glDepthMask(false);
drawColorBox(new AxisAlignedBB(x, y, z, x2, y2, z2));
GL11.glColor4d(0, 0, 0, 0.5F);
RenderGlobal.drawOutlinedBoundingBox(new AxisAlignedBB(x, y, z, x2, y2, z2), -1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glDisable(GL_BLEND);
}
示例5: frame
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
/**
* Renders a frame with any size and any color.
*/
public static void frame(double x, double y, double z, double x2, double y2, double z2, Color color) {
x = x - Minecraft.getMinecraft().getRenderManager().renderPosX;
y = y - Minecraft.getMinecraft().getRenderManager().renderPosY;
z = z - Minecraft.getMinecraft().getRenderManager().renderPosZ;
x2 = x2 - Minecraft.getMinecraft().getRenderManager().renderPosX;
y2 = y2 - Minecraft.getMinecraft().getRenderManager().renderPosY;
z2 = z2 - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL_BLEND);
GL11.glLineWidth(2.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL_DEPTH_TEST);
GL11.glDepthMask(false);
RenderUtil.setColor(color);
RenderGlobal.drawOutlinedBoundingBox(new AxisAlignedBB(x, y, z, x2, y2, z2), -1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glDisable(GL_BLEND);
}
示例6: blockESPBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
/**
* Renders an ESP box with the size of a normal block at the specified
* coordinates.
*/
public static void blockESPBox(BlockPos blockPos) {
double x = blockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = blockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = blockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL_BLEND);
GL11.glLineWidth(1.0F);
GL11.glColor4d(0, 1, 0, 0.15F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL_DEPTH_TEST);
GL11.glDepthMask(false);
drawColorBox(new AxisAlignedBB(x, y, z, x + 1.0, y + 1.0, z + 1.0));
GL11.glColor4d(0, 0, 0, 0.5F);
RenderGlobal.drawOutlinedBoundingBox(new AxisAlignedBB(x, y, z, x + 1.0, y + 1.0, z + 1.0), -1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glDisable(GL_BLEND);
}
示例7: emptyBlockESPBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
public static void emptyBlockESPBox(BlockPos blockPos) {
double x = blockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = blockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = blockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL_BLEND);
GL11.glLineWidth(2.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL_DEPTH_TEST);
GL11.glDepthMask(false);
GL11.glColor4d(0, 0, 0, 0.5F);
RenderGlobal.drawOutlinedBoundingBox(new AxisAlignedBB(x, y, z, x + 1.0, y + 1.0, z + 1.0), -1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glDisable(GL_BLEND);
}
示例8: entityESPBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
public static void entityESPBox(Entity entity, int mode) {
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL_BLEND);
GL11.glLineWidth(2.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL_DEPTH_TEST);
updateColorFromTargetType(mode, entity);
Minecraft.getMinecraft().getRenderManager();
RenderGlobal.drawOutlinedBoundingBox(new AxisAlignedBB(entity.boundingBox.minX - 0.05 - entity.posX +
(entity.posX - Minecraft.getMinecraft().getRenderManager().renderPosX),
entity.boundingBox.minY - entity.posY +
(entity.posY - Minecraft.getMinecraft().getRenderManager().renderPosY),
entity.boundingBox.minZ - 0.05 - entity.posZ +
(entity.posZ - Minecraft.getMinecraft().getRenderManager().renderPosZ),
entity.boundingBox.maxX + 0.05 - entity.posX +
(entity.posX - Minecraft.getMinecraft().getRenderManager().renderPosX),
entity.boundingBox.maxY + 0.1 - entity.posY +
(entity.posY - Minecraft.getMinecraft().getRenderManager().renderPosY),
entity.boundingBox.maxZ + 0.05 - entity.posZ +
(entity.posZ - Minecraft.getMinecraft().getRenderManager().renderPosZ)), -1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glDisable(GL_BLEND);
}
示例9: nukerBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
public static void nukerBox(BlockPos blockPos, float damage) {
double x = blockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = blockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = blockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL_BLEND);
GL11.glLineWidth(1.0F);
GL11.glColor4d(damage, 1 - damage, 0, 0.15F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL_DEPTH_TEST);
GL11.glDepthMask(false);
drawColorBox(new AxisAlignedBB(x + 0.5 - damage / 2, y + 0.5 - damage / 2, z + 0.5 - damage / 2,
x + 0.5 + damage / 2, y + 0.5 + damage / 2, z + 0.5 + damage / 2));
GL11.glColor4d(0, 0, 0, 0.5F);
RenderGlobal.drawOutlinedBoundingBox(
new AxisAlignedBB(x + 0.5 - damage / 2, y + 0.5 - damage / 2, z + 0.5 - damage / 2,
x + 0.5 + damage / 2, y + 0.5 + damage / 2, z + 0.5 + damage / 2), -1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glDisable(GL_BLEND);
}
示例10: searchBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
public static void searchBox(BlockPos blockPos) {
double x = blockPos.getX() - Minecraft.getMinecraft().getRenderManager().renderPosX;
double y = blockPos.getY() - Minecraft.getMinecraft().getRenderManager().renderPosY;
double z = blockPos.getZ() - Minecraft.getMinecraft().getRenderManager().renderPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL_BLEND);
GL11.glLineWidth(1.0F);
float sinus = 1F - MathHelper
.abs(MathHelper.sin(Minecraft.getSystemTime() % 10000L / 10000.0F * (float) Math.PI * 4.0F) * 1F);
GL11.glColor4d(1 - sinus, sinus, 0, 0.15);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL_DEPTH_TEST);
GL11.glDepthMask(false);
drawColorBox(new AxisAlignedBB(x, y, z, x + 1.0, y + 1.0, z + 1.0));
GL11.glColor4d(0, 0, 0, 0.5);
RenderGlobal.drawOutlinedBoundingBox(new AxisAlignedBB(x, y, z, x + 1.0, y + 1.0, z + 1.0), -1);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glDisable(GL_BLEND);
}
示例11: func_85094_b
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
private void func_85094_b(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
float var10 = par1Entity.width / 2.0F;
AxisAlignedBB var11 = AxisAlignedBB.getAABBPool().getAABB(par2 - (double)var10, par4, par6 - (double)var10, par2 + (double)var10, par4 + (double)par1Entity.height, par6 + (double)var10);
RenderGlobal.drawOutlinedBoundingBox(var11, 16777215);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
}
示例12: RenderBoundingBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
public void RenderBoundingBox(EntityPlayer player, BaseRobotPlatesTileEntity tileEntity, float partialTicks) {
double d0 = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double)partialTicks;
double d1 = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double)partialTicks;
double d2 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double)partialTicks;
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F);
GL11.glLineWidth(2.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);
float e = 0.01f;
AxisAlignedBB drawBoundingBox = AxisAlignedBB.getBoundingBox(
(double)tileEntity.xCoord + boundingBox.minX, (double)tileEntity.yCoord + boundingBox.minY, (double)tileEntity.zCoord + boundingBox.minZ,
(double)tileEntity.xCoord + boundingBox.maxX, (double)tileEntity.yCoord + boundingBox.maxY, (double)tileEntity.zCoord + boundingBox.maxZ);
RenderGlobal.drawOutlinedBoundingBox(drawBoundingBox.expand(e, e, e).getOffsetBoundingBox(-d0, -d1, -d2), -1);
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
}
示例13: drawBoundingBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
public static void drawBoundingBox(EntityLivingBase entity, AxisAlignedBB aabb) {
if (aabb == null) {
return;
}
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
GL11.glColor4f(0.0F, 0.0F, 0.0F, 0.4F);
GL11.glLineWidth(2.0F);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);
float f1 = 0.002F;
double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX);
double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY);
double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ);
RenderGlobal.drawOutlinedBoundingBox(aabb.expand((double) f1, (double) f1, (double) f1).getOffsetBoundingBox(-d0, -d1, -d2), -1);
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
}
示例14: renderDebugBoundingBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
private void renderDebugBoundingBox(Entity p_85094_1_, double p_85094_2_, double p_85094_4_, double p_85094_6_, float p_85094_8_, float p_85094_9_)
{
GL11.glDepthMask(false);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
float f2 = p_85094_1_.width / 2.0F;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(p_85094_2_ - (double)f2, p_85094_4_, p_85094_6_ - (double)f2, p_85094_2_ + (double)f2, p_85094_4_ + (double)p_85094_1_.height, p_85094_6_ + (double)f2);
RenderGlobal.drawOutlinedBoundingBox(axisalignedbb, 16777215);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
}
示例15: drawSelectionBox
import net.minecraft.client.renderer.RenderGlobal; //導入方法依賴的package包/類
private static void drawSelectionBox( int size, RenderGlobal context, EntityPlayer p_72731_1_, MovingObjectPosition p_72731_2_, int p_72731_3_, float p_72731_4_)
{
if (p_72731_3_ == 0 && p_72731_2_.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
// MINE
World theWorld = p_72731_1_.worldObj;
int x = p_72731_2_.getBlockPos().getX();
int z = p_72731_2_.getBlockPos().getZ();
int rad = size / 2;
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.color(0.0F, 0.0F, 0.0F, 0.4F);
GL11.glLineWidth(2.0F);
GlStateManager.disableTexture2D();
GlStateManager.depthMask(false);
float f1 = 0.002F;
BlockPos blockpos = p_72731_2_.getBlockPos();
Block block = theWorld.getBlockState(blockpos).getBlock();
if (block.getMaterial() != Material.air && theWorld.getWorldBorder().contains(blockpos))
{
block.setBlockBoundsBasedOnState(theWorld, blockpos);
double d0 = p_72731_1_.lastTickPosX + (p_72731_1_.posX - p_72731_1_.lastTickPosX) * (double)p_72731_4_;
double d1 = p_72731_1_.lastTickPosY + (p_72731_1_.posY - p_72731_1_.lastTickPosY) * (double)p_72731_4_;
double d2 = p_72731_1_.lastTickPosZ + (p_72731_1_.posZ - p_72731_1_.lastTickPosZ) * (double)p_72731_4_;
AxisAlignedBB box = new AxisAlignedBB( x - rad, 0, z - rad, x + 1 + rad, 255, z + 1 + rad ).expand(0.0020000000949949026D, 0.0020000000949949026D, 0.0020000000949949026D).offset(-d0, -d1, -d2);
context.drawOutlinedBoundingBox(box, -1);
}
GlStateManager.depthMask(true);
GlStateManager.enableTexture2D();
GlStateManager.disableBlend();
}
}