Search in sources :

Example 66 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project RFToolsDimensions by McJty.

the class KnownDimletConfiguration method initBiomeDimlet.

private static void initBiomeDimlet(Biome biome) {
    String name = biome.getBiomeName();
    if (name != null && !name.isEmpty()) {
        ResourceLocation registryName = biome.getRegistryName();
        if (registryName != null) {
            DimletKey key = new DimletKey(DimletType.DIMLET_BIOME, registryName.toString());
            initDimlet(key, RFToolsTools.findModID(biome));
        }
    }
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation)

Example 67 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project ArsMagica2 by Mithion.

the class RenderOtherworldAura method renderArsMagicaEffect.

private void renderArsMagicaEffect(Tessellator tessellator, float offset, float scale, float smooth, boolean rotate) {
    GL11.glPushMatrix();
    if (rotate) {
        GL11.glRotatef(180F - RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(-RenderManager.instance.playerViewX, 1.0F, 0.0F, 0.0F);
    } else {
        GL11.glRotatef(35, 0, 1, 0);
        GL11.glTranslatef(0, -0.25f, 0);
    }
    Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("arsmagica2", ResourceManager.getCustomBlockTexturePath("sc_auto.png")));
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    GL11.glColor4f(1, 0, 0.75f, 1);
    GL11.glTranslatef(0.0f, 0.25f, 0.0f);
    GL11.glRotatef((Minecraft.getMinecraft().thePlayer.ticksExisted + smooth) * (scale * 2) * offset, 0, 0, 1);
    float scalefactor = (float) Math.abs(Math.sin(System.currentTimeMillis() / 1000.0 * scale)) + 0.01f;
    GL11.glScalef(scale * scalefactor, scale * scalefactor, scale * scalefactor);
    GL11.glTranslatef(0.0f, -0.25f, 0.0f);
    renderSprite(tessellator);
    GL11.glPopMatrix();
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation)

Example 68 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project minecolonies by Minecolonies.

the class ButtonImage method loadHighlightInfo.

/**
     * Loads the parameters for the hover image.
     *
     * @param params PaneParams provided in the xml.
     */
private void loadHighlightInfo(final PaneParams params) {
    final String path = params.getStringAttribute("highlight", null);
    if (path != null) {
        imageHighlight = new ResourceLocation(path);
        loadImageHighlightDimensions();
    }
    PaneParams.SizePair size = params.getSizePairAttribute("highlightoffset", null, null);
    if (size != null) {
        highlightOffsetX = size.getX();
        highlightOffsetY = size.getY();
    }
    size = params.getSizePairAttribute("highlightsize", null, null);
    if (size != null) {
        highlightWidth = size.getX();
        highlightHeight = size.getY();
    }
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) PaneParams(com.minecolonies.blockout.PaneParams)

Example 69 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project minecolonies by Minecolonies.

the class CommonProxy method registerEntities.

/*
    * @param entityName A unique name for the entity
    * @param id A mod specific ID for the entity
    * @param mod The mod
    * @param trackingRange The range at which MC will send tracking updates
    * @param updateFrequency The frequency of tracking updates
    * @param sendsVelocityUpdates Whether to send velocity information packets as well
    * */
@Override
public void registerEntities() {
    final ResourceLocation locationCitizen = new ResourceLocation(Constants.MOD_ID, "Citizen");
    final ResourceLocation locationFishHook = new ResourceLocation(Constants.MOD_ID, "Fishhook");
    // Half as much tracking range and same update frequency as a player
    // See EntityTracker.addEntityToTracker for more default values
    EntityRegistry.registerModEntity(locationCitizen, EntityCitizen.class, "Citizen", getNextEntityId(), MineColonies.instance, 256, 2, true);
    EntityRegistry.registerModEntity(locationFishHook, EntityFishHook.class, "Fishhook", getNextEntityId(), MineColonies.instance, 250, 5, true);
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation)

Example 70 with ResourceLocation

use of net.minecraft.util.ResourceLocation in project Pearcel-Mod by MiningMark48.

the class GuiPearcelGenerator method drawGuiContainerForegroundLayer.

@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
    //Energy Bar
    this.mc.getTextureManager().bindTexture(new ResourceLocation(Reference.MOD_ID + ":textures/gui/gui_pearcel_generator.png"));
    this.drawTexturedModalRect(145, 72 - getProgressLevel(51), 180, 21, 21, getProgressLevel(51));
    String s = this.te.getDisplayName().getUnformattedText();
    this.fontRendererObj.drawString(s, 88 - this.fontRendererObj.getStringWidth(s) / 2, 6, 4210752);
    this.fontRendererObj.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, 75, 4210752);
    if (this.te.getField(2) != 0) {
        this.fontRendererObj.drawString("Time Left: " + (this.te.getField(2) / 20) + "s", 36, 36, 4210752);
    }
    if (this.te.getField(0) >= this.te.getField(1)) {
        this.fontRendererObj.drawString("Energy Buffer Full", 36, 23, 4210752);
    } else if (this.te.getField(0) < this.te.getField(1) && this.te.getField(2) > 0) {
        NumberFormat format = NumberFormat.getInstance();
        this.fontRendererObj.drawString("RF/T: " + format.format(this.te.getField(3)), 36, 23, 4210752);
    } else if (this.te.inventory[0] == null) {
        this.fontRendererObj.drawString("Insert Fuel", 36, 23, 4210752);
    }
    if (this.isMouseOver(mouseX, mouseY, 144, 19, 166, 72)) {
        Minecraft mc = Minecraft.getMinecraft();
        List<String> text = new ArrayList<String>();
        text.add(this.getOverlayText());
        net.minecraftforge.fml.client.config.GuiUtils.drawHoveringText(text, mouseX - ((this.width - this.xSize) / 2), mouseY - ((this.height - this.ySize) / 2), mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj);
    }
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) ArrayList(java.util.ArrayList) Minecraft(net.minecraft.client.Minecraft) NumberFormat(java.text.NumberFormat)

Aggregations

ResourceLocation (net.minecraft.util.ResourceLocation)272 ItemStack (net.minecraft.item.ItemStack)51 Block (net.minecraft.block.Block)47 Item (net.minecraft.item.Item)32 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)31 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)30 IBlockState (net.minecraft.block.state.IBlockState)17 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)15 ArrayList (java.util.ArrayList)14 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)14 Map (java.util.Map)11 EntityPlayer (net.minecraft.entity.player.EntityPlayer)11 ShaderLayer (blusunrize.immersiveengineering.api.shader.ShaderCase.ShaderLayer)10 IOException (java.io.IOException)10 TileEntity (net.minecraft.tileentity.TileEntity)9 IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)8 EnumFacing (net.minecraft.util.EnumFacing)8 BlockPos (net.minecraft.util.math.BlockPos)8 Random (java.util.Random)7 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)7