Block textures and block names not loading minecraft forge

BRHSM

I am making a mod for minecraft but I can't get the textures to load: enter image description here

Also the names dont show up correctly (tile.Yarrite Ore.Name instead of Yarrite Ore): enter image description here

here is the code I used to Create the block(YarriteOre.java):

package com.NoNameYetMod.common;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;

public class YarriteOre extends Block{
    public YarriteOre(int id,Material mat) {
        super(mat);
        this.setCreativeTab(CreativeTabs.tabBlock);
    }

    @Override
    public void registerBlockIcons(IIconRegister p_149651_1_){
        this.blockIcon = p_149651_1_.registerIcon("NoNameYetMod:Yarrite Ore");
    }
}

and here is the mod.java file in which I register the block in the game:

package com.NoNameYetMod.common;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Metadata;
import cpw.mods.fml.common.ModMetadata;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = "NoNameYetMod", name = "The \"No Name\" Yet Mod", version = "1.0.0 (Warning: Alpha!)")

public class NoNameYetMod{

    @Metadata
    public static ModMetadata meta;
    //Yarrite
    public static Block YarriteOre;
    int YarriteOreID = 1001;

    @EventHandler
    public void init(FMLPreInitializationEvent event){
        //Yarrit
        YarriteOre = new YarriteOre(YarriteOreID, Material.rock).setHardness(1.5F).setBlockName("Yarrite Ore");
    
}

I tried renaming the icon to Yarrite Ore, Yarrite and YarritOre but none of them work! does anybody know what I'm doing wrong?

EDIT: I also tried .Png and .JPeg files but non of them worked...

EDIT: I have the items in the src/main/resources/assets/NoNameYetMod/Textures/blocks folder.

PjRock

To fix the name all you have to do in create a file called en_US.lang in \main\resources\assets\MOD_ID\lang. The file is a basic text file, notepad can edit it, and you should put in the crazy name you see, its technical name, and then what you want it to be called in-game name. Here is an example:

tile.Yarrite Ore.Name = Yarrite Ore

Do the same for items, just use item.X instead of tile.X.

Are you using forge for 1.7 or 1.8, the way textures are loaded was changed by a great deal in 1.8? For 1.7 all you need to do is add this just after the line with super(mat);

this.setBlockTextureName("MODID" + ":" + "yarriteOre");

Replace yarriteOre with the image name. There's no need to add .png at the end of the line, Minecraft does that when looking for the image. For basic blocks texturing, you don't need the registerBlockIcons() method.

Here's a link to some great Minecraft modding tutorials, 1.3-1.8. I've used them before and the're great help.

Link

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Minecraft forge not loading textures

From Dev

how to block website from loading in iframe?

From Dev

opengl 3.1 textures not loading

From Dev

Is there a way to dynamically update block textures after initialization?

From Dev

Minecraft modding 1.7.10 textures not showing

From Dev

Access closure property names in the content block at runtime

From Dev

How do I get and set the Metadata Value for a block item in Minecraft?

From Dev

Minecraft Forge 1.8 - Loading Block Textures

From Dev

Minecraft forge mod compiling error

From Dev

Loading DDS textures?

From Dev

Minecraft Forge: my Mod Jar file does not load a json library that I used in my code and it does not load one of my GUI textures

From Dev

How to register an item or block in minecraft 1.9

From Dev

opengl 3.1 textures not loading

From Dev

problems with twig block names

From Dev

Execute same block of code with different variable names

From Dev

Is there a way to dynamically update block textures after initialization?

From Dev

How to extract all names from a block of text

From Dev

Block requests via intermediate host names at nginx

From Dev

Minecraft Modding Forge .isRemote() and worldObj

From Dev

Three js, block textures are blured

From Dev

Minecraft forge mod compiling error

From Dev

How can I add an event handler to the block lever in Minecraft Forge?

From Dev

How to find the names of partitions of a given block device?

From Dev

Variables not updating in java (Minecraft forge)

From Dev

Minecraft command block ops can't use

From Dev

Scan entire disk in order, block by block, and also get file names

From Dev

Minecraft forge: event when block is generated

From Dev

How to register an ItemBlock in Minecraft Forge?

From Dev

Can't check what kind of block was broken in Minecraft Forge

Related Related

  1. 1

    Minecraft forge not loading textures

  2. 2

    how to block website from loading in iframe?

  3. 3

    opengl 3.1 textures not loading

  4. 4

    Is there a way to dynamically update block textures after initialization?

  5. 5

    Minecraft modding 1.7.10 textures not showing

  6. 6

    Access closure property names in the content block at runtime

  7. 7

    How do I get and set the Metadata Value for a block item in Minecraft?

  8. 8

    Minecraft Forge 1.8 - Loading Block Textures

  9. 9

    Minecraft forge mod compiling error

  10. 10

    Loading DDS textures?

  11. 11

    Minecraft Forge: my Mod Jar file does not load a json library that I used in my code and it does not load one of my GUI textures

  12. 12

    How to register an item or block in minecraft 1.9

  13. 13

    opengl 3.1 textures not loading

  14. 14

    problems with twig block names

  15. 15

    Execute same block of code with different variable names

  16. 16

    Is there a way to dynamically update block textures after initialization?

  17. 17

    How to extract all names from a block of text

  18. 18

    Block requests via intermediate host names at nginx

  19. 19

    Minecraft Modding Forge .isRemote() and worldObj

  20. 20

    Three js, block textures are blured

  21. 21

    Minecraft forge mod compiling error

  22. 22

    How can I add an event handler to the block lever in Minecraft Forge?

  23. 23

    How to find the names of partitions of a given block device?

  24. 24

    Variables not updating in java (Minecraft forge)

  25. 25

    Minecraft command block ops can't use

  26. 26

    Scan entire disk in order, block by block, and also get file names

  27. 27

    Minecraft forge: event when block is generated

  28. 28

    How to register an ItemBlock in Minecraft Forge?

  29. 29

    Can't check what kind of block was broken in Minecraft Forge

HotTag

Archive