I like energy
This commit is contained in:
parent
97995e6cff
commit
a810333f03
1 changed files with 2 additions and 0 deletions
|
@ -34,6 +34,8 @@ public class CopperWireEntity extends BlockEntity implements EnergyProvider, Ene
|
||||||
private long energy = 0;
|
private long energy = 0;
|
||||||
|
|
||||||
public static void tick(World ignoredWorld, BlockPos ignoredPos, BlockState ignoredState, CopperWireEntity wire) {
|
public static void tick(World ignoredWorld, BlockPos ignoredPos, BlockState ignoredState, CopperWireEntity wire) {
|
||||||
|
magnet.energy = Common.extract(1, 16, magnet.energy, magnet.providers, magnet);
|
||||||
|
|
||||||
if (!wire.receivers.isEmpty() && wire.energy > 0 && wire.active) {
|
if (!wire.receivers.isEmpty() && wire.energy > 0 && wire.active) {
|
||||||
wire.energy = Common.extract(1, 16, wire.energy, wire.providers, wire);
|
wire.energy = Common.extract(1, 16, wire.energy, wire.providers, wire);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue