Code Monkey home page Code Monkey logo

Comments (3)

fnuecke avatar fnuecke commented on June 16, 2024

For initialization I'd say ModuleProvider.createModule is well enough suited (just grab the NBT from the stack provided there). Alternatively onEnable (read on).

For saving what you'd probably really want is to write it back to the stack in onDisable, so it's also saved on chunk unloads and such? At least that should be called there, too... I think. If it isn't yet I just forgot. So that plus I'll add IInventory to the Casing interface and that should be all you need, right?

Out of curiosity, what state do you want to store in the module's item stack? (Since they're ususally non-persistent / reset when the computer powers down I didn't really expect having to store data on their items.)

from tis-3d.

Vexatos avatar Vexatos commented on June 16, 2024

I do not have any intentions to use it just yet, I just thought it might be nice if you could make the module, in case something changes "physically", keep this state even when you uninstall it and install it in some other casing, since really only data should be reset, not "phyical changes to the module itself". Resetting that too on power loss if it doesn't even "use electricity" to happen would make no sense.

from tis-3d.

fnuecke avatar fnuecke commented on June 16, 2024

06002ea

from tis-3d.

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.