MightyPirates / TIS-3D

TIS-100 inspired low-tech computing in Minecraft.
https://www.curseforge.com/minecraft/mc-mods/tis-3d
Other
108 stars 35 forks source link

Capability proxying for Modules #78

Closed asiekierka closed 6 years ago

asiekierka commented 6 years ago

tl;dr: If there's a Module on a given side which implements ICapabilityProvider, hasCapability/getCapability should proxy those methods to the Module on that side.

fnuecke commented 6 years ago

I could have sworn this was in already, but then I realized I only did that in Circuity. Should not be too bad... (famous last words). Would also allow making some modules require less special logic. I'll have a poke at it.

asiekierka commented 6 years ago

Thanks! I want it in particular for adding compatibility with certain Charset features.

fnuecke commented 6 years ago

Done as of e5f35e32a19e63ed9f03cc5eef72207f689a0a40. Changed Infrared Module to use this as a test case, works fine. Pushed as 1.3.1 to Curse.

Curious to see what you'll do with that :3

(To make it work, just implement ICapabilityProvider on the module.)