mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 09:03:42 +01:00
possible fix for double chest issue
Signed-off-by: BuildTools <unconfigured@null.spigotmc.org>
This commit is contained in:
parent
05de64a4e2
commit
898b3f055e
4 changed files with 11 additions and 2 deletions
|
@ -69,7 +69,7 @@ public class CreateConfig {
|
|||
public DoubleValue mediumCapacity, highCapacity;
|
||||
|
||||
// Logistics
|
||||
public IntValue extractorDelay, extractorAmount, linkRange;
|
||||
public IntValue extractorDelay, extractorInventoryScanDelay, extractorAmount, linkRange;
|
||||
|
||||
// Gardens
|
||||
public DoubleValue cocoaLogGrowthSpeed;
|
||||
|
@ -163,6 +163,11 @@ public class CreateConfig {
|
|||
.comment("", "The amount of game ticks an Extractor waits after pulling an item successfully.")
|
||||
.translation(basePath + name).defineInRange(name, 20, 1, Integer.MAX_VALUE);
|
||||
|
||||
name = "extractorInventoryScanDelay";
|
||||
extractorInventoryScanDelay = builder
|
||||
.comment("", "The amount of game ticks an Extractor waits before checking again if the attached inventory contains items to extract.")
|
||||
.translation(basePath + name).defineInRange(name, 40, 1, Integer.MAX_VALUE);
|
||||
|
||||
name = "extractorAmount";
|
||||
extractorAmount = builder
|
||||
.comment("", "The amount of items an extractor pulls at a time without an applied filter.")
|
||||
|
|
|
@ -46,7 +46,7 @@ public interface IExtractor extends ITickableTileEntity, IInventoryManipulator {
|
|||
if (state == State.LOCKED)
|
||||
return;
|
||||
|
||||
if (state == State.ON_COOLDOWN) {
|
||||
if (state == State.ON_COOLDOWN || state == State.WAITING_FOR_INVENTORY) {
|
||||
int cooldown = tickCooldown();
|
||||
if (cooldown <= 0) {
|
||||
setState(State.RUNNING);
|
||||
|
|
|
@ -70,6 +70,8 @@ public class ExtractorTileEntity extends SyncedTileEntity implements IExtractor,
|
|||
public void setState(State state) {
|
||||
if (state == State.ON_COOLDOWN)
|
||||
cooldown = CreateConfig.parameters.extractorDelay.get();
|
||||
if (state == State.WAITING_FOR_INVENTORY)
|
||||
cooldown = CreateConfig.parameters.extractorInventoryScanDelay.get();
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,6 +96,8 @@ public class LinkedExtractorTileEntity extends LinkedTileEntity
|
|||
public void setState(State state) {
|
||||
if (state == State.ON_COOLDOWN)
|
||||
cooldown = CreateConfig.parameters.extractorDelay.get();
|
||||
if (state == State.WAITING_FOR_INVENTORY)
|
||||
cooldown = CreateConfig.parameters.extractorInventoryScanDelay.get();
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue