Giter VIP home page Giter VIP logo

Comments (2)

Mithi83 avatar Mithi83 commented on July 17, 2024

I've played around with P2P Light a bit (in 1.20.1 and 1.21 both the same behavior), here is what I've found:

  1. Create a P2P Light setup (Glowstone directly in front of P2P Light input, link with output), leave the world ("save and quit to title"), rejoin the world -> find the P2P Light output is completely dark
  2. Place a cobble (or any other solid block) directly in front of the P2P Light output and remove it again -> find the output has light level 14
  3. Bonus Bug: Remove the input -> note that the output is correctly marked as "unlinked" but still emits the light as before. Does not get fixed by placing a solid block in front of it and removing it again.

My best guess is that some triggers for updates are missing.

from applied-energistics-2.

Mithi83 avatar Mithi83 commented on July 17, 2024

I played around some more (1.21 only) with some debug printing and found some interesting and unintuitive behavior. When loading the level at some point very early blockLight is called in LightP2PTunnelPart with a correct value of emit = 15. There this.opacity was correctly set to -1 and thus calculated anew. The returned value of level.getMaxLocalRawBrightness(pos.relative(getSide())) is however not correct as it seems. It also is not consistent across multiple attempts to join the world. I've seen values of 14 (which effectively reduces the emitted light level to 1), 4 (which effectively reduces the light level to 11), 10, 9.

When I place a cobblestone in front of the output, this.opacity is correctly recalculated and light levels are correct. So my guess is that unless I force the update to succeed by placing a block in front of the output the opacity is some sort of garbage value.

As for the bonus bug: Enhancing getLightLevel() with another condition in the if statement (&& this.getInput() != null) solves this problem.

from applied-energistics-2.

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.