Code Monkey home page Code Monkey logo

Comments (10)

2xsaiko avatar 2xsaiko commented on August 15, 2024

Would this be the correct way to handle these methods? 2xsaiko@8c2f076

from mcmultipart.

asiekierka avatar asiekierka commented on August 15, 2024

No. markAndNotifyBlock needs to call all of them, and notifyBlockUpdate only the ones traditionally handled by IWorldEventListeners. getActualWorld() will not backtrack!

from mcmultipart.

2xsaiko avatar 2xsaiko commented on August 15, 2024

Huh? World's markAndNotifyBlock works the same way with it calling notifyBlockUpdate, I copied that if block straight from World. Other than that, vanilla World.markAndNotifyBlock specifically only handles flags 1 and 16 itself. I did notice that the condition for flag 16 was inverted though, that needs to be fixed

Only IWorldEventListener I could find that did anything with the flags was RenderGlobal, and that only handles flag 8, which isn't handled at all in MCMP's code. Should I handle every flag in markAndNotifyBlock then?

from mcmultipart.

asiekierka avatar asiekierka commented on August 15, 2024

Huh? World's markAndNotifyBlock works the same way with it calling notifyBlockUpdate, I copied that if block straight from World. Other than that, vanilla World.markAndNotifyBlock specifically only handles flags 1 and 16 itself. I did notice that the condition for flag 16 was inverted though, that needs to be fixed

Yes, but the ActualWorld's markAndNotifyBlock will call the ActualWorld's notifyBlockUpdate, which won't then handle the multipart stuff.

from mcmultipart.

2xsaiko avatar 2xsaiko commented on August 15, 2024

But I'm also calling the wrapped world's notifyBlockUpdate under the same conditions that the actual world's notifyBlockUpdate will get called in markAndNotifyBlock, so the multipart stuff is already handled. Right? I feel like I'm missing something here, haha

from mcmultipart.

asiekierka avatar asiekierka commented on August 15, 2024

notifyBlockUpdate(pos, iblockstate, newState, flags);

okay, i'm stupid

HOWEVER! This will cause getActualWorld().notifyBlockUpdate() to be called twice. Not as bad, but could still impact performance a little

from mcmultipart.

asiekierka avatar asiekierka commented on August 15, 2024

HOWEVER! This will cause getActualWorld().notifyBlockUpdate() to be called twice. Not as bad, but could still impact performance a little

do not forget

from mcmultipart.

2xsaiko avatar 2xsaiko commented on August 15, 2024

yeah, the last commit should fix that.

from mcmultipart.

asiekierka avatar asiekierka commented on August 15, 2024

Aha! Seems like it. Thanks!

from mcmultipart.

amadornes avatar amadornes commented on August 15, 2024

I'll push a release before going to bed :)

from mcmultipart.

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.