Specific Potion Types in Recipes

Started by Timelord_10 on Thu, 01/17/2019 - 02:40

Topic category: Help with modding (Java Edition)

Last seen on 20:38, 15. Aug 2020
Joined Mar 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Specific Potion Types in Recipes
Thu, 01/17/2019 - 02:40

Hey, I was trying to make a crafting recipe, so that certain potion types can be combined to make other potions. I was doing this with a custom crafting block, using procedures. However, I did notice that there isn't an option to chose specific potion types (like a Wither Potion, or Splash Potion of Poison). Does anyone know a work around? Any help is appreciated! ;)

Last seen on 11:56, 19. Oct 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The only workaround at the…
Sat, 01/19/2019 - 15:42

The only workaround at the moment would be custom code, so you set the proper metadata of the potion in the recipe code.

Last seen on 16:12, 19. Jul 2020
Joined Jun 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Would this metadata be nbt…
Sun, 01/27/2019 - 22:50

Would this metadata be nbt tag data?  Or similar to how you used to get a subset of an item (block, etc), such as "dark oak planks" would be like "minecraft:wood_planks:5" (you of course now use "dark_oak_planks")?  And where would it go in the code?  Each ingredient is like so in the code:
 

'1', Ingredient.fromStacks(new ItemStack(Blocks.PLANKS, (int) (1), 5))

Note I used "dark oak planks" in the above example as one of the ingredients, and how it ends in '5'.  Is that the # that has to be changed to use a specific potion as an ingredient?

Thanks!

Last seen on 11:56, 19. Oct 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think the ID would do it,…
Mon, 01/28/2019 - 10:58

I think the ID would do it, but check the Minecraft Wiki to be sure.

Last seen on 16:12, 19. Jul 2020
Joined Jun 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Ok, well, since we're…
Tue, 01/29/2019 - 23:47

Ok, well, since we're talking about using a potion in a recipe:

The Minecraft wiki shows that a specific type of potion is stored in an nbt tag.  So, if I wanted to get a Healing II potion, I'd issue the command:
 

/give @p minecraft:potion 1 0 {Potion:"minecraft:strong_healing"}

The Minecraft id is obviously "minecraft:potion".  But how do I get that nbt tag into the code so that I can use a *specific* type of potion for a recipe ingredient?  Can I just do this:
 

'1', Ingredient.fromStacks(new ItemStack(Blocks.POTIONITEM, (int) (1), "minecraft:strong_healing"))

?

Because using a number there instead does nothing at all.  I've even used the old numerical values for potions (i.e., the "Damage" value, such as "minecraft:potion:8373") to get a particular potion and nothing seems to work. :-/

Thanks!

 

Last seen on 11:56, 19. Oct 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I have found this on this…
Wed, 01/30/2019 - 14:31

I have found this on this page (http://www.minecraftforge.net/forum/topic/41540-1102-solved-specifying-…):

PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.STRONG_HEALING));

to use it in your code:

'1', Ingredient.fromStacks(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.STRONG_HEALING));)

 

Last seen on 16:12, 19. Jul 2020
Joined Jun 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Ooh, it *doesn't* need to be…
Wed, 01/30/2019 - 16:22

Ooh, it *doesn't* need to be an integer.  Hot diggity dog!  You're my hero.

Last seen on 13:47, 21. Jun 2020
Joined May 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
As I am very new to all this…
Sun, 05/17/2020 - 12:53

As I am very new to all this and only know the most basic basics about programming, could you please tell me where exactly I have to put that code in? :§

Last seen on 13:47, 21. Jun 2020
Joined May 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
what does that  '1' stand…
Mon, 05/18/2020 - 18:11

what does that  '1' stand for?