Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: allow the adding of custom light sources to the dynamic lights module #182

Closed
patrickclank9 opened this issue Jun 20, 2016 · 18 comments

Comments

@patrickclank9
Copy link

Perhaps just a config option where we can list other mod items and a light intensity value.
Also perhaps an option to make all enchanted items glow.

@sp614x
Copy link
Owner

sp614x commented Jun 28, 2016

OptiFine tries to keep the vanilla look and feel, so only the items which naturaly give light in-game are dynamic light sources.

@liach
Copy link

liach commented Nov 13, 2017

@sp614x Can you add a hook for mods loaded by other modloaders? If optifine doesn't add it, it would be a big disappointment since mod players don't really use atomicstryker's dynamic lights as often as yours.

@sp614x
Copy link
Owner

sp614x commented Nov 13, 2017

Mods may be supported by assets/<modid>/optifine/dynamic_lights.properties where they can specify the light emitting blocks/items.

@liach
Copy link

liach commented Nov 13, 2017

Are entities supported (or configurable via java code)? In atomicstryker's dynamic lights, some entities such as the blaze emit light. My use case is that Railcraft wants only powered trains to emit light.

@Kortako
Copy link

Kortako commented Nov 14, 2017

Mods may be supported by assets//optifine/dynamic_lights.properties where they can specify the light emitting blocks/items.

@sp614x Can this file be added to a resourcepack if I want to change it myself? And would it work to add my own selection of vanilla minecraft items as well (i.e. putting a dynamic_lights.properties file in assets/minecraft/optifine)? If so, can you explain the format of this file?

@sp614x sp614x added the todo label Nov 14, 2017
@sp614x
Copy link
Owner

sp614x commented Nov 14, 2017

The dynamic_lights.properties is not existing yet and it would probably be only for mods.
OptiFine tries to keep the vanilla look and feel, so only the items which naturally give light in-game should be dynamic light sources.

@Eragonn1490
Copy link

Eragonn1490 commented May 31, 2018

was this ever added?
@sp614x

@liach
Copy link

liach commented May 31, 2018

this is only added to items, i guess. not to entities (i want some in code hook based on states of my entity)

@sp614x
Copy link
Owner

sp614x commented Jun 6, 2018

@sp614x
Copy link
Owner

sp614x commented Jun 6, 2018

Updated preview E1 for 1.12.2

@sp614x sp614x closed this as completed Jun 6, 2018
@mmelvin0
Copy link

I can't seem to get this to work. I've tried putting /assets/minecraft/optifine/dynamic_lights.properties and /assets/mymodid/optifine/dynamic_lights.properties on the resource path via both Resource Loader and via a separate mod (with mod id "mymodid")

I can't seem to modify light levels for existing Minecraft items nor my own mod. Although strangely my own mod item already has the same light level as a torch already without my explicit support (yes it has "torch" in the unlocalized and registry names.)

This is with 1.12.2_HD_U_E1.

@sp614x
Copy link
Owner

sp614x commented Jun 28, 2018

The configuration should be in "/assets/<mod_id>/optifine/dynamic_lights.properties".
The mod_id should be the same as the modid in mcmod.info.
The items in dynamic_lights.properties should be without modid prefix. The modid prefix is automatically added.
There should be warnings in the error log or game output if there are some problems.

@SHsuperCM
Copy link

@sp614x I just tried for too long figuring out why the fork it doesn't work and I found that it is for modded items only? Why will it not accept minecraft as a modid? It should be for non modded content as well IMO...

@Flactine
Copy link

Flactine commented Nov 22, 2019

Can make a resourcepack instead of put files into .jar directly?
@sp614x

@metroite
Copy link

Yeah I agree. It would be amazing if this was also possible for resource packs. I would like to use it for my extinguishing torches datapack. Rather than having torches emit light, I wanted to have flint_and_steel emit light as they are used to light up the torches again.
But oh well.

(tried this btw in the file dynamic_lights.properties inside a resource pack: items=torch:0 flint_and_steel:15 spoiler: didn't work)

@ZaneDragonBorn
Copy link

I cannot find this file anywhere in my packs folder. There isn't a assets folder and have checked the config folder, yet it was empty. Is this no longer a thing or is it somewhere else?

@loferga
Copy link

loferga commented Mar 3, 2023

I tried adding lit_torch from realistictorches mod, I assume it worked as the latest.log file has this message wrote in:

[03mars2023 21:48:11.864] [Render thread/INFO] [net.optifine.Config/]: [OptiFine] DynamicLights: Parsing realistictorches:optifine/dynamic_lights.properties
[03mars2023 21:48:11.866] [Render thread/INFO] [net.optifine.Config/]: [OptiFine] DynamicLights items: 1

my dynamic_lights.properties:

entities=
items=lit_torch:12

If someone can tell me why it don't work, I can't figure it out

@j-romchain
Copy link

I would also appreciate resource or data pack support for this, rather than just other mods at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests