Skip to main content
Moved each error message into quote block, highlighted variable names, removed grave accents wrapping code block
Source Link

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey".:

The method setTextureName(String) is undefined for the type ItemKey

I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says "Syntax error on token ":", delete this token",

Syntax error on token ":", delete this token

an error on the + sign that says "The operator + is undefined for the argument type(s) String",

The operator + is undefined for the argument type(s) String

and finally andan error on "key" that says "The method setTextureName(String) is undefined for the type ItemKey".

The method setTextureName(String) is undefined for the type ItemKey

This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODIDMODID to modidmodid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modidmodid saying that "modid cannot be resolved or is not a field".

modid cannot be resolved or is not a field

`packagepackage com.arti.artismod;

import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item {
    private String name = "key";
    public ItemKey() {
        setUnlocalizedName(ArtisMod.MODID + "_" + "key");
        setTextureName(ArtisMod.MODID + ":" + "key");
        setCreativeTab(CreativeTabs.tabMisc);
    }
}`

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey". I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says "Syntax error on token ":", delete this token", an error on the + sign that says "The operator + is undefined for the argument type(s) String", and finally and error on "key" that says "The method setTextureName(String) is undefined for the type ItemKey". This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that "modid cannot be resolved or is not a field".

`package com.arti.artismod;

import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item {
    private String name = "key";
    public ItemKey() {
        setUnlocalizedName(ArtisMod.MODID + "_" + "key");
        setTextureName(ArtisMod.MODID + ":" + "key");
        setCreativeTab(CreativeTabs.tabMisc);
    }
}`

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says:

The method setTextureName(String) is undefined for the type ItemKey

I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says:

Syntax error on token ":", delete this token

an error on the + sign that says

The operator + is undefined for the argument type(s) String

and finally an error on "key" that says

The method setTextureName(String) is undefined for the type ItemKey

This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that

modid cannot be resolved or is not a field

package com.arti.artismod;

import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item {
    private String name = "key";
    public ItemKey() {
        setUnlocalizedName(ArtisMod.MODID + "_" + "key");
        setTextureName(ArtisMod.MODID + ":" + "key");
        setCreativeTab(CreativeTabs.tabMisc);
    }
}
added 2 characters in body
Source Link

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey". I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says "Syntax error on token ":", delete this token", an error on the + sign that says "The operator + is undefined for the argument type(s) String", and finally and error on "key" that says "The method setTextureName(String) is undefined for the type ItemKey". This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that "modid cannot be resolved or is not a field".

`package com.arti.artismod;

import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item {
    private String name = "key";
    public ItemKey() {
        setUnlocalizedName(ArtisMod.MODID + "_" + "key");
        setTextureName(ArtisMod.MODID + ":" + "key");
        setCreativeTab(CreativeTabs.tabMisc);
    }
}`

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey". I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says "Syntax error on token ":", delete this token", an error on the + sign that says "The operator + is undefined for the argument type(s) String", and finally and error on "key" that says "The method setTextureName(String) is undefined for the type ItemKey". This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that "modid cannot be resolved or is not a field".

`package com.arti.artismod;

import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item {
    private String name = "key";
    public ItemKey() {
        setUnlocalizedName(ArtisMod.MODID + "_" + "key");
        setTextureName(ArtisMod.MODID + : + "key");
        setCreativeTab(CreativeTabs.tabMisc);
    }
}`

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey". I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says "Syntax error on token ":", delete this token", an error on the + sign that says "The operator + is undefined for the argument type(s) String", and finally and error on "key" that says "The method setTextureName(String) is undefined for the type ItemKey". This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that "modid cannot be resolved or is not a field".

`package com.arti.artismod;

import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item {
    private String name = "key";
    public ItemKey() {
        setUnlocalizedName(ArtisMod.MODID + "_" + "key");
        setTextureName(ArtisMod.MODID + ":" + "key");
        setCreativeTab(CreativeTabs.tabMisc);
    }
}`
added 52 characters in body
Source Link
jzx
  • 3.8k
  • 2
  • 26
  • 38

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey". I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says "Syntax error on token ":", delete this token", an error on the + sign that says "The operator + is undefined for the argument type(s) String", and finally and error on "key" that says "The method setTextureName(String) is undefined for the type ItemKey". This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that "modid cannot be resolved or is not a field".

`package com.arti.artismod;

import net.minecraft.item.Item; import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item { private String name = "key"; public ItemKey() { setUnlocalizedName(ArtisMod.MODID + "_" + "key"); setTextureName(ArtisMod.MODID + : + "key"); setCreativeTab(CreativeTabs.tabMisc); } }`

`package com.arti.artismod;

import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item {
    private String name = "key";
    public ItemKey() {
        setUnlocalizedName(ArtisMod.MODID + "_" + "key");
        setTextureName(ArtisMod.MODID + : + "key");
        setCreativeTab(CreativeTabs.tabMisc);
    }
}`

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey". I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says "Syntax error on token ":", delete this token", an error on the + sign that says "The operator + is undefined for the argument type(s) String", and finally and error on "key" that says "The method setTextureName(String) is undefined for the type ItemKey". This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that "modid cannot be resolved or is not a field".

`package com.arti.artismod;

import net.minecraft.item.Item; import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item { private String name = "key"; public ItemKey() { setUnlocalizedName(ArtisMod.MODID + "_" + "key"); setTextureName(ArtisMod.MODID + : + "key"); setCreativeTab(CreativeTabs.tabMisc); } }`

I am attempting to make an item using the latest version of Forge. For some reason, the setTextureName method gives me an error that says "The method setTextureName(String) is undefined for the type ItemKey". I have been trying to fix this for a while, and notice that when I remove the quotation marks from the colon the error for setTextureName disappears, but I get an error on the colon that says "Syntax error on token ":", delete this token", an error on the + sign that says "The operator + is undefined for the argument type(s) String", and finally and error on "key" that says "The method setTextureName(String) is undefined for the type ItemKey". This is my first time trying to make an item, so help would be greatly appreciated.

EDIT: I just figured out that if I change MODID to modid in the setTextureName method I stop getting an error message for setTextureName but instead get an error for modid saying that "modid cannot be resolved or is not a field".

`package com.arti.artismod;

import net.minecraft.item.Item;
import net.minecraft.creativetab.CreativeTabs;

public class ItemKey extends Item {
    private String name = "key";
    public ItemKey() {
        setUnlocalizedName(ArtisMod.MODID + "_" + "key");
        setTextureName(ArtisMod.MODID + : + "key");
        setCreativeTab(CreativeTabs.tabMisc);
    }
}`
added 233 characters in body
Source Link
Loading
Source Link
Loading