BuildCraft|Core

BuildCraft|Core

7M Downloads

API for custom lasers

Opened this issue ยท 9 comments

commented

BuildCraft have ILaserTarget interface, but it don't have any explicit support for custom lasers, although it should have it.
However, i can't do it myself and PR it, becuse i don't really know how lasers and tables work.

commented

Laser is something a bit intricate right now. Do you have an actual need for such an interface?

commented

I was planing on adding support for BC tables to lasers from my mod(unfinished).
Right now i can just search for ILaserTarget tiles, but actual API would be useful.

commented

Are you relying solely on the BC API, or on internal parts as well?

commented

Just API, it'll be standalone mod.

commented

Ok. Extending the API is a problem on the 6.0 branch, as we're closing down on the feature set now. So that'll have to wait for 6.1. If you want to make an API proposal, you can look at how the class RenderLaserBlock is used. That's what is providing lasers to the laser block so far.

Closing this ticket for now, but feel free to make a PR proposal once you have a better understanding on how it works. Note that we would need to go through a factory for RenderLaserBlock, as it's too dangerous to put the code directly in the API and freeze it for a version.

commented

Ok. And i just made fun test handler for stripes pipe that recolours the wool, instead of breaking it with engine =P

commented

Actually, one enhancement even better would be to have lasers handled directly from the assembly table, not from the lasers themselves. That should simplify a lot the API.

commented

Yeah. And just a marker interface for laser blocks(even without tiles).

commented

Yup, that sounds promising. Looking forwards to the PR ;-)