Atum 2: Return to the Sands

Atum 2: Return to the Sands

22M Downloads

Atum/Optifine Dynamic Lights config doesn't work for items

Liddell-afk opened this issue ยท 22 comments

commented

Optifine provides the property file "dynamic-lights.properties" (template here) for modded items and entities to give off light.

In Atum 2 this only works for entities but I can't get it to work for any item. The log tells me that the property file gets parsed just fine and it seems to recognize the specified items (example: bone_torch:15 as in item name:light level). I tried to define wrong item names just to see if it makes a difference and to see if it actually looks for these items in atum, which it does (logs an error if item couldn't be found).

But the items just don't give off light. Also, I found some lines like the following in the log which might be a hint (I'm not a modder so I can't say for sure)?

[Client thread/WARN]: Potentially Dangerous alternative prefix minecraftfor nametorch, expected atum. This could be a intended override, but in most cases indicates a broken mod.

I'm using 1.12.2 with Atum 2 2.0.15 as part of the modpack Roguelike Adventures and Dungeons version 1.33. I added optifine myself, it was not part of the modpack.

commented

If you don't specify the modid it'll default to "minecraft", hence why you're probably getting that warning in the log
My guess would be that you would have to do something like:
atum:bone_torch:15

commented

The template says, the modid is not necessary, but believe me, I've tried everything I could think of. Your example as well, it doesn't work. And as I said, the entities do work with the given name convention, without modid and the log implicates, that the property file got parsed just fine.

commented

Where exactly were you trying to add the properties file?
Tried to add it natively in Atum 2 now, could I get you to test it out?
You can get the Jenkins build here: https://jenkins.girafi.dk/job/Team%20Metallurgy%20Mods/job/Atum%202/job/Atum%202%20Jenkins/89/

commented

Still no luck. The dynamic lights part doesn't show up in the log anymore as before we had the 5 parsed items confirmed. Also:

[22:01:32] [Client thread/WARN]: [OptiFine] Unknown macro value: SpeularFormat

Is this a typo on your side?

commented

Nah it was my attempted fix.
Didn't see your last comment with the log output before now. Looks like it might want me to specify an emtpty "entity=" part in the file, so I've tried adding that now + reverting the changes I did before.
Try this (When it's done): https://jenkins.girafi.dk/job/Team%20Metallurgy%20Mods/job/Atum%202/job/Atum%202%20Jenkins/91/

commented

Did not work. Tried it with and without the shader, no difference. But the log output is as before: parses the 5 items but gets the same null pointer.

commented

Listen, I appreciate your time and effort but if this starts to make you crazy we can let it go. If you're commited, I continue to test it. I'm awake for a few more hours ;)

commented

I'm not getting the NPE, but I cannot get the dynamic lighting to show up either.
https://i.imgur.com/gNHs3hb.png

commented

Then it might not be related or caused by some other mod interaction in the RAD mod pack I'm playing on. If it is worth your time you might get an answer on how to integrate the dynamic lighting from the optifine devs? Or do you have connections with other modders who have managed to integrate it? There are a bunch of mods in RAD with like lanterns which work.

commented

I figured it out. Optifine requires you to set the light level in one specific way (Aka it's not checking it properly).
Latest build here works: https://jenkins.girafi.dk/job/Team%20Metallurgy%20Mods/job/Atum%202/job/Atum%202%20Jenkins/93/

commented

Yes, well done! A few closing questions:

  1. Can I keep the recent jar in and integrate it on my server version of RAD or should I wait till you make an official release?
  2. Could I now theoretically adjust the light levels with the property file with the resource pack?

Thanks for your time and continued efforts!

commented

Sure, go ahead :) You're welcome!

In theory adjusting the light levels should work, yes.

commented

You mentioned "setting the light level in one specific way". Does this also apply to how I would define them in the property file? Or is it as the template says, like bone_torch:12 ?

commented

No that was in relation to how the torches lightlevel itself was set in code.

Doing bone_torch:12 in the properties file would still be the correct way to go

commented

Thank you! I'm out then, have a good one ๐Ÿ‘

commented

I tried it in two ways:

  1. Put the properties file in a resource pack with the given directory path in the template
  2. Put the properties file in the atum jar file with the given directory path in the template

Sure, I gladly test it. How would I go about it? Do I need to put all 3 jars in the mod folder instead of the 2.0.15 one?

commented

No just the "Atum-1.12.2-2.0.16.jenkins89.jar", the two others are the code source and Atums API.

commented

Did a quick test on a local world. Put the jenkins jar in, took the old one out. The property file lies in a resource pack. Same result as before: defined entity does give off light, the torch doesn't sadly.

commented

Try without your resourcepack, might be messing up the stuff I added.

commented

Didn't work sorry. By "without resource pack" you mean just remove the optifine folder with the property file? Textures wouldn't be a problem I guess?

commented

Forgot to mention: I use the BSL shader, gonna try if this somehow causes trouble. Here are the lines that probably are from your implementation. It follows right after the shader gets set up:

[21:29:59] [Client thread/INFO]: [OptiFine] DynamicLights: Parsing atum:optifine/dynamic_lights.properties [21:29:59] [Client thread/INFO]: [OptiFine] DynamicLights items: 5 [21:29:59] [Client thread/WARN]: [OptiFine] java.lang.NullPointerException null [21:29:59] [Client thread/WARN]: [OptiFine] Error finding Chunk.hasEntities [21:29:59] [Client thread/INFO]: [OptiFine] (Reflector) Field not present: net.minecraft.world.chunk.Chunk.hasEntities

commented

I realized that I probably misread the instruction in the link you sent. Just pushed an attempt to fix it.
Try this build out instead (Might still be building if you get to it quickly, so just wait a few minutes): https://jenkins.girafi.dk/job/Team%20Metallurgy%20Mods/job/Atum%202/job/Atum%202%20Jenkins/90/