mmb.content.wireworld.AbstractSourceGateBase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multimachinebuilder Show documentation
Show all versions of multimachinebuilder Show documentation
Dependency for the MultiMachineBuilder, a voxel game about building an industrial empire in a finite world.
THIS RELEASE IS NOT PLAYABLE. To play the game, donwload from >ITCH.IO LINK HERE< or >GH releases link here<
/**
*
*/
package mmb.content.wireworld;
import mmb.engine.block.BlockEntityRotary;
import mmb.engine.rotate.Side;
import mmb.engine.worlds.MapProxy;
/**
* @author oskar
* A skeletal implementation for a gate which reads two signals from DL and DR corners, and outputs them to U side
*/
public abstract class AbstractSourceGateBase extends BlockEntityRotary{
protected boolean result;
protected abstract boolean run();
@Override
public boolean provideSignal(Side s) {
return (s == getRotation().U()) && result;
}
@Override
public void onTick(MapProxy map) {
result = run();
}
}