![Liquid Enchanting](https://media.forgecdn.net/avatars/thumbnails/144/405/256/256/636555750509301087.png)
[1.12.2] Certian Potion Effects won't apply their buffs or instant apply their effects since the effect is applied all the time.
SonicX8000 opened this issue ยท 2 comments
Using 'liquidenchanting-1.12.2_v5
Some potion effects will only apply their effect as they tick down but because the liquid enchantment keeps applying the potion effect endlessly per tick as long as you have the enchanted piece equipped, some of these effects won't work correctly. To name a few...
-
Health Boost increases max health by X amount of hearts but if your health is increased and you renew the boost... your max health will drop to whatever it was before the renewal... now since this effect applies per tick... you will increase max health but you won't ever increase it beyond your normal cap. Can't get this as a potion vanilla-wise but some mods add in potions for that.
-
Regeneration, depending on it's timer will heal you quickly if on the right tick. An example is if using CoFH Core which adds in Regeneration III & IV Potions... although you can't brew them by normal means but let's say that those heal me quite fast since the timer for the 'heal' tick is spot on with the endless 0:00 timer. Although it seems I & II have a timer set to prevent fast healing.
-
Repairing from Potion Core will never, ever repair your items nor armor as it relies on it's timer ticking down in order to restore durability.
-
Revival from Potion Core revives you should you die and with this applying per tick... well... you're pretty much immortal.
=====
While some of these can be disabled in the config, some of them don't work as they should since they rely on the timer going down, namely Repairing & Regeneration. Rather than the default being 0:00 per tick , maybe do 0:20 & renew the timer when it reaches 0:10 or something. This could be configurable in a way for Health Boost & to prevent potion stacking if one carries many armor pieces with potion enchantments. The timer could be force set to 0:01 if the player unequips the enchanted piece.
Health Boost would be interesting to have but due to how it works... yea. I wonder if the same thing could be done with Revival if possible, like some kind of delay before reapplying the effect. If not then I'll just add it to the blacklist since it's rather OP.
Regeneration III, at least when applied as a potion heals about 2 health per second where if you have it applied on your armor, it actually heals much faster than that, even faster than Regeneration IV. It's as if you had Regeneration V.
I checked again with Repairing and apparently only certain items will be repaired, such as a Diamond Pickaxe or Vanilla Tools, Cyclic's Target Dummy Spawner, etc. My mistake for not checking thoroughly for that.
Ah, alright. The idea came since there were some potion effects via rings if using baubles so I though there might've been a way with that.
- This is precisely how health boost works. If you drink two potions in succession, you lose the original boost and start again. Same if you chugged two golden apples in succession in vanilla. You make an interesting point though. Technically the potion's doing what it usually would, but it's rendered useless here. I'll have a think about it.
- Regeneration III & IV just are that fast. Chug a potion without the armor, you'll see it's OP regardless.
- Can't reproduce. Please put it on a piece of armor, use F3+H to see advanced tooltips and hover over the durability number for a minute or so. I've tested this and do see a tick up of about 1 point per 5 seconds.
- Yup, that's pretty damn OP, such is the joy of mixing mods. I put a config option for you to be able to disable potions you find OP. For this instance, add a new line to the "Disabled Potions" list with "potioncore:revival". This will disable the effect on any pre-existing item in the world too.
Your idea of playing with timers and renewing isn't a bad one, in fact that was the second version I tried. The problem with that is there will always be another potion that requires a different tick-down time, so you're constantly chasing different times around. As for removing the effect, once the armor is off, I have no idea what armor was being worn last tick, the game just doesn't store it. I'd have to blindly remove all potion effects (which would have collateral damage for beacon/legit potion drinks), or scan through inventory taking guesses. Even that wouldn't work if the armor was removed through breaking in combat.
What I'm actually doing with the countdown needing potions is asking the potion how long it needs to tick, and applying exactly that amount of time. If it's less that 20 game ticks, then it appears as 00:00 in the GUI. You can see where this differs with Poison, you can see it just between 1 second and 0.