diff --git a/BauSystem_API/src/de/steamwar/bausystem/world/IAutoLoader.java b/BauSystem_API/src/de/steamwar/bausystem/world/IAutoLoader.java index da617ec..e6b9163 100644 --- a/BauSystem_API/src/de/steamwar/bausystem/world/IAutoLoader.java +++ b/BauSystem_API/src/de/steamwar/bausystem/world/IAutoLoader.java @@ -42,21 +42,30 @@ abstract class IAutoLoader { final boolean active; final int length; + int status; RedstoneActivation(IAutoLoader loader, Location location, int ticks, boolean active){ super(loader, location); this.length = ticks; this.active = active; + status = 0; } @Override 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 int ticks() { - return length; + return 1; } }