use of net.minecraft.client.Minecraft in project LogisticsPipes by RS485.
the class HUDItemSink method renderContent.
@Override
public void renderContent(boolean shifted) {
Minecraft mc = FMLClientHandler.instance().getClient();
GL11.glScalef(1.0F, 1.0F, -0.00001F);
ItemStackRenderer.renderItemIdentifierStackListIntoGui(ItemIdentifierStack.getListFromInventory(module.getFilterInventory()), null, 0, -25, -32, 3, 9, 18, 18, 100.0F, DisplayAmount.NEVER, true, false, shifted);
GL11.glScalef(1.0F, 1.0F, 1 / -0.00001F);
mc.fontRenderer.drawString("Default:", -29, 25, 0);
if (module.isDefaultRoute()) {
mc.fontRenderer.drawString("Yes", 11, 25, 0);
} else {
mc.fontRenderer.drawString("No", 15, 25, 0);
}
}
use of net.minecraft.client.Minecraft in project LogisticsPipes by RS485.
the class HUDProviderModule method renderContent.
@Override
public void renderContent(boolean shifted) {
Minecraft mc = FMLClientHandler.instance().getClient();
GL11.glScalef(1.0F, 1.0F, -0.00001F);
ItemStackRenderer.renderItemIdentifierStackListIntoGui(module.displayList, null, page, -25, -24, 3, 9, 18, 18, 100.0F, DisplayAmount.ALWAYS, true, false, shifted);
GL11.glScalef(1.0F, 1.0F, 1 / -0.00001F);
}
use of net.minecraft.client.Minecraft in project LogisticsPipes by RS485.
the class SneakyConfigurationPopup method drawGuiContainerForegroundLayer.
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY, float partialTick) {
drawRect(bounds.x, bounds.y, bounds.x + bounds.width, bounds.y + bounds.height, 0xff000000);
Minecraft mc = Minecraft.getMinecraft();
ScaledResolution scaledresolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
int vpx = bounds.x * scaledresolution.getScaleFactor();
int vpy = (bounds.y + 10) * scaledresolution.getScaleFactor();
int w = bounds.width * scaledresolution.getScaleFactor();
int h = (bounds.height - 1) * scaledresolution.getScaleFactor();
mc.fontRenderer.drawString(StringUtils.translate(PREFIX + "sneakyTitle"), guiLeft + 8, guiTop + 8, Color.getValue(Color.DARKER_GREY), false);
configDisplay.drawScreen(mouseX, mouseY, partialTick, new Rectangle(vpx, vpy, w, h), bounds);
}
use of net.minecraft.client.Minecraft in project Bookshelf by Darkhax-Minecraft.
the class RenderUtils method renderFluid.
/**
* Renders a fluid at the given position.
*
* @param fluid The fluid to render.
* @param pos The position in the world to render the fluid.
* @param x The base X position.
* @param y The base Y position.
* @param z The base Z position.
* @param x1 The middle X position.
* @param y1 The middle Y position.
* @param z1 The middle Z position.
* @param x2 The max X position.
* @param y2 The max Y position.
* @param z2 The max Z position.
* @param color The color offset used by the fluid. Default is white.
*/
public static void renderFluid(FluidStack fluid, BlockPos pos, double x, double y, double z, double x1, double y1, double z1, double x2, double y2, double z2, int color) {
final Minecraft mc = Minecraft.getMinecraft();
final Tessellator tessellator = Tessellator.getInstance();
final VertexBuffer buffer = tessellator.getBuffer();
final int brightness = mc.world.getCombinedLight(pos, fluid.getFluid().getLuminosity());
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
setupRenderState(x, y, z);
GlStateManager.translate(x, y, z);
final TextureAtlasSprite still = mc.getTextureMapBlocks().getTextureExtry(fluid.getFluid().getStill(fluid).toString());
final TextureAtlasSprite flowing = mc.getTextureMapBlocks().getTextureExtry(fluid.getFluid().getFlowing(fluid).toString());
addTexturedQuad(buffer, still, x1, y1, z1, x2 - x1, y2 - y1, z2 - z1, EnumFacing.DOWN, color, brightness);
addTexturedQuad(buffer, flowing, x1, y1, z1, x2 - x1, y2 - y1, z2 - z1, EnumFacing.NORTH, color, brightness);
addTexturedQuad(buffer, flowing, x1, y1, z1, x2 - x1, y2 - y1, z2 - z1, EnumFacing.EAST, color, brightness);
addTexturedQuad(buffer, flowing, x1, y1, z1, x2 - x1, y2 - y1, z2 - z1, EnumFacing.SOUTH, color, brightness);
addTexturedQuad(buffer, flowing, x1, y1, z1, x2 - x1, y2 - y1, z2 - z1, EnumFacing.WEST, color, brightness);
addTexturedQuad(buffer, still, x1, y1, z1, x2 - x1, y2 - y1, z2 - z1, EnumFacing.UP, color, brightness);
tessellator.draw();
cleanupRenderState();
}
use of net.minecraft.client.Minecraft in project RFToolsDimensions by McJty.
the class SkyRenderer method registerNoSky.
public static void registerNoSky(GenericWorldProvider provider) {
provider.setSkyRenderer(new IRenderHandler() {
@Override
public void render(float partialTicks, WorldClient world, Minecraft mc) {
}
});
provider.setCloudRenderer(new IRenderHandler() {
@Override
public void render(float partialTicks, WorldClient world, Minecraft mc) {
}
});
}
Aggregations