The problem with the recipe isn't that it won't work but that it won't accept the potion (I'm trying to use a potion of harming for the recipe) because it'll work with anything but the potion. Am I using the wrong id maybe?
Okay, just made a quick recipe using the method I mentioned above and it works great.....try using this link here, it has potion ids and their length of time so when crafting you know which one you are using...
So, for whatever reason the potion of harming doesn't work. So I decided to switch to the poison potion, which does work. I don't know why the harming potion doesn't work, and I was using the correct id...
Thanks for your help though
So I ended up in this same situation:
Turns out, the creative mode inventory potion of harming has a different metadata than the survival brewed.
8204 is the survival 'damage value.'
8264 is the creative 'damage value.'
Likewise:
Potion of Instant Health, 8261
Night Vision, 8230
Weakness, 8232
Slowness, 8234
Invisibility, 8238
(the lv2, extended, reverted, splash IDs are similarly offset)
That said, one should always use the survival value in crafting recipes, but including the creative values as well might be beneficial.Arise from the grave!
So I ended up in this same situation:
Turns out, the creative mode inventory potion of harming has a different metadata than the survival brewed.
8204 is the survival 'damage value.'
8264 is the creative 'damage value.'
Likewise:
Potion of Instant Health, 8261
Night Vision, 8230
Weakness, 8232
Slowness, 8234
Invisibility, 8238
(the lv2, extended, reverted, splash IDs are similarly offset)
That said, one should always use the survival value in crafting recipes, but including the creative values as well might be beneficial.
Rollback Post to RevisionRollBack
Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.
Is there a way to get the correct potion ID via code rather than directly inputting the value?
For example: new ItemStack(Item.potion, 1, 16388);
This can be used in crafting for a splash potion of poison, but I'd like to use something like so:
new ItemStack(Item.potion, 1, Potion.poison.id);
Potion.poison.id is 19, though, so it obviously doesn't work.
The benefit of doing it without a direct value would be if they ever change the item IDs, you don't have to worry about going through all the code updating all the values.
A solution I came up with, although a bit tedious, is to make my own EnumPotionID class like so:
public enum EnumPotionID
{
POTION_POISON(8196),
POTION_POISON_II(8228),
POTION_POISON_EXT(8260),
POTION_POISON_SPLASH(16388),
POTION_POISON_SPLASH_II(16420),
POTION_POISON_SPLASH_EXT(16452);
private final int truePotionID;
private EnumPotionID(int par1) {
this.truePotionID = par1;
}
public int getPotionID()
{
return this.truePotionID;
}
/* POTION IDs
373:16 Awkward Potion
373:32 Thick Potion
373:64 Mundane Potion
373:8193 Regeneration Potion (0:45)
373:8194 Swiftness Potion (3:00)
373:8195 Fire Resistance Potion (3:00)
373:8196 Poison Potion (0:45)
373:8197 Healing Potion
373:8198 Night Vision Potion (3:00)
373:8200 Weakness Potion (1:30)
373:8201 Strength Potion (3:00)
373:8202 Slowness Potion (1:30)
373:8204 Harming Potion
373:8206 Invisibility Potion (3:00)
373:8225 Regeneration Potion II (0:22)
373:8226 Swiftness Potion II (1:30)
373:8228 Poison Potion II (0:22)
373:8229 Healing Potion II
373:8233 Strength Potion II (1:30)
373:8236 Harming Potion II
373:8257 Regeneration Potion (2:00)
373:8258 Swiftness Potion (8:00)
373:8259 Fire Resistance Potion (8:00)
373:8260 Poison Potion (2:00)
373:8262 Night Vision Potion (8:00)
373:8264 Weakness Potion (4:00)
373:8265 Strength Potion (8:00)
373:8266 Slowness Potion (4:00)
373:8270 Invisibility Potion (8:00)
373:8289 Regeneration Potion II (1:00)
373:8290 Swiftness Potion II (4:00)
373:8292 Poison Potion II (1:00)
373:8297 Strength Potion II (4:00)
373:16385 Regeneration Splash (0:33)
373:16386 Swiftness Splash (2:15)
373:16387 Fire Resistance Splash (2:15)
373:16388 Poison Splash (0:33)
373:16389 Healing Splash
373:16390 Night Vision Splash (2:15)
373:16392 Weakness Splash (1:07)
373:16393 Strength Splash (2:15)
373:16394 Slowness Splash (1:07)
373:16396 Harming Splash
373:16398 Invisibility Splash (2:15)
373:16417 Regeneration Splash II (0:16)
373:16418 Swiftness Splash II (1:07)
373:16420 Poison Splash II (0:16)
373:16421 Healing Splash II
373:16425 Strength Splash II (1:07)
373:16428 Harming Splash II
373:16449 Regeneration Splash (1:30)
373:16450 Swiftness Splash (6:00)
373:16451 Fire Resistance Splash (6:00)
373:16452 Poison Splash (1:30)
373:16454 Night Vision Splash (6:00)
373:16456 Weakness Splash (3:00)
373:16457 Strength Splash (6:00)
373:16458 Slowness Splash (3:00)
373:16462 Invisibility Splash (6:00)
373:16481 Regeneration Splash II (0:45)
373:16482 Swiftness Splash II (3:00)
373:16484 Poison Splash II (0:45)
373:16489 Strength Splash II (3:00)
*/
}
Then you can get the correct ID by calling EnumPotionID.<name of potion you want> (such as .POTION_POISON_SPLASH). Then if the ID ever changes, you only have to change it in this one class and the rest will automatically be updated. Plus it just makes the code that much more readable.
EDIT: Obviously, I haven't finished enumerating all the values yet. It's just an example.
This is what I have in my @Init load method:
I have also tried the in-game meta value of 8204, but neither works. What am I doing wrong?
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
this will craft the potion, but it works the other way too...
Find out how I generate....coolAlias...world structure generation and rotation tool...
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
Find out how I generate....coolAlias...world structure generation and rotation tool...
Find out how I generate....coolAlias...world structure generation and rotation tool...
Thanks for your help though
Also, check out my YouTube channel: www.YouTube.com/StrongJoshua
Find out how I generate....coolAlias...world structure generation and rotation tool...
So I ended up in this same situation:
Turns out, the creative mode inventory potion of harming has a different metadata than the survival brewed.
8204 is the survival 'damage value.'
8264 is the creative 'damage value.'
Likewise:
Potion of Instant Health, 8261
Night Vision, 8230
Weakness, 8232
Slowness, 8234
Invisibility, 8238
(the lv2, extended, reverted, splash IDs are similarly offset)
That said, one should always use the survival value in crafting recipes, but including the creative values as well might be beneficial.Arise from the grave!
So I ended up in this same situation:
Turns out, the creative mode inventory potion of harming has a different metadata than the survival brewed.
8204 is the survival 'damage value.'
8264 is the creative 'damage value.'
Likewise:
Potion of Instant Health, 8261
Night Vision, 8230
Weakness, 8232
Slowness, 8234
Invisibility, 8238
(the lv2, extended, reverted, splash IDs are similarly offset)
That said, one should always use the survival value in crafting recipes, but including the creative values as well might be beneficial.
For example: new ItemStack(Item.potion, 1, 16388);
This can be used in crafting for a splash potion of poison, but I'd like to use something like so:
new ItemStack(Item.potion, 1, Potion.poison.id);
Potion.poison.id is 19, though, so it obviously doesn't work.
The benefit of doing it without a direct value would be if they ever change the item IDs, you don't have to worry about going through all the code updating all the values.
Then you can get the correct ID by calling EnumPotionID.<name of potion you want> (such as .POTION_POISON_SPLASH). Then if the ID ever changes, you only have to change it in this one class and the rest will automatically be updated. Plus it just makes the code that much more readable.
EDIT: Obviously, I haven't finished enumerating all the values yet. It's just an example.
EDIT 2: I made a tutorial on how to use potions in crafting recipes. Check it out here: http://www.minecraftforum.net/topic/1891579-using-potions-in-crafting-recipes/