- check_circle Functions
- check_circle Loot Tables
- 6,713 views, 2 today
- 364 downloads, 0 today
16
Have you ever wanted to stack these bulky potions occupying most of your slots?
I guess this is just the right place for that :
This datapack will allow you to stack same potions together, as simple as that!
The pack is now on Beta 1.1! Every regular potions (but water bottles) are now supported!
Mechanics :
Special thanks to Cloud Wolf, who describe how to add dynamic item data using shulker box trick in its video :
www.youtube.com/watch?v=2z1uEhFVzFA
Any feedback is welcome to improve this pack while there is only few supported potions!
Thank you!
I guess this is just the right place for that :
This datapack will allow you to stack same potions together, as simple as that!
The pack is now on Beta 1.1! Every regular potions (but water bottles) are now supported!
Mechanics :
Merging potions
In order to merge two potions together, you will have to drop them close to each other (droppers works too), then both potions will stack together as one.
The resulting potion will have its stack size displayed between brackets (see screenshot) after its name.
Take note that only same type potions can be merged. For example, a 3:00 fire resistance potion is compatible with another 3:00 one, but will not stack with a 8:00 one.
However, data-modified potions can stack as well; the only merging criteria is the potion type, no matter of custom effects or other tags.
Merging already-stacked potions together is also possible.
However, the maximum stack size is 2.147.483.639; the potion item will get a negative stack value and become broken if exceeding this limit.
The resulting potion will have its stack size displayed between brackets (see screenshot) after its name.
Take note that only same type potions can be merged. For example, a 3:00 fire resistance potion is compatible with another 3:00 one, but will not stack with a 8:00 one.
However, data-modified potions can stack as well; the only merging criteria is the potion type, no matter of custom effects or other tags.
Merging already-stacked potions together is also possible.
However, the maximum stack size is 2.147.483.639; the potion item will get a negative stack value and become broken if exceeding this limit.
Drinking stacked potions
If a 2-or-more stacked potion is drunk, the held potion's stack size will decrease by 1, and the player will get back a glass bottle (see video).
If a player drinks a 2-stacked potion though, it will then turn into a regular potion, which will become empty after drinking.
Both right and left hand are supported by the system.
If a player drinks a 2-stacked potion though, it will then turn into a regular potion, which will become empty after drinking.
Both right and left hand are supported by the system.
Specs
- As the pack use Minecraft translation files to render potion names, every single minecraft language is supported (Reload message will not be translated though).
- In order to give back a custom-named potion, a modified shulker box loot table is used : If any of these are broken using barrier item, it drops its content instead of itself. Otherwise, it will always drop normally.
- [FIXED] Beta 1.1, giving back the held item
In order to detect stacked potion drinking, the system tests if the player have drunk at the same time it had a glass bottle in right/left hand, and if the glass bottle was a supported potion during previous tick.
As a result, switching hands at the exact same tick the player drinks a stacked potion will cause the system to get the wrong slot data, then will make the wrong changes, and potions could be lost by that.
Hopefully, I know how to fix that, this glitch will disappear the next release, in a couple day.
- Stacked potions does not support brewing stands : if brewed, a stacked potion will turn into a single, regular one, which will clear the stack.
Special thanks to Cloud Wolf, who describe how to add dynamic item data using shulker box trick in its video :
www.youtube.com/watch?v=2z1uEhFVzFA
Any feedback is welcome to improve this pack while there is only few supported potions!
Thank you!
Older versions
Compatibility | Minecraft 1.14 |
to | Minecraft 1.16 |
Tags |
1 Update Logs
Update #1 : Beta 1.1 : by Eglaios 05/27/2020 3:50:10 pmMay 27th, 2020
-Every single 38 regular potions are added into the pack
-When the player drinks, the pack checks if the slot does not contain a valid potion in order to give modified potion back. Before, it checked if there was a glass bottle (planning to do same for throwable potions)
-The commands to assign held potion IDs are now in eglaios_pstacker:detection/held_potion and are only triggered if one holds a potion. Before, they were all in eglaios_pstacker:main (there were only 2 potions supported)
-Added potion library for merging potions in eglaios_pstacker:merge_potions. Planning to add lingering an splash library here as well
-When the player drinks, the pack checks if the slot does not contain a valid potion in order to give modified potion back. Before, it checked if there was a glass bottle (planning to do same for throwable potions)
-The commands to assign held potion IDs are now in eglaios_pstacker:detection/held_potion and are only triggered if one holds a potion. Before, they were all in eglaios_pstacker:main (there were only 2 potions supported)
-Added potion library for merging potions in eglaios_pstacker:merge_potions. Planning to add lingering an splash library here as well
tools/tracking
4606946
119
potion-stacker-1-14-beta
Create an account or sign in to comment.
I wonder if there might be away to do this with totems, that would be very nice!
I actually took a pause because of some hardware problems. I have still some gun systems to make for a forum user, so I might go back on the pack update in one or two days...
et pourquoi je m’embète à parler en anglais alors que tu parles français? Jsp mais le truc que je me demande c’est comment tu peut te vanter d’avoir fait Le meilleur truc du monde ?nn j’rigole mdr 😝
and for everybody who understands nothing i said :
USE GOOGLE TRADUCTION OR WORDREFERENCE pls 🙏
Seriously though, this is really amazing... since I actually don't know how it works.
As quick as that, the pack keeps in memory what potion the player had last tick in each hand.
When you drink a leaping potion in left hand, the pack sees that you were holding it on left last tick, and as you lost it on the same tick you drank, it knows you drank it, and give it back.
When the potion is given back, it clears the item in hand; switching your potion with a sword at the same tick you drank it was deleting the sword.
However, beta 1.1 now stores the replaced item, and give it back once the potion delete it.
Of course, it can not copy the potion's data as it's gone; stack size and potion id are both stored as player score
There's a system using shulker box loot table and json signs behind to give back modified items in the right slot
Uh I didn't say it but it's perfectly working in multiplayer
drinking 1 potion from a stack of 64 does exactly what you want it to without all the commands