Supplementaries

Supplementaries

110M Downloads

Question / Bug(?): Wall lantern feature disable / restore blockstate?

OkinawaGaijin opened this issue ยท 21 comments

commented

Hello, first of all, great mod!

Though I do have a (silly) question / problem.

Your mod includes a tweak to allow Lanterns on wall mounts, which with the added swinging effect really looks nice. But I have one small issue with it. When using standard lanterns, the Complementary Shader 4 provides a nice and soft bloom on these lanterns.

I've also used a mod called "Lanterns belong on walls" before trying out Supplementaries and it did as advertized allow me to put lanterns on walls without further issues.

But when I use Supplementaries, the light coming off wall mounted lamps provided by your mod (which seems to override the other one) is dimmer and lacks the bloom.

Of course I tried to use your config menu to disable all related features, like setting high priority off, using fast lanterns to exchange the animated entity with a fixed block. But nothing changes, it keeps using the supplementary provided model / texture. This version is dim and bloom-less compared to the vanilla lantern, probably because the shader doesn't recognize it.

Is there a way for me to prevent supplementaries entirely from changing the model or whatever parameter it is changing?

See the screenshots attached. First one shows wall lanterns placed before supplementaries was installed. Second screenshot shows lanterns that have been placed after the mod was added. Shader used is Complementary 4.6
2022-08-29_16 47 05
2022-08-29_16 47 16

commented

Ill have a look and see if I can give bloom too. I likely need to add some direct compatibility with that and I'm not sure as I'm not familiar with fabric rendering, tho I was aware they had a bloom mod

commented

Ok so the reason that mod worked out of the box is because they didnt implement a generic solution that work with all lanterns out of the box like I did and instead modified each and every lantern block so they keep whatever config they had that gave them bloom

commented

I dont think I can bake this work myself as it requires editing the shader itself.
I checked and it seems that the only line to change would be "block.11068=minecraft:lantern supplementaries:wall_lantern"
inside the /shaders/block.properties file in the shader folder. I think you should ask the shader author to add that in as I've seen they already have compatibility for many modded blocks in there

commented

First, thank you for taking the time to look into this so deeply.

My initial aim was to just remove your lantern block from the mod (at least for the normal base lantern) and have the other wall lantern mod take over for that one using the standard vanilla thing.

But now that you mention it being only one line in one of the shader files and basically gave me the tutorial on how to do it, I just went ahead and did it myself. I don't have time to actually start the game and check if it works, but I think it will. Your assessment sounds more than plausible.

I will mention this in the complementary shader discord when I have time for it, so if the dev makes the change official, other people will have the same benefit without needing to manually tinker with the files.

Thank you again for your time and help in this.

commented

Okay I just had to fire it up and see. Well, it does work now. But the lanterns getting bloom are using the wall frame from the other mod, so your lanterns aren't used at all for this.

Before, no change of your json files would change the lanterns being used Supplementary models without bloom.
Now that I added supplementaries:wall_lantern to the shader config as you explained, your lanterns no longer show up when placing a new one. They again use the vanilla model with the wall frame from the "lanterns belong on walls" mod

But again, a change of any or all of your provided json settings has no influence on it. (like turning "enabled" or "high priority" on or off. Nothing changes after reloading.

I mean, it's not an issue. The bloom is now back for the hanging lights, which is great. Even if I'm not using your custom model, I still get to enjoy the entire rest of the supplementaries mod.

commented

Also, (sorry for spamming)

I also checked out the "Lanters-belong-on-walls" jar to see what is happening in there. It has a file called resourcepacks in there with two folders "moddedlanternscompat" and "secretroomscompat"

Since those resource packs don't show up in my resource packs list as "built-in", I assume those load with the fabric mods resource pack and thus do some magic overriding at the base?

I'm getting curious about what exactly is happening. I changed the shader, but instead of adding bloom to your lantern, it's now overriding your lantern again with the vanilla model and the other mod's design. I'm gonna remove the other mod and see what happens.

commented

Okay. Without the other lanterns on walls mod, I now can no longer place any lanterns on walls, supplementaries has no effect, no matter which settings i use in the json files. On, off, doesn't matter. Used the /reload command as well as the F3+R resource pack reload and even exited and re-entered the game. So it's not the saved changes not being loaded into the running game.

So for now, I'll keep the other lantern on wall mod (I mean it does what it advertises), and use Supplementaries for all the other good stuff it's adding and tweaking.

I just think it's weird that a change in the shader blockstate file has such an effect on the game itself (basically nullifying your wall_lantern)

EDIT: Because I don't want to keep spamming more and more new entries.

Just generated a completely new world. Now despite the other mod still being in my modlist, supplementaries took over, has lanterns and depending on whether I set the fast lantern option to true I either get static light with bloom, or animated lanterns without bloom.

I look at them more than I bump into them, so albeit it being a nice little feature, I'll keep using the static one with bloom.

commented

Well, no one can ask you really to add individual shader support for the likely dozens of popular shaders out there. I mean there are Complementary, Complementary Reimagined, Seus PTGI HRR 2.1, Seus PTGI HRR 3, SEUS E12 still being used by some, Continuum Shaders, Apollo RT, Nostalgia, Sildurs, and who knows what else I'm missing right now.

But another question. It's a rhetorical one, really, since my guts already tell me that it's a technical problem: would bloom be able to work on your moving lanterns?

I have by far too little technical knowledge of how all that stuff works to even begin to understand what can and what can't be done with the tools available. It took me a week to migrate from Optifine to Sodium/Iris until I sorted out all sorts of performance issues I had on the way.

commented

So the reason they wouldnt work before was probably because the config option that turns them off requires a reboot. Anyways I looked at other mods (bop) and I've seen that that single block.properties block can be included in the mods resources so I've added that. I believe they have to be made custom for each shader so this will only work for that shader in particulare and should also make flax act like crass and sconces like torches, if it works of course, I havent tested. will be in the nest update soonish

commented

Tbh I don't know how shaders even work behind the scene so I can't tell. I know it's possible as you have other entities with bloom likeend crystal (right?) But I'm not sure how one would go about adding that. I believe the complementary people might be able to add some compatibility themselves

commented

Could you check if the shader compat I added works for you?

commented

Sure, I am still using the fast lantern setting, you want me to check the interactive one?

On a completely unrelated topic, my latest log gives me a few entries regarding Supplementaries (latest version):

[05:09:56] [C2ME worker #2/WARN]: Block Entity at class_2338{x=2383, y=-10, z=1259} for block Block{supplementaries:urn} doesn't exist
[05:09:56] [C2ME worker #2/WARN]: Block Entity at class_2338{x=2315, y=-25, z=1254} for block Block{supplementaries:urn} doesn't exist
[05:09:56] [C2ME worker #2/WARN]: Block Entity at class_2338{x=2316, y=-12, z=1271} for block Block{supplementaries:urn} doesn't exist
[05:09:56] [C2ME worker #2/WARN]: Block Entity at class_2338{x=2350, y=-2, z=1242} for block Block{supplementaries:urn} doesn't exist
[05:10:05] [Server thread/WARN]: Block entities size mismatch! expected 1 but got 0

Maybe that's something you should know. I'll report back when I got time to play and see how your update works in regard to the lantern. Do you need me to remove the manually added supplementary:wall_lantern entry from the shader's block.properties?

commented

It's harmless but I was sure I had a fix that suppressed that vanilla bug. Maybe try on s new instance or remove those manually added. I hope that at least wavy grass works

commented

wavy grass? I'm not sure. I'm using Complementary Shaders, so for me, everything has been waving. And your mod didn't break any of it, if that is your concern.

commented

Okay, I've just tested your lanterns.
I was still using a preview version of Complementary Shaders version 4.6 since that's when I made the change to the block config that you showed me.
So by downloading the already released finalized version of the 4.6 shader, I was able to quickly test both variants, with the shader config change and as delivered by the creator.

I used both the vanilla lantern and the copper lantern from your mod. When placed on the side of a wall with the Fast Lantern Option turned off, they only get bloom for as long as I don't move the mouse. As soon as the screenspace changes, the bloom goes away.

When I use the Complementary Shader 4.6_pre that I've been using all the time (block.properties changed) the bloom your static lanterns and entity lanterns until camera movement get is full bloom like any other light source.

When I use the new Complementary Shader 4.6 that has no change to add supplementaries, it's just a slightly brighter texture, but not a blinding bloom.

I hope this helps.

commented

That's pretty odd. I'll try to do some testing myself

commented

During testing I also noticed that Supplementaries doesn't yet have its own creative tab with all the stuff in it. And when trying to find the copper lantern and other blocks with typing #supplementaries or @supplementaries in my REI mod, I didn't get any result. So I assume you don't yet have NBT or what it's called in place?

Might be another (rather low-priority) thing you might want to add some time in the feature.

commented

If you want a tab you can enable it in the configs. For the second issue I have never seen that, it works fine for me

commented

My guess is that lantern swing animation is causing lantern block to transform into a block entity and Complementary just simply doesn't have a code to process bloom upon them. With block.properties edit we can see that bloom shader is working with modded lanterns upon placement, without viewport position change, and sometimes when block entities are transformed back into blocks (probably for optimization reasons, when you can't see animation from too far away). I think the only thing that you could do is to provide a config option to disable lantern animation. Everything else is up for shader developers to do.

I don't have a good understanding about block animations and block entities, but I'm somewhat familiar with Complementary code, so these are just my assumptions.

commented

So having read through this I thought I had a related problem but now I'm not sure. Hanging lanterns that are on the 'upper' bracket go white after a minute or so of the game running. Starts off fine but then....yeah.

2023-02-17_20 05 41
2023-02-17_20 02 20
2023-02-17_20 02 22

Running Rubidium and Oculus and Complementary Shaders, MC 1.16.5
I suspect its a Rubidium/Oculus issue but I'm still working on getting to the bottom of it

commented

Do they still swivel? Might be a bug with those as you say. You can try to turn on fast lanterns config to get around this