Skip to content

Commit

Permalink
Merge pull request #725 from refinedmods/release/2.0.0-milestone.4.10
Browse files Browse the repository at this point in the history
Release v2.0.0-milestone.4.10
  • Loading branch information
raoulvdberge authored Nov 24, 2024
2 parents 237af4f + 8583fec commit c627648
Show file tree
Hide file tree
Showing 294 changed files with 8,375 additions and 1,741 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0-milestone.4.10] - 2024-11-24

### Added

- Autocrafting Monitor
- Wireless Autocrafting Monitor
- Creative Wireless Autocrafting Monitor

### Changed

- The Autocrafting Monitor now has a sidebar with all tasks instead of using tabs.
- The auto-selected search box mode is now a global option used in the Autocrafter Manager as well.

### Removed

- Block of Quartz Enriched Iron (has been moved to addon mod)
- Block of Quartz Enriched Copper (has been moved to addon mod)

## [2.0.0-milestone.4.9] - 2024-11-01

### Added
Expand Down Expand Up @@ -796,7 +814,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- The Grid can now use smooth scrolling.
- The Grid now has syntax highlighting for the search query.

[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.9...HEAD
[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.10...HEAD

[2.0.0-milestone.4.10]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.9...v2.0.0-milestone.4.10

[2.0.0-milestone.4.9]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.8...v2.0.0-milestone.4.9

Expand Down
11 changes: 11 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ subprojects {
group = "com.refinedmods.refinedstorage"
}

/* publish all subprojects to mavenLocal */
subprojects {
apply(plugin = "maven-publish")

publishing {
repositories {
mavenLocal()
}
}
}

project.extensions.getByType<SonarExtension>().apply {
properties {
property(
Expand Down
1 change: 1 addition & 0 deletions config/checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<suppress checks="JavadocPackage" files="test[\\/].*.java"/>
<!-- Mod initializer can be longer due to initialization logic, config can be long too -->
<suppress checks="FileLength" files="(ModInitializer.*\.java|ConfigImpl\.java)"/>
<suppress checks="MethodCount" files="Items.java"/>
<!-- Shadow target contains underscore -->
<suppress checks="MemberName" files="ModelBakerImplMixin.java"/>
<suppress checks="HideUtilityClassConstructor" files="GridClearPacket.java"/>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.refinedmods.refinedstorage.api.autocrafting;

import java.util.UUID;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10")
public record TaskId(UUID id) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.refinedmods.refinedstorage.api.autocrafting.preview;

import java.util.List;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9")
public record Preview(PreviewType type, List<PreviewItem> items) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.refinedmods.refinedstorage.api.autocrafting.preview;

import com.refinedmods.refinedstorage.api.resource.ResourceKey;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9")
public record PreviewItem(ResourceKey resource, long available, long missing, long toCraft) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.refinedmods.refinedstorage.api.autocrafting.preview;

import com.refinedmods.refinedstorage.api.resource.ResourceKey;

import java.util.Optional;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9")
public interface PreviewProvider {
Optional<Preview> getPreview(ResourceKey resource, long amount);

boolean startTask(ResourceKey resource, long amount);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.refinedmods.refinedstorage.api.autocrafting.preview;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9")
public enum PreviewType {
SUCCESS,
MISSING_RESOURCES
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.api.autocrafting.preview;

import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault;

import javax.annotation.ParametersAreNonnullByDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.refinedmods.refinedstorage.api.autocrafting.status;

import com.refinedmods.refinedstorage.api.autocrafting.TaskId;
import com.refinedmods.refinedstorage.api.resource.ResourceKey;

import java.util.List;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10")
public record TaskStatus(TaskInfo info, float percentageCompleted, List<Item> items) {
public record TaskInfo(TaskId id, ResourceKey resource, long amount, long startTime) {
}

public record Item(
ItemType type,
ResourceKey resource,
long stored,
long missing,
long processing,
long scheduled,
long crafting
) {
}

public enum ItemType {
NORMAL,
MACHINE_DOES_NOT_ACCEPT_RESOURCE,
NO_MACHINE_FOUND,
AUTOCRAFTER_IS_LOCKED
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.refinedmods.refinedstorage.api.autocrafting.status;

import com.refinedmods.refinedstorage.api.autocrafting.TaskId;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10")
public interface TaskStatusListener {
void taskStatusChanged(TaskStatus status);

void taskRemoved(TaskId id);

void taskAdded(TaskStatus status);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.refinedmods.refinedstorage.api.autocrafting.status;

import com.refinedmods.refinedstorage.api.autocrafting.TaskId;

import java.util.List;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10")
public interface TaskStatusProvider {
List<TaskStatus> getStatuses();

void addListener(TaskStatusListener listener);

void removeListener(TaskStatusListener listener);

void cancel(TaskId taskId);

void cancelAll();

void testUpdate();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.api.autocrafting.status;

import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault;

import javax.annotation.ParametersAreNonnullByDefault;
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.refinedmods.refinedstorage.api.resource.ResourceKey;

enum ResourceFixtures implements ResourceKey {
public enum ResourceFixtures implements ResourceKey {
A,
B,
C
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.refinedmods.refinedstorage.api.autocrafting.status;

import com.refinedmods.refinedstorage.api.autocrafting.ResourceFixtures;
import com.refinedmods.refinedstorage.api.autocrafting.TaskId;

import java.util.List;
import java.util.UUID;

import org.junit.jupiter.api.Test;

class TaskStatusTest {
@Test
void dummyTest() {
new TaskStatus(
new TaskStatus.TaskInfo(
new TaskId(UUID.randomUUID()),
ResourceFixtures.A,
0,
0
),
0.69F,
List.of(
new TaskStatus.Item(
TaskStatus.ItemType.NORMAL,
ResourceFixtures.A,
0,
0,
0,
0,
0
)
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.api.autocrafting.status;

import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault;

import javax.annotation.ParametersAreNonnullByDefault;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.refinedmods.refinedstorage.common.api.grid;

import com.refinedmods.refinedstorage.api.autocrafting.AutocraftingPreviewProvider;
import com.refinedmods.refinedstorage.api.autocrafting.preview.PreviewProvider;
import com.refinedmods.refinedstorage.api.grid.operations.GridOperations;
import com.refinedmods.refinedstorage.api.grid.watcher.GridWatcher;
import com.refinedmods.refinedstorage.api.storage.Actor;
Expand All @@ -16,7 +16,7 @@
import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.3.0")
public interface Grid extends AutocraftingPreviewProvider {
public interface Grid extends PreviewProvider {
void addWatcher(GridWatcher watcher, Class<? extends Actor> actorType);

void removeWatcher(GridWatcher watcher);
Expand Down
Loading

0 comments on commit c627648

Please sign in to comment.