Hello Forge Team.
I have big problems with textures. I do not have any idea where to place it.
Well the Textures are loaded but Minecraft-Client says that he do not find the textures.
Well kinda stupid but i know when a error message comes i should fix it.
So now i read muchmuch tutorials. Some IronChestCode. And tested a lot. Well i give up with these .... resourcepacks. (Maybe its a good thing but i already do not like it)
Back To the problem.
So here are the codes where are the problems:
By the way. I made a easy way to add textures. So do not wonder.
Config:
package minecraftwero.common.config;
import minecraftwero.Bacon;
import minecraftwero.common.blocks.BlockBaconMaker;
import minecraftwero.common.items.BaconArmor;
import minecraftwero.common.items.BaconRecords;
import minecraftwero.common.items.BaconSword;
import minecraftwero.common.items.BaconTool;
import minecraftwero.common.items.CraftingFood;
import minecraftwero.common.items.ItemBaconFood;
import minecraftwero.common.items.ItemBlade;
import minecraftwero.common.items.ItemBlockBaconMachine;
import minecraftwero.common.items.ItemFineSword;
import minecraftwero.common.lib.BaconTextures;
import minecraftwero.common.tile.BaconMaker;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import cpw.mods.fml.common.registry.GameRegistry;
public class BaconItemConfig
{
public static BaconItems bi;
public static BaconConfig bc;
public static BaconTextures bt;
public static void loadItems()
{
//Core
bi.gayBacon = (new ItemBaconFood(bc.getItem(bc.items, "Gay Bacon", 23999), 4, true, "Gay Bacon", bt.gayBacon));
GameRegistry.registerItem(bi.gayBacon, "Gay Bacon");
//Core
bi.rawBacon = (new ItemBaconFood(bc.getItem(bc.items, "Raw Bacon", 24000), 3, true, "Raw Bacon", bt.rawBacon));
GameRegistry.registerItem(bi.rawBacon, "Raw Bacon");
//Core
bi.cookedBacon = (new ItemBaconFood(bc.getItem(bc.items, "Cooked Bacon", 24001), 5, true, "Cooked Bacon", bt.cookedBacon));
GameRegistry.registerItem(bi.cookedBacon, "Cooked Bacon");
//Core
bi.baconBoots = (new BaconArmor(bc.getItem(bc.items, "Bacon Boots", 24002), bi.baconArmor, Bacon.core.getArmorTexture("bacon"), 3, bt.baconBoots, "Bacon Boots"));
GameRegistry.registerItem(bi.baconBoots, "Bacon Boots");
//Core
bi.baconLegs = (new BaconArmor(bc.getItem(bc.items, "Bacon Leggings", 24003), bi.baconArmor, Bacon.core.getArmorTexture("bacon"), 2, bt.baconLegs, "Bacon Leggings"));
GameRegistry.registerItem(bi.baconLegs, "Bacon Legs");
//Core
bi.baconPlate = (new BaconArmor(bc.getItem(bc.items, "Bacon Chest Plate", 24004), bi.baconArmor, Bacon.core.getArmorTexture("bacon"), 1, bt.baconPlate, "Bacon Chest Plate"));
GameRegistry.registerItem(bi.baconPlate, "Bacon Plate");
//Core
bi.baconHelmet = (new BaconArmor(bc.getItem(bc.items, "Bacon Helmet", 24005), bi.baconArmor, Bacon.core.getArmorTexture("bacon"), 0, bt.baconHelmet, "Bacon Helmet"));
GameRegistry.registerItem(bi.baconHelmet, "Bacon Helmet");
//Core
bi.baconPickaxe = new BaconTool(bc.getItem(bc.items, "Bacon Pickaxe", 24006), bt.baconPickAxe, "Bacon Pickaxe", "pickaxe", 1, 5F, 100);
GameRegistry.registerItem(bi.baconPickaxe, "Bacon Pickaxe");
//Core
bi.baconAxe = new BaconTool(bc.getItem(bc.items, "Bacon Axe", 24007), bt.baconAxe, "Bacon Axe", "axe", 1, 5F, 100);
GameRegistry.registerItem(bi.baconAxe, "Bacon Axe");
//Core
bi.baconSpade = new BaconTool(bc.getItem(bc.items, "Bacon Shovel", 24008), bt.baconSpade, "Bacon Shovel", "shovel", 1, 5F, 100);
GameRegistry.registerItem(bi.baconSpade, "Bacon Spade");
//Core
bi.baconSword = new BaconSword(bc.getItem(bc.items, "Bacon Sword", 24009), "Bacon Sword", bt.baconSword);
GameRegistry.registerItem(bi.baconSword, "Bacon Sword");
//Core
bi.baconHoe = new BaconTool(bc.getItem(bc.items, "Bacon Hoe", 24010), bt.baconHoe, "Bacon Hoe", "hoe", 1, 5F, 100);
GameRegistry.registerItem(bi.baconHoe, "Bacon Hoe");
//Core
bi.fineSword = (new ItemFineSword(bc.getItem(bc.items, "Fine Sword", 24011),bt.fineSword ,"Fine Sword"));
GameRegistry.registerItem(bi.fineSword, "Fine Sword");
//Core
bi.baconDisk = new BaconRecords (bc.getItem(bc.items, "Bacon Disk", 24012), "Bacon Pancakes", "Bacon Disc", bt.baconDisc);
GameRegistry.registerItem(bi.baconDisk, "BaconPancakes");
//Core
bi.sawMill = new ItemBlade (bc.getItem(bc.items, "Saw Blade", 24015), 6000, "Saw Blade", bt.sawMill);
GameRegistry.registerItem(bi.sawMill, "Saw Blade");
//Core
bi.rottedBacon = new ItemBaconFood(bc.getItem(bc.items, "Poisen Bacon", 24016), 2, false, "Poisend Bacon", bt.rottedBacon, new PotionEffect(Potion.hunger.id, 1, 200));
GameRegistry.registerItem(bi.rottedBacon, "Poisoned Bacon");
//Core
bi.rottedPorkChop = new ItemBaconFood(bc.getItem(bc.items, "Poisen Porkchop", 24017), 2, false, "Poisend Porkchop", bt.rottedPorkChop , new PotionEffect(Potion.hunger.id, 1, 200));
GameRegistry.registerItem(bi.rottedPorkChop, "Poisoned Porkchop");
//Core
bi.baconMachine = new BlockBaconMaker(bc.getBlock(bc.blocks, "Bacon Maker", 1000), "Bacon Maker", bt.baconMaker);
GameRegistry.registerBlock(bi.baconMachine, ItemBlockBaconMachine.class, "Bacon Converter");
GameRegistry.registerTileEntity(BaconMaker.class, "BM");
bi.cheeseWheel = new CraftingFood(bc.getItem(bc.items, "Cheese Wheel", 24018), 8, 1, true, "Cheese Wheel", bt.cheeseWheel);
bi.cheeseWheel.setContainerItem(bi.cheeseWheel);
GameRegistry.registerItem(bi.cheeseWheel, "Cheese Wheel");
bi.baconNutella = (new ItemBaconFood(bc.getItem(bc.items, "Nutella on Bacon", 23998), 6, true, "Nutella on Bacon", bt.baconNutella));
GameRegistry.registerItem(bi.baconNutella, "Nutella on Bacon");
bi.nutella = new CraftingFood(bc.getItem(bc.items, "Nutella", 24014), 10, 1, true, "Nutella", bt.nutella);
bi.nutella.setContainerItem(bi.nutella);
GameRegistry.registerItem(bi.nutella, "Nutella");
}
}
ItemClass
package minecraftwero.common.items;
import minecraftwero.Bacon;
import minecraftwero.common.lib.BaconTextures;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
*
* @author Speiger
*
*/
public class ItemBaconFood extends ItemFood
{
private String name;
public String texture;
private PotionEffect[] potion;
public ItemBaconFood(int par1, int par2, boolean par3, String par4, String par5, PotionEffect...par7)
{
super(par1, par2, par3);
this.setCreativeTab(Bacon.baconMod);
name = par4;
texture = par5;
potion = par7;
this.func_111206_d(par5);
}
public ItemBaconFood(int par1, int par2, boolean par3, String par4, String par5)
{
this(par1, par2, par3, par4, par5, new PotionEffect(0, 0, 0));
}
public String getItemDisplayName(ItemStack par1)
{
return name;
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon(texture);
}
@Override
public ItemStack onEaten(ItemStack par1, World par2, EntityPlayer par3)
{
--par1.stackSize;
par3.getFoodStats().addStats(this);
par2.playSoundAtEntity(par3, "random.burp", 0.5F, par2.rand.nextFloat() * 0.1F + 0.9F);
addPotions(par1, par2, par3);
return par1;
}
public void addPotions(ItemStack par1, World par2, EntityPlayer par3)
{
for(int i = 0; i<potion.length;i++)
{
if(potion[i] != null && potion[i].getPotionID() > 0 && !par2.isRemote)
{
par3.addPotionEffect(new PotionEffect(potion[i]));
}
}
}
}
TextureLoaderClass
package minecraftwero.common.lib;
/**
*
* @author MinecraftWero, Speiger
*
*/
public class BaconTextures
{
public static String rawBacon = getTexture("rawBacon");
public static String cookedBacon = getTexture("cookedBacon");
public static String baconHelmet = getTexture("baconHelmet");
public static String baconLegs = getTexture("baconLegs");
public static String baconBoots = getTexture("baconBoots");
public static String baconPlate = getTexture("baconPlate");
public static String baconPickAxe = getTexture("baconPickaxe");
public static String baconAxe = getTexture("baconAxe");
public static String baconSpade = getTexture("baconSpade");
public static String baconSword = getTexture("baconSword");
public static String baconHoe = getTexture("baconHoe");
public static String gayBacon = getTexture("gayBacon");
public static String fineSword = getTexture("fineSword");
public static String baconDisc = getTexture("baconDisc");
public static String nutella = getTexture("nutella");
public static String baconNutella = getTexture("baconNutella");
public static String sawMill = getTexture("sawMill");
public static String rottedBacon = getTexture("rottedBacon");
public static String rottedPorkChop = getTexture("rottedPorkChop");
public static String cheeseWheel = getTexture("cheeseWheel");
public static String[] baconMaker = getMultiTexture(6, "BaconMakerBottom", "BaconMakerTop", "BaconMakerFront", "BaconMakerBack", "BaconMakerSide", "BaconMakerFrontActive");
/**
* @Example: public static String itemName = getTexture("pictureName");
* @param par1 Texture Name
* @return Icon Texture String
*/
public static String getTexture(String par1)
{
return BaconLib.modID+":"+par1;
}
public static String[] getMultiTexture(int par1, String...par2)
{
String[] output = new String[par1];
for(int i = 0; i<par1;i++)
{
output[i] = BaconLib.modID+":"+par2[i];
}
return output;
}
}
What is the problem?
Oh i forgot to tell the texturePath
Path: /src/minecraft/assets/minecraftwero/textures/items/anyThing.png
codePath: /src/minecraft/minecraftwero/ModStarts.
A picture to see where to place it would be nice. I do not use the package view. i use the navigations view its easier to find something.
Thanks for Reading. Answer would be nice