Hello techguy! Thank you for the answer on my question last april but I am sorry to bother you cause I met another dead end. You see I am trying to access a text file to read in order to generate a structure:
sc = new Scanner(new File("/src/mods/TaleOfKingdoms/LargeStructures/lostorder.txt"));
The text file is contained inside the src folder almost similar to where my textures are located (my textures are located in src/minecraft/mods/TaleOfKingdoms/textures). Like how the textures are loaded, I want to somehow find the file path in order to read the lostorder.txt as the code snippet I just gave you gives me a filenotfound error. Is there a way to successfully find the file path but not sacrificing the .zip inject of modloader? (by sacrificing, I mean more instructions like extract mod here then put text file here etc.)
ps. I checked the code for bindTexture though its very confusing how it gets the filepath.
Hey all. I seem to have sorted out most of my issues. I'll add my solutions here.
UNSOLVED (for now): Problems using multiple icons, like ItemBow:
Haven't actually fixed this one yet, as I've been spending my time fixing other things.
I copied the ItemBow class just about exactly from main and modified it into a chargeable wand. Thing is, it doesn't seem to be using the getItemIconForUseDuration function for the wand.
[code]@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("coolAliasSimpleWands:" + (this.getUnlocalizedName().substring(5) + "_standby"));
this.iconArray = new Icon[wandChargeIconNameArray.length];
for (int i = 0; i < this.iconArray.length; ++i)
{
this.iconArray[i] = iconRegister.registerIcon("coolAliasSimpleWands:" + (this.getUnlocalizedName().substring(5) + "_" + wandChargeIconNameArray[i]));
}
}
@SideOnly(Side.CLIENT)
/**
* used to cycle through icons based on their used duration, i.e. for the bow
*/
public Icon getItemIconForUseDuration(int par1)
{
return this.iconArray[par1];
}[/code]
This is code for onRightClick and StoppedUsing (copied from ItemBow and slightly modified):
[/CODE]
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
{
int j = this.getMaxItemUseDuration(par1ItemStack) - par4;
WandReleaseEvent event = new WandReleaseEvent(par3EntityPlayer, par1ItemStack, j);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled())
{
return;
}
j = event.charge;
float f = (float)j / 20.0F;
f = (f * f + f * 2.0F) / 3.0F;
if ((double)f < 0.1D)
{
return;
}
if (f > 1.0F)
{
f = 1.0F;
}
EntityMagicProjectile entityMagicProjectile = new EntityMagicProjectile(par2World, par3EntityPlayer, f * 2.0F);
if (f == 1.0F)
{
entityMagicProjectile.setIsCritical(true);
}
/** Place Potion effects here?
int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack);
int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack);
if (l > 0)
{
entityarrow.setKnockbackStrength(l);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0)
{
entityarrow.setFire(100);
}
*/
// Modify damage based on wand power
entityMagicProjectile.setDamage(entityMagicProjectile.getDamage() + ((ItemWand) par1ItemStack.getItem()).getWandMaterial().getWandPower());
// Blaze wands can start fires
if (((ItemWand) par1ItemStack.getItem()).getWandMaterial().getToolCraftingMaterial()==Item.blazeRod.itemID)
{
entityMagicProjectile.setFire(100); // this flags the entityMagicProjectile as isBurning()
}
// Knockback = wand power divided by 2, rounded down and capped at 2 (max value for effect)
int knockback = (int) Math.floor((double) ((ItemWand) par1ItemStack.getItem()).getWandMaterial().getWandPower() /2);
entityMagicProjectile.setKnockbackStrength(knockback > 2 ? 2 : knockback);
par1ItemStack.damageItem(1, par3EntityPlayer);
// Since damageItem only checks for instances of ItemBow to destroy, need to add here for wands
if (par1ItemStack.getItemDamage() == par1ItemStack.getMaxDamage())
{
par3EntityPlayer.destroyCurrentEquippedItem();
}
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(entityMagicProjectile);
}
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
WandChargeEvent event = new WandChargeEvent(par3EntityPlayer, par1ItemStack);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled())
{
return event.result;
}
Make whatever item you want to shoot Extend the Item and/or Entity you want it to act like. For example, if you want bow-like behavior, you make a new class MyArrow Extend ItemBow. It will then behave just like bows and shoot arrows, except for any functions you override.
Harder solution:
Copy/paste from similar classes into your own classes and then modify according to your needs - you'll need an Item, an EntitytoShoot, and the RenderEntitytoShoot. Be sure to register your custom renderer in your ClientProxy. If you do all that and you're still getting invisible projectiles, the problem is probably here:
[code]if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(new EntitySnowball(par2World, par3EntityPlayer));
}[/code]
For some reason, all the base classes have that "if (!par2World.isRemote)" before they spawn the Entity, but this will prevent your custom Entity from spawning if you leave it as is. Just delete the if statement and it will spawn correctly. That little line there caused me a week of anguish.
From my original post:
Similarly, when I use my wand, it works just like a bow except it doesn't render the arrows, even before I made my own classes to handle that. My WandReleaseEvent and WandChargeEvent classes are exactly as the equivalent bow classes, the wand demonstrably inflicts more or less damage depending on the charge so I know that part is working. I tried copying the RenderArrow class and changing the names, even leaving the default arrow.png texture in the default location. I'm really stumped on that one.
SOLVED: Adding potion effects to an item or projectile:
Thanks to TechGuy543 - the food tutorial was just what I needed for the adding potion effects to my wand.
This is all sorted out. Sorry, one final question: does anyone know how to use ItemStack-resolvable Potions within recipes? I tried using just Potion.potionName (eg. Potion.poison) which Eclipse compiled correctly, but at runtime it threw null pointer exceptions. I then tried [code]ItemStack potionPoison = new ItemStack(Item.potion, 1, Potion.poison.id);[/code] which seemed to work, but I didn't get any results putting potions of poison into the crafting table...
Thanks again for any help, and awesome work on the tutorials!
every single time i try to make a block i get this error message:
2013-08-03 17:14:56 [SEVERE] [ForgeModLoader] Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue
2013-08-03 17:14:56 [SEVERE] [ForgeModLoader]
mcp{7.51} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{5.2.23.737} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Forge{7.8.1.737} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
kb3jumbled{v1.0.0} [Jumbled Mess!] (bin) Unloaded->Constructed->Pre-initialized->Errored
2013-08-03 17:14:56 [SEVERE] [ForgeModLoader] The following problems were captured during this phase
2013-08-03 17:14:56 [SEVERE] [ForgeModLoader] Caught exception from kb3jumbled
java.lang.ExceptionInInitializerError
at kb3.bobjoromods.block.BlockRegistry.registerBlocks(BlockRegistry.java:9)
at kb3.bobjoromods.main.Main.load(Main.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:192)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:213)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:448)
at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
at net.minecraft.client.Minecraft.run(Minecraft.java:733)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 8050
at net.minecraft.block.Block.<init>(Block.java:338)
at kb3.bobjoromods.block.DeployHouse.<init>(DeployHouse.java:9)
at kb3.bobjoromods.block.Blocks.<clinit>(Blocks.java:8)
... 34 more
2013-08-03 17:15:06 [INFO] [STDERR] cpw.mods.fml.common.LoaderException: java.lang.ExceptionInInitializerError
2013-08-03 17:15:06 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.transition(LoadController.java:147)
2013-08-03 17:15:06 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:692)
2013-08-03 17:15:06 [INFO] [STDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:213)
2013-08-03 17:15:06 [INFO] [STDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:448)
2013-08-03 17:15:06 [INFO] [STDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
2013-08-03 17:15:06 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:733)
2013-08-03 17:15:06 [INFO] [STDERR] at java.lang.Thread.run(Thread.java:680)
2013-08-03 17:15:06 [INFO] [STDERR] Caused by: java.lang.ExceptionInInitializerError
2013-08-03 17:15:06 [INFO] [STDERR] at kb3.bobjoromods.block.BlockRegistry.registerBlocks(BlockRegistry.java:9)
2013-08-03 17:15:06 [INFO] [STDERR] at kb3.bobjoromods.main.Main.load(Main.java:31)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-08-03 17:15:06 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
2013-08-03 17:15:06 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-08-03 17:15:06 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2013-08-03 17:15:06 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:192)
2013-08-03 17:15:06 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:172)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2013-08-03 17:15:06 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2013-08-03 17:15:06 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
2013-08-03 17:15:06 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267)
2013-08-03 17:15:06 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)
2013-08-03 17:15:06 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:691)
2013-08-03 17:15:06 [INFO] [STDERR] ... 5 more
2013-08-03 17:15:06 [INFO] [STDERR] Caused by: java.lang.ArrayIndexOutOfBoundsException: 8050
2013-08-03 17:15:06 [INFO] [STDERR] at net.minecraft.block.Block.<init>(Block.java:338)
2013-08-03 17:15:06 [INFO] [STDERR] at kb3.bobjoromods.block.DeployHouse.<init>(DeployHouse.java:9)
2013-08-03 17:15:06 [INFO] [STDERR] at kb3.bobjoromods.block.Blocks.<clinit>(Blocks.java:8)
2013-08-03 17:15:06 [INFO] [STDERR] ... 34 more
Im running on a mac. Please help.
I can include any attachments necessary
I need to know where to get some code for the seeds so you can plant a block like say wheat and it to grow in 3 stages like carrots.
Its for forge by the way please get back to me soon thanks.
Hi. I have a quick question... How do you add a modded item to a recipe?
Same way you would with vanilla items, just replace the vanilla item code with your or someone else's item code. If you wanted to put, lets say, the Thaumonomicaun in, then you just find the code for the Thaumonomicaun, which I thinks is Thaumcraft_Thaumonomicaun, and put that in instead of, lets say, wood, which is wood. Then you just made it so you can change the Thaumonomicaun intoo wooden planks, unless you change that too.
The text file is contained inside the src folder almost similar to where my textures are located (my textures are located in src/minecraft/mods/TaleOfKingdoms/textures). Like how the textures are loaded, I want to somehow find the file path in order to read the lostorder.txt as the code snippet I just gave you gives me a filenotfound error. Is there a way to successfully find the file path but not sacrificing the .zip inject of modloader? (by sacrificing, I mean more instructions like extract mod here then put text file here etc.)
ps. I checked the code for bindTexture though its very confusing how it gets the filepath.
Check out this. You might like it
@EventHandler. The Forge classes retrieve the Parameter type and designate the method to be called at whichever Event that is listed.
Thanks!
=======
(this is my 42nd post :D)
Check out this. You might like it
UNSOLVED (for now): Problems using multiple icons, like ItemBow:
Haven't actually fixed this one yet, as I've been spending my time fixing other things.
I copied the ItemBow class just about exactly from main and modified it into a chargeable wand. Thing is, it doesn't seem to be using the getItemIconForUseDuration function for the wand.
[code]@SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon("coolAliasSimpleWands:" + (this.getUnlocalizedName().substring(5) + "_standby")); this.iconArray = new Icon[wandChargeIconNameArray.length]; for (int i = 0; i < this.iconArray.length; ++i) { this.iconArray[i] = iconRegister.registerIcon("coolAliasSimpleWands:" + (this.getUnlocalizedName().substring(5) + "_" + wandChargeIconNameArray[i])); } } @SideOnly(Side.CLIENT) /** * used to cycle through icons based on their used duration, i.e. for the bow */ public Icon getItemIconForUseDuration(int par1) { return this.iconArray[par1]; }[/code]
This is code for onRightClick and StoppedUsing (copied from ItemBow and slightly modified):
[/CODE]
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
{
int j = this.getMaxItemUseDuration(par1ItemStack) - par4;
WandReleaseEvent event = new WandReleaseEvent(par3EntityPlayer, par1ItemStack, j);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled())
{
return;
}
j = event.charge;
float f = (float)j / 20.0F;
f = (f * f + f * 2.0F) / 3.0F;
if ((double)f < 0.1D)
{
return;
}
if (f > 1.0F)
{
f = 1.0F;
}
EntityMagicProjectile entityMagicProjectile = new EntityMagicProjectile(par2World, par3EntityPlayer, f * 2.0F);
if (f == 1.0F)
{
entityMagicProjectile.setIsCritical(true);
}
/** Place Potion effects here?
int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack);
if (k > 0)
{
entityarrow.setDamage(entityarrow.getDamage() + (double)k * 0.5D + 0.5D);
}
int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack);
if (l > 0)
{
entityarrow.setKnockbackStrength(l);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0)
{
entityarrow.setFire(100);
}
*/
// Modify damage based on wand power
entityMagicProjectile.setDamage(entityMagicProjectile.getDamage() + ((ItemWand) par1ItemStack.getItem()).getWandMaterial().getWandPower());
// Blaze wands can start fires
if (((ItemWand) par1ItemStack.getItem()).getWandMaterial().getToolCraftingMaterial()==Item.blazeRod.itemID)
{
entityMagicProjectile.setFire(100); // this flags the entityMagicProjectile as isBurning()
}
// Knockback = wand power divided by 2, rounded down and capped at 2 (max value for effect)
int knockback = (int) Math.floor((double) ((ItemWand) par1ItemStack.getItem()).getWandMaterial().getWandPower() /2);
entityMagicProjectile.setKnockbackStrength(knockback > 2 ? 2 : knockback);
par1ItemStack.damageItem(1, par3EntityPlayer);
// Since damageItem only checks for instances of ItemBow to destroy, need to add here for wands
if (par1ItemStack.getItemDamage() == par1ItemStack.getMaxDamage())
{
par3EntityPlayer.destroyCurrentEquippedItem();
}
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(entityMagicProjectile);
}
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
WandChargeEvent event = new WandChargeEvent(par3EntityPlayer, par1ItemStack);
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled())
{
return event.result;
}
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
return par1ItemStack;
}
[/CODE]
SOLVED: Custom Entities not rendering
Simple solution:
Make whatever item you want to shoot Extend the Item and/or Entity you want it to act like. For example, if you want bow-like behavior, you make a new class MyArrow Extend ItemBow. It will then behave just like bows and shoot arrows, except for any functions you override.
Copy/paste from similar classes into your own classes and then modify according to your needs - you'll need an Item, an EntitytoShoot, and the RenderEntitytoShoot. Be sure to register your custom renderer in your ClientProxy. If you do all that and you're still getting invisible projectiles, the problem is probably here:
[code]if (!par2World.isRemote) { par2World.spawnEntityInWorld(new EntitySnowball(par2World, par3EntityPlayer)); }[/code]
For some reason, all the base classes have that "if (!par2World.isRemote)" before they spawn the Entity, but this will prevent your custom Entity from spawning if you leave it as is. Just delete the if statement and it will spawn correctly. That little line there caused me a week of anguish.
Similarly, when I use my wand, it works just like a bow except it doesn't render the arrows, even before I made my own classes to handle that. My WandReleaseEvent and WandChargeEvent classes are exactly as the equivalent bow classes, the wand demonstrably inflicts more or less damage depending on the charge so I know that part is working. I tried copying the RenderArrow class and changing the names, even leaving the default arrow.png texture in the default location. I'm really stumped on that one.
SOLVED: Adding potion effects to an item or projectile:
Thanks to TechGuy543 - the food tutorial was just what I needed for the adding potion effects to my wand.
SOLVED: Using potions in crafting recipes
I solved my problem using potions in recipes and made a tutorial on it. If you need help with this, check it out here: http://www.minecraftforum.net/topic/1891579-using-potions-in-crafting-recipes/
From my original post:
This is all sorted out.
Sorry, one final question: does anyone know how to use ItemStack-resolvable Potions within recipes? I tried using just Potion.potionName (eg. Potion.poison) which Eclipse compiled correctly, but at runtime it threw null pointer exceptions. I then tried [code]ItemStack potionPoison = new ItemStack(Item.potion, 1, Potion.poison.id);[/code] which seemed to work, but I didn't get any results putting potions of poison into the crafting table...I can include any attachments necessary
Its for forge by the way please get back to me soon thanks.
Same way you would with vanilla items, just replace the vanilla item code with your or someone else's item code. If you wanted to put, lets say, the Thaumonomicaun in, then you just find the code for the Thaumonomicaun, which I thinks is Thaumcraft_Thaumonomicaun, and put that in instead of, lets say, wood, which is wood. Then you just made it so you can change the Thaumonomicaun intoo wooden planks, unless you change that too.