It depends on the energy system, and also depends on what other things you want (like does the wire automatically figure out connections).
But the general idea for an energy system is that transmission blocks need to have some field that indicates the amount of power available to it. If you are okay with just a few (16) levels of energy then you can use the Property (metadata) system to contain the information, otherwise you would need a tile entity (with NBT data).
Basically fairly frequently the block should check for any power sources or other transmission blocks next to it. If there is a source of power then it would adjust its energy level, or if the source is removed then it would reduce the energy level. Most energy systems have the power reduce as it goes over more transmission -- mostly this is important for performance reasons. So this is similar to what redstone does.
So imagine you have an energy system with 16 levels of energy. You have a generator block, and you have a machine block, and you want to connect it with wire blocks. Every tick you would do something like:
The wire blocks would look at all the neighboring blocks to check for either a generator block or another wire block, and it would take the neighboring block with highest energy level and copy the energy level minus 1.
The machine block would look at all the neighboring blocks to check for either a generator block or another wire block, and if it finds one off those it would check the energy level in that block. If it is enough for the machine then the machine would turn on, otherwise it would turn off.
That's pretty much how it works. The wires and machines need to scan for neighboring blocks with energy and then adjust.
Now it really isn't too hard to make your own energy system, but there are already other ones out there. If you want compatibility with the other ones you can use the Forge energy API.
I've looked at Mechanism and Thermal Dynamics and can't seem to figure out how it works so if one of you people could help me that would be great
It depends on the energy system, and also depends on what other things you want (like does the wire automatically figure out connections).
But the general idea for an energy system is that transmission blocks need to have some field that indicates the amount of power available to it. If you are okay with just a few (16) levels of energy then you can use the Property (metadata) system to contain the information, otherwise you would need a tile entity (with NBT data).
Basically fairly frequently the block should check for any power sources or other transmission blocks next to it. If there is a source of power then it would adjust its energy level, or if the source is removed then it would reduce the energy level. Most energy systems have the power reduce as it goes over more transmission -- mostly this is important for performance reasons. So this is similar to what redstone does.
So imagine you have an energy system with 16 levels of energy. You have a generator block, and you have a machine block, and you want to connect it with wire blocks. Every tick you would do something like:
That's pretty much how it works. The wires and machines need to scan for neighboring blocks with energy and then adjust.
Now it really isn't too hard to make your own energy system, but there are already other ones out there. If you want compatibility with the other ones you can use the Forge energy API.
Im using forge energy i just need to know how to make the wires connect when there placed next to each other