Search in sources :

Example 21 with Minecraft

use of net.minecraft.client.Minecraft in project LogisticsPipes by RS485.

the class HUDStringBasedItemSink method renderContent.

@Override
public void renderContent(boolean shifted) {
    Minecraft mc = FMLClientHandler.instance().getClient();
    for (int i = page * 6; i < itemSink.getStringList().size() && i < 6 + (page * 6); i++) {
        String mod = itemSink.getStringList().get(i);
        mc.fontRenderer.drawString(mod.substring(0, Math.min(12, mod.length())), -28, -25 + ((i - (page * 6)) * 10), 0x404040);
    //mc.fontRenderer.drawSplitString(mod, -28, -25 + ((i - (page * 6)) * 10), 50, 0x404040);
    }
}
Also used : Minecraft(net.minecraft.client.Minecraft)

Example 22 with Minecraft

use of net.minecraft.client.Minecraft in project LogisticsPipes by RS485.

the class HUDAdvancedExtractor method renderContent.

@Override
public void renderContent(boolean shifted) {
    if (selected == 0) {
        Minecraft mc = FMLClientHandler.instance().getClient();
        ForgeDirection d = module.getSneakyDirection();
        mc.fontRenderer.drawString("Extract", -22, -22, 0);
        mc.fontRenderer.drawString("from:", -22, -9, 0);
        mc.fontRenderer.drawString(((d == ForgeDirection.UNKNOWN) ? "DEFAULT" : d.name()), -22, 18, 0);
    } else {
        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);
        if (module.areItemsIncluded()) {
            mc.fontRenderer.drawString("Included", -22, 25, 0);
        } else {
            mc.fontRenderer.drawString("Excluded", -22, 25, 0);
        }
    }
}
Also used : ForgeDirection(net.minecraftforge.common.util.ForgeDirection) Minecraft(net.minecraft.client.Minecraft)

Example 23 with Minecraft

use of net.minecraft.client.Minecraft in project LogisticsPipes by RS485.

the class HUDCCBasedQuickSort method renderContent.

@Override
public void renderContent(boolean shifted) {
    Minecraft mc = FMLClientHandler.instance().getClient();
    mc.fontRenderer.drawString("Timeout: ", -29, -30, 0);
    mc.fontRenderer.drawString(module.getTimeout() + " ticks", 0 - (mc.fontRenderer.getStringWidth(module.getTimeout() + "ticks") / 2), -20, 0);
    mc.fontRenderer.drawString("Sinks", -29, 0, 0);
    mc.fontRenderer.drawString("pending: ", -19, 10, 0);
    mc.fontRenderer.drawString(Integer.toString(module.getSinkSize()), 0 - (mc.fontRenderer.getStringWidth(Integer.toString(module.getSinkSize())) / 2), 20, 0);
}
Also used : Minecraft(net.minecraft.client.Minecraft)

Example 24 with Minecraft

use of net.minecraft.client.Minecraft in project LogisticsPipes by RS485.

the class HUDOreDictItemSink method renderContent.

@Override
public void renderContent(boolean shifted) {
    Minecraft mc = FMLClientHandler.instance().getClient();
    GL11.glScalef(1.0F, 1.0F, -0.00001F);
    ItemStackRenderer.renderItemIdentifierStackListIntoGui(itemSink.getHudItemList(), null, 0, -25, -32, 3, 9, 18, 18, 100.0F, DisplayAmount.NEVER, true, false, shifted);
    GL11.glScalef(1.0F, 1.0F, 1 / -0.00001F);
}
Also used : Minecraft(net.minecraft.client.Minecraft)

Example 25 with Minecraft

use of net.minecraft.client.Minecraft in project LogisticsPipes by RS485.

the class PipeFXRenderHandler method spawnGenericParticle.

public static void spawnGenericParticle(Particles particle, double x, double y, double z, int amount) {
    if (MainProxy.getClientMainWorld() == null) {
        return;
    }
    try {
        Minecraft mc = Minecraft.getMinecraft();
        int var14 = mc.gameSettings.particleSetting;
        double var15 = mc.renderViewEntity.posX - x;
        double var17 = mc.renderViewEntity.posY - y;
        double var19 = mc.renderViewEntity.posZ - z;
        EntityFX effect = null;
        double var22 = 16.0D;
        if (var15 * var15 + var17 * var17 + var19 * var19 > var22 * var22) {
            return;
        } else if (var14 > 1) {
            return;
        }
        ParticleProvider provider = PipeFXRenderHandler.particlemap[particle.ordinal()];
        if (provider == null) {
            return;
        }
        for (int i = 0; i < Math.sqrt(amount); i++) {
            effect = provider.createGenericParticle(mc.theWorld, x, y, z, amount);
            if (effect != null) {
                mc.effectRenderer.addEffect(effect);
            }
        }
    } catch (NullPointerException e) {
    }
}
Also used : EntityFX(net.minecraft.client.particle.EntityFX) Minecraft(net.minecraft.client.Minecraft)

Aggregations

Minecraft (net.minecraft.client.Minecraft)100 ItemStack (net.minecraft.item.ItemStack)17 ScaledResolution (net.minecraft.client.gui.ScaledResolution)15 EntityPlayer (net.minecraft.entity.player.EntityPlayer)15 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)10 ResourceLocation (net.minecraft.util.ResourceLocation)8 ArrayList (java.util.ArrayList)7 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)7 FontRenderer (net.minecraft.client.gui.FontRenderer)6 WorldClient (net.minecraft.client.multiplayer.WorldClient)6 World (net.minecraft.world.World)6 Tessellator (net.minecraft.client.renderer.Tessellator)5 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)5 Block (net.minecraft.block.Block)4 EntityPlayerSP (net.minecraft.client.entity.EntityPlayerSP)4 IRenderHandler (net.minecraftforge.client.IRenderHandler)4 SimplePageView (com.almuradev.almura.feature.guide.client.gui.SimplePageView)3 SideOnly (cpw.mods.fml.relauncher.SideOnly)3 Field (java.lang.reflect.Field)3 GuiScreen (net.minecraft.client.gui.GuiScreen)3