Giter Site home page Giter Site logo

Comments (11)

CovertJaguar avatar CovertJaguar commented on July 17, 2024
  1. You want https://github.com/CovertJaguar/Railcraft-API/blob/master/mods/railcraft/api/tracks/IRoutingTrack.java
  2. See https://github.com/CovertJaguar/Railcraft-API/blob/master/mods/railcraft/api/carts/IRoutableCart.java
  3. Override https://github.com/CovertJaguar/Railcraft-API/blob/master/mods/railcraft/api/signals/SignalController.java
    and https://github.com/CovertJaguar/Railcraft-API/blob/master/mods/railcraft/api/signals/SignalReceiver.java
  4. The format is similar to vanilla books, a tag list of pages (tag lists) of lines (string nbt), or something like that. Look at ItemRoutingTable, I could add more support if needed. Not sure if the blocks implement IInventory though. Would be simple to add a function to the api.

from computronics.

asiekierka avatar asiekierka commented on July 17, 2024

Okay, I will look into this after I'm done with AsieLauncher2.

from computronics.

Vexatos avatar Vexatos commented on July 17, 2024

@CovertJaguar IRoutableCart should get a method to get the current owner (if that is related to that interface at all, if not, which interface is the owner related to?).
Additionally, a setter method like ItemRoutingTable.setPages (respective to getPages) would be very useful.
EDIT: 1 and 4 have been implemented, will make a Pull Request in here soon. Number 3 is being worked on and for 2 I'll have to wait.

from computronics.

CovertJaguar avatar CovertJaguar commented on July 17, 2024

Railcraft/Railcraft-API@0068793

from computronics.

Vexatos avatar Vexatos commented on July 17, 2024

@CovertJaguar Thank you for implementing getOwner 👍
Will ItemRoutingTable.setPages also be implemented? That would be very useful for setting the routing table content via a computer.
Secondly, apparently the TileEntity of the routing track and its TrackRouting instance aren't being initialized properly when you place the track down, but once it receives a Redstone signal for the first time, it is being recognized; this makes it impossible for OpenComputers to recognize the track as a component until it receives that redstone signal. Is that intended?

from computronics.

CovertJaguar avatar CovertJaguar commented on July 17, 2024

Hmm...I wonder if that explains the weirdness you get sometimes when placing tracks.

What function are you triggering off of?

from computronics.

Vexatos avatar Vexatos commented on July 17, 2024

OpenComputers recognizes a TileEntity the following way (See implementation of driver here as reference):
It calls getTileEntityClass which specifies which TE to look for, then it called createEnvironment to actually create the driver. From what I've tested, createEnvironment is never being called at all until you give the track a redstone signal, meaning that the track apparently does not have the TileEntity specified in getTileEntityClass until you apply a Redstone signal, then createEnvironment is being called.

from computronics.

CovertJaguar avatar CovertJaguar commented on July 17, 2024

I've never heard of those functions. Are they OC specific? I meant more what event are you tracking neighbors by? onNeighborBlockChanged()? onNeighborTileChanged()? or something completely different.

from computronics.

asiekierka avatar asiekierka commented on July 17, 2024

Everything mentioned is OC specific, and OC handles the neighbor tracking.

from computronics.

Vexatos avatar Vexatos commented on July 17, 2024

Okay, now that we know this is a problem with OC (See MightyPirates/OpenComputers#496), I am almost done with the drivers. Still hoping for ItemRoutingTable.setPages() to be implemented :)

from computronics.

Vexatos avatar Vexatos commented on July 17, 2024

Done. See https://github.com/asiekierka/Computronics/blob/master/changelog.txt for what exactly I added. If you have any more suggestions, please let me know!

from computronics.

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.