use of net.minecraft.util.ResourceLocation in project Pearcel-Mod by MiningMark48.
the class GuiPearcelStorageCrate method drawGuiContainerBackgroundLayer.
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
GL11.glColor4f(1F, 1F, 1F, 1F);
this.mc.getTextureManager().bindTexture(new ResourceLocation(texture));
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
}
use of net.minecraft.util.ResourceLocation in project ArsMagica2 by Mithion.
the class GuiKeystone method drawGuiContainerForegroundLayer.
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
int l = (width - xSize) / 2;
int i1 = (height - ySize) / 2;
mc.renderEngine.bindTexture(new ResourceLocation("textures/atlas/items.png"));
int numCombos = Math.min(ItemsCommonProxy.keystone.numCombinations(((ContainerKeystone) this.inventorySlots).getKeystoneStack()), comboScrollOffset + 9);
int cx = xSize;
int cy = 13;
Tessellator t = Tessellator.instance;
KeystoneCombination matchedCombo = ((ContainerKeystone) this.inventorySlots).getCurrentMatchedCombination();
for (int i = comboScrollOffset; i < numCombos; ++i) {
KeystoneCombination combo = ItemsCommonProxy.keystone.getCombinationAt(((ContainerKeystone) this.inventorySlots).getKeystoneStack(), i);
if (matchedCombo != null && combo.equals(matchedCombo)) {
currentCombination = i;
for (int n = 0; n < combo.metas.length; ++n) {
if (combo.metas[n] > -1) {
IIcon icon = AMGuiIcons.selectedRunes;
AMGuiHelper.DrawIconAtXY(icon, cx, cy, this.zLevel, 16, 16, true);
}
cx += 18;
}
mc.renderEngine.bindTexture(new ResourceLocation("textures/atlas/items.png"));
cx = xSize;
}
for (int n = 0; n < combo.metas.length; ++n) {
if (combo.metas[n] > -1) {
IIcon icon = ItemsCommonProxy.rune.getIconFromDamage(combo.metas[n]);
AMGuiHelper.DrawIconAtXY(icon, cx, cy, this.zLevel, 16, 16, true);
}
cx += 18;
}
cy += 18;
cx = xSize;
}
mc.renderEngine.bindTexture(extras);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
//special slot(s)
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
int index = ((ContainerKeystone) this.inventorySlots).specialSlotIndex - 32;
int x = 8 + 18 * index;
int y = (((ContainerKeystone) this.inventorySlots).runebagSlot > -1) ? 216 : 179;
drawTexturedModalRect(x, y, 0, 20, 16, 16);
if (((ContainerKeystone) this.inventorySlots).runebagSlot > -1) {
index = ((ContainerKeystone) this.inventorySlots).runebagSlot;
x = 8 + 18 * (index % 9);
y = index < 9 ? 216 : 140 + 18 * (int) Math.floor(index / 9f);
drawTexturedModalRect(x, y, 0, 20, 16, 16);
}
GL11.glDisable(GL11.GL_BLEND);
combinationName.drawTextBox();
if (AMGuiHelper.instance.getSlowTicker() < displayTime) {
fontRendererObj.drawSplitString(displayMessage, -90, 0, 90, displayColor);
} else {
displayTime = 0;
}
if (matchedCombo != null) {
combinationName.setText(matchedCombo.name);
}
if (hoveredCombo > -1) {
KeystoneCombination combo = ItemsCommonProxy.keystone.getCombinationAt(((ContainerKeystone) this.inventorySlots).getKeystoneStack(), hoveredCombo);
ArrayList<String> lines = new ArrayList<String>();
lines.add(combo.name);
lines.add("\2477\247o" + StatCollector.translateToLocal("am2.gui.keystoneComboClick"));
lines.add("\2477\247o" + StatCollector.translateToLocal("am2.gui.keystoneComboClick2") + "\247r");
AMGuiHelper.drawHoveringText(lines, par1 - 25, par2 + 18, Minecraft.getMinecraft().fontRenderer, this.xSize, this.ySize);
}
}
use of net.minecraft.util.ResourceLocation in project ArsMagica2 by Mithion.
the class AM2FontRenderer method readGlyphSizes.
private void readGlyphSizes() {
try {
InputStream inputstream = Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation("font/glyph_sizes.bin")).getInputStream();
inputstream.read(this.glyphWidth);
} catch (IOException ioexception) {
throw new RuntimeException(ioexception);
}
}
use of net.minecraft.util.ResourceLocation in project ConvenientAdditions by Necr0.
the class ModLoot method onLootTableLoad.
@SubscribeEvent
public void onLootTableLoad(LootTableLoadEvent event) {
ResourceLocation n = event.getName();
if (n.equals(LootTableList.CHESTS_END_CITY_TREASURE)) {
if (ModConfigTools.mobCatcher_loot)
event.getTable().getPool("main").addEntry(new LootEntryItem(ModItems.itemMobCatcherMega, 1, 3, new LootFunction[0], new LootCondition[0], ModConstants.Mod.MODID + ":megaMCD"));
} else if (n.equals(LootTableList.CHESTS_STRONGHOLD_CORRIDOR)) {
if (ModConfigTools.mobCatcher_loot)
event.getTable().getPool("main").addEntry(new LootEntryItem(ModItems.itemMobCatcherHyper, 1, 3, new LootFunction[0], new LootCondition[0], ModConstants.Mod.MODID + ":hyperMCD"));
} else if (n.equals(LootTableList.CHESTS_SIMPLE_DUNGEON)) {
if (ModConfigTools.mobCatcher_loot) {
event.getTable().getPool("main").addEntry(new LootEntryItem(ModItems.itemMobCatcherSuper, 1, 3, new LootFunction[0], new LootCondition[0], ModConstants.Mod.MODID + ":superMCD"));
event.getTable().getPool("main").addEntry(new LootEntryItem(ModItems.itemMobCatcherRegular, 3, -2, new LootFunction[0], new LootCondition[0], ModConstants.Mod.MODID + ":regularMCD"));
}
}
}
use of net.minecraft.util.ResourceLocation in project ConvenientAdditions by Necr0.
the class ModEntities method init.
public static void init() {
EntityRegistry.registerModEntity(new ResourceLocation(ModConstants.Mod.MODID, ModConstants.Entities.launchingArrowEntityName), EntityLaunchingArrow.class, ModConstants.Entities.launchingArrowEntityName, ModConstants.Entities.lauchingArrowEntityId, ConvenientAdditions.INSTANCE, 128, 5, true);
EntityRegistry.registerModEntity(new ResourceLocation(ModConstants.Mod.MODID, ModConstants.Entities.specialItemEntityName), EntitySpecialItem.class, ModConstants.Entities.specialItemEntityName, ModConstants.Entities.specialItemEntityId, ConvenientAdditions.INSTANCE, 128, 5, true);
EntityRegistry.registerModEntity(new ResourceLocation(ModConstants.Mod.MODID, ModConstants.Entities.mobCatcherEntityName), EntityMobCatcher.class, ModConstants.Entities.mobCatcherEntityName, ModConstants.Entities.mobCatcherEntityId, ConvenientAdditions.INSTANCE, 128, 5, true);
}
Aggregations