Comments (9)
Confirmed, It happens on 1.11.2 on Spigot. Looks like it could be spigot's fault, There's nothing really going on in the code that can control that, The code looks okay to me.. The code looks okay to me.
public static ItemStack MELON_JUICE = new CustomPotion("&cMelon Juice", 8197, new String[0], new PotionEffect(PotionEffectType.SATURATION, 10, 0));
And the Listener Code doesn't do anything about it, Looks like all the listener code does it that it removes the glass bottles.
from slimefun4.
Same problem (also with ExoticGarden). I just added the command /effect (/effect [player] 23 5 1 for Slimefun juices, for example), when the potion is consumed. Maybe there is a better way.
from slimefun4.
Sorry, how did you do that? :3
from slimefun4.
@EventHandler public void onStarve(FoodLevelChangeEvent e) { if (e.getFoodLevel() < ((Player) e.getEntity()).getFoodLevel()) { Player p = (Player) e.getEntity(); for (ItemStack item: p.getInventory().getContents()) { if (SlimefunManager.isItemSimiliar(item, SlimefunItem.getItem("COOLER"), false)) { Inventory inv = Backpacks.getInventory(p, item); if (inv != null) { ItemStack drink = null; for (ItemStack i: inv.getContents()) { if (i != null && i.getType() == Material.POTION && i.hasItemMeta()) { drink = i; break; } } if (drink != null) { PotionMeta im = (PotionMeta) drink.getItemMeta(); for (PotionEffect effect: im.getCustomEffects()) { p.addPotionEffect(effect); } p.setSaturation(6F); p.playSound(p.getLocation(), Sound.ENTITY_GENERIC_DRINK, 1F, 1F); inv.removeItem(drink); Backpacks.saveBackpack(inv, item); break; } } } } } }
That's the listener code.
Essentially, there is no hook for slimefun to add the saturation effect when you drink a juice individually.
The juices will only work when put into a cooler.
however
This will reset your hunger bar to full as soon as you lose even a single food point as I tested with the elemental staff wind.
@TheBusyBiscuit I'm not sure if that was intended behaviour nor am I sure if this is intended behaviour of consuming 2 juices per "restoration"
from slimefun4.
Essentially, there is no hook for slimefun to add the saturation effect when you drink a juice individually.
There is no need for that either since Juices are Potions and the Potion Effect is applied by Minecraft itself.
At least, that is what Spigot is supposed to do.
from slimefun4.
Yeah I had a look through the source for Slimefun and The javadocs for Spigot.
I have a feeling its more a spigot issue.
However, could it be changed so that instead of consuming a juice on every foodlevel change.
have it consume it if the new food level is under a certain threshold
from slimefun4.
@CyberiumShadow It's Open-Source.
from slimefun4.
Duplicate of #333
from slimefun4.
Has to be closed too (#513)
from slimefun4.
Related Issues (20)
- griefPrevention and slimefun ( Claim#allowContainers ) HOT 4
- move auto saves from main thread to off thread
- SlimeFun is not compatible with the Mohist side, and the freight node cannot be placed HOT 4
- When researching coal generator, if you leave and rejoin after save, coal generator is un-researched HOT 6
- Item dupe with backpacks and a big player profile HOT 4
- Opening Backpack and Slimefun Guide at the same time causes unwanted behavior HOT 12
- Players Lost Backpack Data Updating Slimefun HOT 20
- Slimefun Bugs backpack HOT 3
- Un-stackable Items HOT 6
- Explosive Pickaxe drop note block when breaking custom ore from ItemsAdder HOT 5
- Slimefun furnance giving "Netherite Scrap" after smelting. ItemsAdder HOT 1
- Error on auto-saving data HOT 2
- Machines find it difficult to find recipes for similar items HOT 12
- Can't craft item from enchant crefting table HOT 3
- Duplication of every "Falling Vanilla Block" Block with Slimefuntag HOT 3
- Got banned from discord By BOOMER1 because i used Discord's reply functionality HOT 2
- The soulbound rune does not work due to an interference with the soulbound of advanced enchantments. HOT 1
- The translation is not COMPLETE HOT 1
- McMMO Anvil can repair SlimefunItems and can use SlimefunItems as repair material
- ChargingBench can recharge muliple stackable items. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slimefun4.