as I do so that tile.name does not appear in my mod

Started by retibalt on

Topic category: Help with Minecraft modding (Java Edition)

Active 6 years ago
Joined Jun 2015
Points:
746

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 10
as I do so that tile.name does not appear in my mod

as I do so that tile.name does not appear in my mod

 

I do not want the red texts in my mod as I remove it

 

Active 4 years ago
Joined Jun 2016
Points:
3648

User statistics:

  • Modifications: 10
  • Forum topics: 39
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5290
Try to remove that block and
Sat, 09/23/2017 - 15:31

Try to remove that block and remake it with a different mcreator mid element name (not the GUi name but the name shown in the mods elements list)
Change the texture because that's like redstone...

Active 7 years ago
Joined Sep 2017
Points:
706

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Hey Raol, This didn't work
Sun, 09/24/2017 - 10:12

Hey Raol, This didn't work for me.

I think the error is in Mcreator itself. I took a look at the code yesterday and found out that it's missing the part where it actually names the item/block.

It might be a gradle error or a missing file.

I think you dont have the error, and that is really interesting.

Can you quickly make a short mod with a (named) item, and share the code please. I will take a look at it and see what kind of error it is. (and hopefully fix it)

 

Thanks.

Active 1 year ago
Joined Aug 2013
Points:
1161

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 730
There are simply most  two
Sun, 09/24/2017 - 11:21

There are simply most  two places where can be the issue:

1st - the code itself. You have to use Block#setUnlocalizedName() / Item#setUnlocalizedName() for setting the unlocalized name , that is later used in lang file for getting proper translation.
2nd - the lang file/s. The translation of the unlocalized name is set in the format:
item.unlocalized_name.name=name (for items)
tile.item.unlocalized_name.name=name (for blocks)

The issue here can be that the unlocalized name is written wrong, or the translation is not even there.
You can find and edit it in MCreator\user\lang , or you can use LanguageRegistry class for setting it directly from code.

Active 4 years ago
Joined Jun 2016
Points:
3648

User statistics:

  • Modifications: 10
  • Forum topics: 39
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5290
RE:Hey Raol, This didn't work
Sun, 09/24/2017 - 12:36

I don't have this error because I don't update RaolCraft 3 from weeks

Active 7 years ago
Joined Sep 2017
Points:
706

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
package mod.mcreator;
Sun, 09/24/2017 - 13:04

package mod.mcreator;

import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraft.world.World;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Item;
import net.minecraft.init.Blocks;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.Minecraft;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.Block;

import java.util.Random;
import java.util.List;

@SuppressWarnings("unchecked")
public class mcreator_thisIsAnItem {

    public mcreator_thisIsAnItem() {
    }

    public static Item block;
    public static Object instance;

    public void load(FMLInitializationEvent event) {
        if (event.getSide() == Side.CLIENT)
            Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
                    .register(block, 0, new ModelResourceLocation("testenvironmentmod:ThisIsAnItem", "inventory"));

        GameRegistry.addRecipe(new ItemStack(block, 1), new Object[]{"XXX", "X4X", "XXX", Character.valueOf('4'),
                new ItemStack(Blocks.SANDSTONE, 1, 2),});
        GameRegistry.addSmelting(new ItemStack(Blocks.LEAVES2, 1, 0), new ItemStack(block), 1.0f);
    }

    public void generateNether(World world, Random random, int chunkX, int chunkZ) {
    }

    public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
    }

    public int addFuel(ItemStack fuel) {
        return 0;
    }

    public void serverLoad(FMLServerStartingEvent event) {
    }

    public void preInit(FMLPreInitializationEvent event) {
    }

    public void registerRenderers() {
    }

    static {
        block = (new ItemthisIsAnItem());

    }

    static class ItemthisIsAnItem extends Item {

        public ItemthisIsAnItem() {
            setMaxDamage(0);
            maxStackSize = 64;
            setUnlocalizedName("ThisIsAnItem");
            setRegistryName("ThisIsAnItem");
            GameRegistry.register(this);
            setCreativeTab(CreativeTabs.MISC);
        }

        @Override
        public int getItemEnchantability() {
            return 0;
        }

        @Override
        public int getMaxItemUseDuration(ItemStack par1ItemStack) {
            return 0;
        }

        @Override
        public float getStrVsBlock(ItemStack par1ItemStack, IBlockState par2Block) {
            return 1.0F;
        }

        @Override
        public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
            list.add("adf");
        }

    }
}

 

 

 

 

I dont see any errors in it, but the name still isn't displaying.

Active 1 year ago
Joined Aug 2013
Points:
1161

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 730
Show your lang file.
Sun, 09/24/2017 - 14:13

Show your lang file.

Active 7 years ago
Joined Sep 2017
Points:
706

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Where is that located?
Sun, 09/24/2017 - 14:51

Where is that located?

Active 7 years ago
Joined Sep 2017
Points:
706

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
#Lang file was made using
Sun, 09/24/2017 - 14:55

#Lang file was made using MCreator
#Fri Sep 22 18:57:45 AST 2017
item.ThisIsAnItem.name=Cool Item Dude
item.dimensionTest_trigger.name=The Key of Life

 

This was located in C:\Pylo\MCreator175\user\lang

Active 1 year ago
Joined Aug 2013
Points:
1161

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 730
Ok, try this:Go to: MCreator
Sun, 09/24/2017 - 16:05

Ok, try this:
Go to: MCreator\forge\src\main\resources
Here is a file named: pack.mcmeta
Open it and change pack_format from 1 to 2.

Active 1 year ago
Joined Aug 2013
Points:
1161

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 730
RE:Ok, try this:Go to: MCreator
Sun, 09/24/2017 - 16:07

@#9 Oops... my mistake, the default value is 3, not 1, but that does not really matter because 1 is not valid, it is treated in same way as 1.
So as I stated in the comment above, change it to 2.

Active 7 years ago
Joined Sep 2017
Points:
706

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
OMG BRO!!! It worked!
Sun, 09/24/2017 - 17:23

OMG BRO!!! It worked!

You are Epic Dude! Thanks..!

The default value was 3, but i changed it to 2, and it worked!

Active 7 years ago
Joined Oct 2017
Points:
707

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Im having the same problem
Sun, 10/08/2017 - 12:20

Im having the same problem and i changed pack.mcmeta to 1 and its still the same.

Active 7 years ago
Joined Oct 2017
Points:
707

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Yes thx it worked just go to
Sun, 10/08/2017 - 13:40

Yes thx it worked just go to MCreator175\forge\src\main\resources and then open pack.mcmeta and change pack format to 2.

Active 6 years ago
Joined Nov 2017
Points:
825

User statistics:

  • Modifications: 5
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 44
I can only find mcmod.info…
Wed, 11/22/2017 - 06:22

I can only find mcmod.info there :O