SteamWar/BauSystem
Archiviert
13
0

Hotfixing Autoloader redstone activation

Dieser Commit ist enthalten in:
Lixfel 2020-04-01 11:37:31 +02:00
Ursprung 14822378ce
Commit c7f9e416ff

Datei anzeigen

@ -42,21 +42,30 @@ abstract class IAutoLoader {
final boolean active; final boolean active;
final int length; final int length;
int status;
RedstoneActivation(IAutoLoader loader, Location location, int ticks, boolean active){ RedstoneActivation(IAutoLoader loader, Location location, int ticks, boolean active){
super(loader, location); super(loader, location);
this.length = ticks; this.length = ticks;
this.active = active; this.active = active;
status = 0;
} }
@Override @Override
public boolean perform() { public boolean perform() {
return loader.setRedstone(location, active); status++;
if(status < length)
return false;
if(!loader.setRedstone(location, active))
return false;
status = 0;
return true;
} }
@Override @Override
int ticks() { int ticks() {
return length; return 1;
} }
} }