1
Hello,
my name is nick and I just updated an old mod but I don't know how to use the new texture path thingy so I whould like to get some help from you!
just explain it using these simple .java files
main.java
testitem.java
the java files are: C:\Users\****\Desktop\Forge Mod\src\main\java\testmod
the texture is here: C:\Users\****\Desktop\Forge Mod\src\main\resources\assets\testmod\textures\items and is called testitem(.png)
I need this since if i don't get the correct path the item wont show up in the game
alread thanks for taking a look at this post and SUPER thanks if u can help me
-Nick
my name is nick and I just updated an old mod but I don't know how to use the new texture path thingy so I whould like to get some help from you!
just explain it using these simple .java files
main.java
Click to reveal
package testmod;
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="TestMod",name="Test Mod",version="v1")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class main {
public static Item testitem;
public void load(FMLInitializationEvent event){
testitem = new testitem(2000).setUnlocalizedName("testitem");
LanguageRegistry.addName(testitem, "TestItem");
}
}
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid="TestMod",name="Test Mod",version="v1")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class main {
public static Item testitem;
public void load(FMLInitializationEvent event){
testitem = new testitem(2000).setUnlocalizedName("testitem");
LanguageRegistry.addName(testitem, "TestItem");
}
}
testitem.java
Click to reveal
package testmod;
import net.minecraft.item.Item;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.*;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class testitem extends Item {
public testitem(int par1) {
super(par1);
setCreativeTab(CreativeTabs.tabMaterials); }
public void registerIcons(IconRegister iconRegister)
{
if(itemID == main.testitem.itemID)
{
this.itemIcon = iconRegister.registerIcon("testmod:testitem");
}
}
}
import net.minecraft.item.Item;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.*;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class testitem extends Item {
public testitem(int par1) {
super(par1);
setCreativeTab(CreativeTabs.tabMaterials); }
public void registerIcons(IconRegister iconRegister)
{
if(itemID == main.testitem.itemID)
{
this.itemIcon = iconRegister.registerIcon("testmod:testitem");
}
}
}
the java files are: C:\Users\****\Desktop\Forge Mod\src\main\java\testmod
the texture is here: C:\Users\****\Desktop\Forge Mod\src\main\resources\assets\testmod\textures\items and is called testitem(.png)
I need this since if i don't get the correct path the item wont show up in the game
alread thanks for taking a look at this post and SUPER thanks if u can help me
-Nick
Create an account or sign in to comment.
3
1
can u give an example of where i should make those folder(s) (path)?
cuz i can't seem to get it working
C:\Users\****\Desktop\Forge Mod\?
so what has to be where the '?' is? (using the picture from the link below)
https://www.dropbox.com/s/eekasgk6qdsyzwd/map.png?dl=0
cuz i can't seem to get it working
C:\Users\****\Desktop\Forge Mod\?
so what has to be where the '?' is? (using the picture from the link below)
https://www.dropbox.com/s/eekasgk6qdsyzwd/map.png?dl=0
1
in the mod file, set it up like this:
You should have two folders: modname (with your compiled source) and assets (for textures)
in assets you should have this path set up:
assets -> minecraft -> textures -> blocks/items (two separate folders)
Drag the textures into blocks/items.
If I am wrong, please correct me. Hope I helped ~ Blaze
You should have two folders: modname (with your compiled source) and assets (for textures)
in assets you should have this path set up:
assets -> minecraft -> textures -> blocks/items (two separate folders)
Drag the textures into blocks/items.
If I am wrong, please correct me. Hope I helped ~ Blaze
1
* Note This mod is 1.6.4 in case thats important