From c7f9e416ff520caf391fc6ef642df8e52a2d87cf Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 1 Apr 2020 11:37:31 +0200 Subject: [PATCH] Hotfixing Autoloader redstone activation --- .../de/steamwar/bausystem/world/IAutoLoader.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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; } }