GithubHelp home page GithubHelp logo

Comments (4)

pau101 avatar pau101 commented on June 29, 2024

I wish it was a simple matter of allowing them to. It is difficult to adequately emit light because hanging light sources are unconstrained to blocks and while lighting works per block.

For light to be emitted one option is lit blocks which act like air to be placed wherever there is a light. Handling lit air blocks gets messy with them having to be kept track of so they when connections change they don't leave behind them. There is still an issue of cases where the block is removed in a way it can't handle removing lit air blocks, requiring the lit air blocks to randomly check if they should still exist which would require them to either search a somewhat large area for fasteners or be a blockentity and hold data knowing which fastener they belong to to look specifically for. Having a lot of those fake air light emitting blockentities wouldn't really be great for performance.

Another option would be mildly hacking light computation to override the brightness of a block based on if the is a hanging light source intersecting it. This method wouldn't be too harsh on performance as long as it knows immediately if a chunk has some cord going through it to avoid checking the exact light sources. This requires coremodding so I am hesitant, especially since prior to 1.10.2/1.11 releases I did have a coremod and I was just able to remove it.

The compromise that is half-implemented is visual light when OptiFine is installed. OptiFine has a "Dynamic Lights" feature where some entities and held/dropped items emit light so I abuse that. The unimplemented part is preventing hostile mob spawns as if the blocks were actually lit, which I simply haven't gotten to.

from fairy-lights.

Voidi avatar Voidi commented on June 29, 2024

Maybe this could work.

from fairy-lights.

pau101 avatar pau101 commented on June 29, 2024

@Voidi I originally ruled out that method because of experience I've had with modifying light like that in the past but after experimenting with it now it appears feasible and won't be hard on performance.

from fairy-lights.

pau101 avatar pau101 commented on June 29, 2024

Fairy Lights 2.1.0 is now out to implement this feature.

from fairy-lights.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.