Skip to content

Commit

Permalink
Merge pull request #567 from refinedmods/release/2.0.0-milestone.3.13
Browse files Browse the repository at this point in the history
Release v2.0.0-milestone.3.13
  • Loading branch information
raoulvdberge authored Jun 16, 2024
2 parents bfc44ec + dff4325 commit bbc9f96
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0-milestone.3.13] - 2024-06-16

## [2.0.0-milestone.3.12] - 2024-06-16

### Removed
Expand Down Expand Up @@ -604,7 +606,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.3.12...HEAD
[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.3.13...HEAD

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.refinedmods.refinedstorage2.platform.api;

import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.3.13")
public interface RefinedStoragePlugin {
void onPlatformApiAvailable(PlatformApi platformApi);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.refinedmods.refinedstorage2.platform.fabric;

import com.refinedmods.refinedstorage2.platform.api.PlatformApi;
import com.refinedmods.refinedstorage2.platform.api.RefinedStoragePlugin;
import com.refinedmods.refinedstorage2.platform.common.AbstractModInitializer;
import com.refinedmods.refinedstorage2.platform.common.PlatformProxy;
import com.refinedmods.refinedstorage2.platform.common.content.BlockEntities;
Expand Down Expand Up @@ -57,6 +58,7 @@

import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.function.Function;
import java.util.function.Predicate;

Expand All @@ -72,6 +74,7 @@
import net.fabricmc.fabric.api.transfer.v1.fluid.FluidStorage;
import net.fabricmc.fabric.api.transfer.v1.item.InventoryStorage;
import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.Container;
Expand Down Expand Up @@ -102,6 +105,7 @@

public class ModInitializerImpl extends AbstractModInitializer implements ModInitializer {
private static final Logger LOGGER = LoggerFactory.getLogger(ModInitializerImpl.class);
private static final String PLUGIN_ENTRYPOINT_KEY = "refinedstorage_plugin";

@Override
public void onInitialize() {
Expand All @@ -124,6 +128,11 @@ public void onInitialize() {
registerWrenchingEvent();
registerSecurityBlockBreakEvent();

final List<RefinedStoragePlugin> pluginEntrypoints = FabricLoader.getInstance()
.getEntrypoints(PLUGIN_ENTRYPOINT_KEY, RefinedStoragePlugin.class);
LOGGER.debug("Loading {} Refined Storage plugin entrypoints.", pluginEntrypoints.size());
pluginEntrypoints.forEach(plugin -> plugin.onPlatformApiAvailable(PlatformApi.INSTANCE));

LOGGER.debug("Refined Storage 2 has loaded.");
}

Expand Down

0 comments on commit bbc9f96

Please sign in to comment.