Trinkets and Baubles

Trinkets and Baubles

13M Downloads

EnhancedVisuals static screen compatibility

CreativeMD opened this issue ยท 16 comments

commented

Hey there,
I heard you want to disable the static screen effect if the endermans are friendly. Unfortunately EnhancedVisuals has no api, but I could either a hook or an exclusion (source). Just let me know what you think is the best solution.

In Regards
CreativeMD

commented

@CreativeMD Hello, I'm not sure the best way to do this yet myself. At the moment I'm just trying to stop the Endermen Effect if the player is wearing the "Ender Queen's Crown", a Quick and Dirty solution would be to check if the player is wearing that bauble, or check against an Array List Config Option. but Ultimately a way to Cancel the Render, through a Custom Event or something would open up a lot options for others as well

commented

I will rewrite EnhancedVisuals, it's been on my todo list for way too long and I think it's about time. I will implement a proper event system and get back to you as soon as it's ready.

commented

I know that's going to be a lot of work, but it Sounds awesome, Thanks for letting me know

commented

Yeah, I'm still not done with the rewrite. That obviously works, but it disables the effect entirely. You can also just set enabled in VisualType.slender to false.

commented

@CreativeMD I managed to disable the Visual Effect, but Not totally sure if it's safe to do so the way I'm trying it.
I'm currently using the RenderTickEvent, Checking if the Visual Effect is Enabled using
"VisualManager.getPersitentVisual(VisualType.slender).type.isEnabled()" and checking if the intensity is greater then 0, and if it is, Just doing
"VisualManager.getPersitentVisual(VisualType.slender).reset();"
It works and I don't seem to be having any crashes or issues, But I'm still looking through your source more in depth.

commented

I Have that Encased in an if statement to only happen if the player is Wearing the Ender Crown. if It's unequipped, the Effect Seems to work just fine, I Also Tested it on a Server, even if another player has the Crown equipped (Although that means nothing since the Code is run entirely client side anyway), if the player themselves doesn't have the Crown on, the Visual Effect still happens.
and the Intention was to stop the effect from happening entirely, as long as, and only if the player has that bauble equipped. So the Player didn't have to disable the effect entirely.

Not Trying to rush you lol. Was just Checking to make sure it didn't break things internally.
At least it didn't as far as I could tell in my testing.
It's obviously only a Temporary Solution until you can complete the rewrite Though.

Anyway, Thanks, and Hope things are going well. @CreativeMD

commented

Thank You, That should make it simple to stop the Enderman Effect,
But, Recently been asked for more Compatiblity, I've since added support for Removal of Explosion Blur, and the Dust Effect When in Fire/Lava.
Because In RLCraft apparently the Epions from Lycanites causes so many explosions, It Literally makes it impossible to see anything, because it just keeps the intensity at max.
and the Dust effect when in Fire, although it's not as bad, Again, When the player is Immune to Fire it just builds up and almost completely blinds the player again. This makes it when Players are Fighting Dragon's From Ice and Fire, Overly Difficult even with Fire Resistance because the dragons spew fire everywhere and it's basically impossible to even see where the Dragon is to even fight back

so Access to those would be great, Maybe even the ability to set the intensity, that way it'd be possible to have like "30% improved Vision in Fire", "50% improved vision in Explosions" Type of Effects, in case someone doesn't want to Remove the Effect Entirely.

commented

To Be Fair, I Have Managed To Figure out Ways to Already Accomplish that after getting More Familiar with your Code, So I think I can manage, Even without Any more events, but, It would be nice for a Simpler way to access and edit the values.
Anyway, Thanks Again.

commented

The new version is finally out. Sorry that it took me so freaking long.
There is an event which is raised in MinecraftForge.EVENT_BUS (source). This event can also be canceled to negate any effect. Really hope it's all you need, if not just tell me how to make it better.

commented

Adding new events is easy. It would be very helpful if you could provide a list of request events (and what they should do). It's hard for me to guess what is necessary.

Furthermore things you said above might not occur with the new version anymore. As the effects now depend on the actual damage.

commented

Personally, I'd Like Access to all Effects, That'd Give the best Control.
But At the moment, I Personally only need Access To the Endermen Effect, Blur/Explosion Effect, and the Fire Effect.
"VisualTypeSplat.fire"
"VisualType.slender"
"VisualType.blur"

commented

Ok you got everything you need for the slender, but what properties do you need for the other events? Like what do you want to control (fire the amount of particles?, blur the intensity?)

commented

Being able to Reduce the Fire Particles instead of Just Disabling it entirely would be Helpful yes.
The Blur, That ones a bit different, From What I've Noticed, You have it Shared between a few instances.
Notibly when Entering/Exiting Water, and Explosions, Not sure about other instances. but having the ability to set the intensity would be helpful, being able to detemine the Source that's triggering the effect would be helpful as well.

I'll go over the instances I'm currently using it.

So Far, I Have the "Ender Queen's Crown" Which Basically makes Endermen Friendly, so it Disables the Slender Effect Entirely when Equipped.

I Have the "Dragon's Eye" Which Makes the player immune to Fire, I Personally Don't want to disable the Fire Particles completely, but I couldn't figure out a better way to do it, Setting or Reducing the Intensity would be nice.

There's also the "Stone of the Sea" which Basically gives Water Effects, Infinite Oxygen, Swimming Speed, etc. and it Disables the Blur Effect when entering water if the Intensity is around 0-20F, This instance of the blur isn't a big deal and I'm thinking of removing it from the Stone of the Sea.

Finally, The "Shield of Honor" Reduces Explosion Damage, and It Currently Disables the Blur Effect if the Intensity is less then the Amount of Explosion Resistance, the only issue with this is it also disables all other intances where blur is used if the Intensity is less then the Resistance,

I've Also thought about adding Items like Goggles or something that would help During Sandstorms and other visual reducing effects, but I Haven't figured out a good way to do so yet. That's assuming it's possible.
I Haven't had the Time to Check out your new update yet, so I'm not sure how much of what I'm saying still applies.

commented
  1. The event already exists SelectEndermanEvent (source).
  2. Previously fire particles spawned even without taking any damage. This is not possible anymore in the newer version, so this issue should fix itself. Nonetheless I added an event which allows to specify the amount of particles and the duration FireParticlesEvent (source).
  3. Added a SplashEvent which can be canceled to negate the effect (source).
  4. The rewrite has changed the structure. VisualTypes are included in the VisualHandler, which means there are multiple instances of the blur type. Furthermore I added an event for explosion which allows to specify the simulated damage and to disable the blur effect VisualExplosionEvent (source).

To give you an overview about the new rewrite, the VisualHandlers to almost everything, so you might want to take a look at them (link).

commented

I've Finally been able to Test out the Update, Looks good to me.
Simple to use and hopefully wont cause crashes if someone updates either mod in the future xD

commented

Good to hear that! I don't plan any big changes for 1.12. I will only fix bugs (and maybe add some more events).