I noticed there are many mods adding bundeled redstone, but there is no common API for it. So if you try to add support for bundeled Redstone, then you must implement each API of every mod. Thats why my suggestion is a capability based Interface. But I want to collect some opinions for the design before i make the PR.
public void setBundeledRedstone(IRedstoneChannel , int power);
public int getBundeledRedstone(IRedstoneChannel channel);
public IRedstoneChannel [] getChannels();
public interface IRedstoneChannel extends IStringSerializable, Comparable<IRedstoneChannel>
{
public int getId();
//String getName();
//public abstract int compareTo(T paramT);
}
My main Question is. Is budeled redstone supporting the normal redstone power from 0-15 or just on/off ?
I think this is better established by convention between those mods instead of in forge. I don't see every mod having bundled redstone, so I argue it won't benefit many modders to have it in Forge.
@williewillus yeah thats right, but it whould be nice if we have some common API. Any other Idea how we can achiev this?
Currently the main mods iwth bundeled redstoen are
And each one has its own API so having that in forge whould defently benefit some modders. ALso I think this is like the Forge Energie Capabilite only suggestion, you must not implemenet it.
Needs change to is:open label:Feature
Features are here: Click here
This is IMO way out of scope for Forge.
Even if this would go into forge, it needs to be more generic than just using EnumDyeColor.
@diesieben07 you mean some custom value allowing you more than just the 16 color "channels" ?
Yes.
alright I have switched it to INBTSerializable, so it can be any saveable value.
4 of the 6 mods you listed are dead or in limbo
wow this is kind of sad, but hopefully CC gets an update.
alright I have switched it to INBTSerializable, so it can be any saveable value.
Which now makes this API useless. You cannot do jack shit with INBTSerializable, except turn it into NBT. Which does not tell you anything about cable color or whatever. So then mods will have to turn to the individual cable APIs again and we are back at square one.
@diesieben07 have you a better idea? it must somehow be compare able and thats why I throught of the INBTSerializeable (I also added a method to get all the accepted values in the main comment)
No, I do not have a better idea. But if you want this API in forge it is your job to come up with that idea ;)
OK I have a new suggestion, I tried to implemenet everything the EnumDyeColor had, I also added the methods from the super interfaces. I am not shure if we need a compareable but its maybe nice to have them.
What about using integers?
int getChannelCount()
int getMaxSignalStrength()
int getSignalStrength(int channel)
boolean setSignalStrength(int channel, int strength)
Please discuss this on the forums or somewhere else that isn't our issue tracker.
I'm not convinced this is even needed, and the presentation which is mean to convince me is really sloppy/lacking in any information what do ever.
I'd advise flesh this out before bringing it here. Thats what the forums are For.
Most helpful comment
No, I do not have a better idea. But if you want this API in forge it is your job to come up with that idea ;)