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 malmo by Microsoft.
the class AuthenticationHelper method setSession.
private static boolean setSession(Session newSession) {
// Are we in the dev environment or deployed?
boolean devEnv = (Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
// We need to know, because the member name will either be obfuscated or not.
String sessionMemberName = devEnv ? "session" : "field_71449_j";
// NOTE: obfuscated name may need updating if Forge changes - search for "session" in Malmo\Minecraft\build\tasklogs\retromapSources.log
Field session;
try {
session = Minecraft.class.getDeclaredField(sessionMemberName);
session.setAccessible(true);
session.set(Minecraft.getMinecraft(), newSession);
return true;
} catch (SecurityException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
return false;
}
use of net.minecraft.client.Minecraft in project PneumaticCraft by MineMaarten.
the class GuiHelmetMainScreen method init.
public static void init() {
instance = new GuiHelmetMainScreen();
Minecraft minecraft = FMLClientHandler.instance().getClient();
ScaledResolution scaledresolution = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight);
int width = scaledresolution.getScaledWidth();
int height = scaledresolution.getScaledHeight();
instance.setWorldAndResolution(minecraft, width, height);
for (int i = 1; i < instance.upgradePages.size(); i++) {
page = i;
instance.initGui();
}
page = 0;
instance.init = false;
}
use of net.minecraft.client.Minecraft in project PneumaticCraft by MineMaarten.
the class SearchUpgradeHandler method getAnimatedStat.
@Override
@SideOnly(Side.CLIENT)
public GuiAnimatedStat getAnimatedStat() {
if (searchInfo == null) {
Minecraft minecraft = Minecraft.getMinecraft();
ScaledResolution sr = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight);
searchInfo = new GuiAnimatedStat(null, "Currently searching for:", new ItemStack(Itemss.machineUpgrade, 1, ItemMachineUpgrade.UPGRADE_SEARCH_DAMAGE), statX != -1 ? statX : sr.getScaledWidth() - 2, statY, 0x3000AA00, null, statLeftSided);
searchInfo.setMinDimensionsAndReset(0, 0);
}
return searchInfo;
}
Aggregations