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);
}
}
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);
}
}
}
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);
}
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);
}
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) {
}
}
Aggregations