Specialty Drink - pluto7073/PlutosDrinksAPI GitHub Wiki
Specialty Drinks are special recipes that represent a base drink and a series of additions. These can have additional effects, not just the ones given by the additions it has.
Recipes for various Specialty Drinks can be viewed via REI (other recipe viewer support coming soon). Here you will be able to see the base drink you start with, and a series of items you need to add to the drink in order to create it. A list of built-in drinks can be found below
Pluto's Coffee Mod
Base: Latte
Additions:
Espresso Shot x2
Caffeine: 150
Extra Effects:
Clears All Harmful Effects
Base: Latte
Additions:
Mocha Syrup x2Espresso Shot x2
Caffeine: 150
Extra Effects:
Restores 12 HungerClears All Harmful Effects
Base: Any Brewed Coffee
Additions:
Espresso Shot x3
Caffeine: 350
Extra Effects:
Haste III for 2 Minutes
Base: Latte
Additions:
HoneyCaramel x2Espresso Shot x2
Caffeine: 150
Extra Effects:
Health Boost III for 2 MinutesRegeneration for 10 SecondsAbsorption for 10 SecondsRestores 3 Hunger
Tea Time
Base: Black Tea
Additions:
IceHoneySugar x2
Caffeine: 50
Extra Effects:
Standard Black Tea EffectsRestores 3 HungerRegeneration II for 10 Seconds
Base: Concealing Tea
Additions:
IceMilkChorus FruitEcho Shard
Caffeine: 50
Extra Effects:
Standard Concealing Tea EffectsFire Resistance II for 10 SecondsClears All Harmful EffectsTeleports you to a random location in a 12 Block radiusApplies the Glowing effect to anyone (except you) in an 8 Block radius for 30 secondsRegeneration II for 10 seconds
The Art of Bartending
Base: Cocktail Glass
Additions:
IceShot of Vodka x4Shot of Apple Liqueur x2SugarApple
Alcohol: 72g (~3.21oz of Pure Alcohol)
Extra Effects:
Restores 6 HungerFire Resistance II for 10 seconds
Base: Cocktail Glass
Additions:
Shot of VodkaShot of Coffee LiqueurEspresso ShotSugarCocoa BeanCoffee Bean
Alcohol: 26g (~1.15oz of Pure Alcohol)
Caffeine: 80
Extra Effects:
Restores 3 Hunger
Base: Cocktail Glass
Additions:
IceShot of Dry VermouthShot of Gin x3
Alcohol: 51g (~2.27oz of Pure Alcohol)
Extra Effects:
Fire Resistance II for 10 Seconds
Base: Cocktail Glass
Additions:
IceShot of Tequila x2Shot of Orange LiqueurLime
Alcohol: 34g (~1.51oz of Pure Alcohol)
Extra Effects:
Fire Resistance II for 10 secondsRestores 3 Hunger
The default kind of specialty drink, this is also the value of type if not specified.
In this type, the base parameter is replaced with tea, which takes in the ID of a tea type. This kind of drink always has Brewed Tea as a base, and in order to craft this kind of drink it requires that the tea type match exactly.
In this type, the base parameter is replaced with coffeeType, and takes in the ID of a coffee type. Similar to the above one this always has Brewed Coffee as a base, and the coffee type must match exactly
Custom Specialty Drinks can be added via datapacks. These files have a similar structure to custom drink additions.
In your namespace folder of your datapack, create a new folder called specialty_drinks. This is where our drinks will be stored.
Create a new .json file in this folder. The name of this file is the ID of your specialty drink. Below is the syntax of the Specialty Drink JSON file, followed by an explanation of each part.
{
"type": "pdapi:specialty_drink",
"base": "pdapi:example_drink",
"additions": [],
"pdapi:caffeine": 0,
"bartending:alcohol": 0,
"color": 0,
"onDrinkActions": [],
"name": "Example Name"
}type: This is the type of specialty drink. This option can be omitted (defaults to pdapi:specialty_drink). This determines how the file is loaded into the game. Differences in other types are shown below.
base: The ID of the base item of the drink. If you want to use an item that has a different in progress item then specify the in-progress item as the base (E.G. you want the base to be a cocktail glass, which turns into a mixed drink upon adding an item, specify bartending:mixed_drink).
additions: A list of steps to get this drink. This should be a list of IDs of each addition. (E.G. "additions": ["pdapi:ice", "pdapi:sugar"]
pdapi:caffeine: The amount of caffeine in the drink (Defaults to 0 and can be omitted)
bartending:alcohol: The amount of alcohol in the drink (Defaults to 0 and can be omitted)
Note: Other mods can add their own chemicals. These are specified in the file in the same way as caffeine and alcohol and each can be left out.
color: An int representing the color of the drink in decimal form. You can use this page to see some decimal color values that Minecraft uses.
onDrinkActions: A list of actions to apply to the player when they drink it. See the tutorial for custom drink additions for syntax help.
Note: Due to a bug, when consuming a specialty drink it does not apply the actions of each of the steps for the drink, so until that it fixed you should add each of the actions here.
name: The name to be displayed on the Specialty Drink item. This can be either specified here or in a resourcepack using the translation key drink.namespace.name_of_drink_file.
In the 1.20.4 version of the mod, caffeine (and other chemicals) are now defined in a specific section of the JSON file rather than the main part, exactly like drink additions.
{
"chemicals": {
"pdapi:caffeine": 0,
"bartending:alcohol": 0,
"example:other_chemical_added_by_mod": 0
},
[...]
}For this example, we will be creating a drink using a Glass of Red Wine from bartending and various ingredients. Since we want the base to be red wine, then that gets us "base":"bartending:glass_of_red_wine:. Then say we want to add Glow Berries and Chorus Fruit, and we want our resulting drink to levitate the player. We could call this Levitating Wine.
data/example/specialty_drinks/levitating_wine.json
{
"type": "pdapi:specialty_drink", // Unneeded but we'll add it anyway
"base": "bartending:glass_of_red_wine", // Glass of Red Wine as our base
"additions": [ // The IDs of Glow Berries and Chorus Fruit additions
"pdapi:glow_berries",
"pdapi:chorus_fruit"
],
"bartending:alcohol": 14, // Theres about 14g of Alcohol in 1 glass of wine in TAOB
"color": 11743532, // The Minecraft Red Dye color
"onDrinkActions": [
{ // These first two actions just add the actions for Chorus Fruit and Glow Berries
"type": "pdapi:chorus_teleport",
"maxRadius": 8
},
{
"type": "pdapi:apply_status_effect",
"effect": "minecraft:glowing",
"duration": 1200,
"amplifier": 0
},
{ // Levitation for 10 seconds
"type": "pdapi:apply_status_effect",
"effect": "minecraft:levitation",
"duration": 200,
"amplifier": 0
}
],
"name": "Levitating Wine"
}And just like that, you have a custom Specialty Drink! This should show up in both REI and the Specialty Drinks Creative Tab.