Dynamic Surroundings

Dynamic Surroundings

51M Downloads

Potion HUD shows up empty when breaking a block

phit opened this issue ยท 7 comments

commented

Mod Version:
DynamicSurroundings-1.11.2-3.4.4.0
TConstruct-1.11.2-2.7.0.12

Forge Version:
13.20.0.2298

Description:
Breaking a block shows an empty Potion HUD briefly when using a Tinkers Construct tool.
Video: https://phit.link/s/2017-05-23_23-49-02.mp4

commented

Hmm....Tinkers must be putting something strange into the potion effect list. Any buffs on the tool?

EDIT: I install the latested ALPHA for 1.11.2 (2.7.0.19) from CurseForge and I cannot repro with the basic bronze or end pickaxe. Need the specs of the tool, and any Tinker related mods you have installed.

commented

Seems like certain tool parts/traits are necessary, everything else doesn't matter. So for example a full Iron or Cobalt pickaxe works to test this. So that would be the Momentum and Magnetic trait, you can find all of them, which are indeed implemented as a potion effects, here.

Would it be possible to blacklist them from showing in the Potion HUD?

commented

I need to see what is going on. There is a property on a potion effect that says whether to display or not. It could be lying to the code.

commented

Looks like they aren't, shouldRenderInvText is set to false.
Note the last false here, which goes here.

commented

That's what the code says. However, in my debugger it gets down into Potion::shouldRenderHUD(PotionEffect) and returns true. :) In this case the class is TraitMagnetic$MagneticPotion. I really can't explain it. The Tinkers code on Github looks correct, but what I am seeing in the debugger is something else. Gonna look at the JAR to see if it matches.

commented

Came up with additional checks that should prevent this from happening. I am still at a lost as to why it's not being reported up properly. It's like something decided the method could not be overridden.

commented

Pushed v3.4.5.1 that has the additional potion hud checks.