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

Started by retibalt on

Topic category: Help with modding (Java Edition)

Last seen on 20:26, 28. Jul 2019
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

 

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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...

Last seen on 10:21, 4. Mar 2018
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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

Last seen on 10:21, 4. Mar 2018
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

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

Show your lang file.

Last seen on 10:21, 4. Mar 2018
Joined Sep 2017
Points:

User statistics:

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

Where is that located?

Last seen on 10:21, 4. Mar 2018
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
#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

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 10:21, 4. Mar 2018
Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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!

Last seen on 14:57, 22. Dec 2017
Joined Oct 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 14:57, 22. Dec 2017
Joined Oct 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Last seen on 01:47, 17. Apr 2019
Joined Nov 2017
Points:

User statistics:

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

I can only find mcmod.info there :O