Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.0.0-milestone.4.11 #742

Merged
merged 32 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ae4166f
Merge pull request #726 from refinedmods/main
raoulvdberge Nov 24, 2024
dc78708
chore: update translation French from crowdin
raoulvdberge Nov 24, 2024
080972e
chore: update translation Spanish from crowdin
raoulvdberge Nov 24, 2024
ae8f9f8
chore: update translation Danish from crowdin
raoulvdberge Nov 24, 2024
cf62d60
chore: update translation German from crowdin
raoulvdberge Nov 24, 2024
761afba
chore: update translation Hungarian from crowdin
raoulvdberge Nov 24, 2024
05ec718
chore: update translation Turkish from crowdin
raoulvdberge Nov 24, 2024
1ed7cc4
chore: update translation Ukrainian from crowdin
raoulvdberge Nov 24, 2024
a630f1a
chore: update translation Italian from crowdin
raoulvdberge Nov 24, 2024
ba7e16c
chore: update translation Japanese from crowdin
raoulvdberge Nov 24, 2024
b91f35e
chore: update translation Korean from crowdin
raoulvdberge Nov 24, 2024
1d84d92
chore: update translation Polish from crowdin
raoulvdberge Nov 24, 2024
242aa58
chore: update translation Russian from crowdin
raoulvdberge Nov 24, 2024
9379c37
chore: update translation Swedish from crowdin
raoulvdberge Nov 24, 2024
8cae683
chore: update translation Chinese Simplified from crowdin
raoulvdberge Nov 24, 2024
fdd4817
chore: update translation Chinese Traditional from crowdin
raoulvdberge Nov 24, 2024
3c11492
chore: update translation Portuguese, Brazilian from crowdin
raoulvdberge Nov 24, 2024
ccdbd30
chore: update translation Indonesian from crowdin
raoulvdberge Nov 24, 2024
a18776d
Merge pull request #727 from refinedmods/crowdin-translations
raoulvdberge Nov 24, 2024
93914bd
fix: external storage not connecting properly to fluid storages
raoulvdberge Nov 30, 2024
cf40335
Merge pull request #730 from refinedmods/fix/NO-ISSUE/ext-storage
raoulvdberge Nov 30, 2024
8312bd3
feat: storage block api
raoulvdberge Dec 1, 2024
409e057
Merge pull request #736 from refinedmods/feat/NO-ISSUE/storage-block-api
raoulvdberge Dec 7, 2024
790e884
fix: storage disk upgrade recipes not showing properly in recipe viewers
raoulvdberge Dec 7, 2024
311f5ec
Merge pull request #737 from refinedmods/fix/GH-733/upgrade-recipe-fix
raoulvdberge Dec 7, 2024
89d6b82
fix: protect against crashes from other mods when trying to build too…
raoulvdberge Dec 7, 2024
28f622a
Merge pull request #738 from refinedmods/fix/GH-716/tooltip-robustness
raoulvdberge Dec 7, 2024
ba29a7a
feat: separate insert/extract storage priorities
raoulvdberge Dec 7, 2024
399bf49
Merge pull request #740 from refinedmods/feat/GH-124/differentiated-s…
raoulvdberge Dec 8, 2024
c06a815
fix: charging energy items not working on fabric
raoulvdberge Dec 8, 2024
b2d77ca
Merge pull request #741 from refinedmods/fix/GH-696/charging-energy-i…
raoulvdberge Dec 8, 2024
59e4112
chore: prepare release v2.0.0-milestone.4.11
raoulvdberge Dec 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0-milestone.4.11] - 2024-12-08

### Added

- Ability to differentiate between insert and extract storage priorities. By default, the extract priority will match the insert priority unless configured otherwise.

### Fixed

- Fixed External Fluid not connecting properly to fluid storages.
- Fixed Interface filter not respecting maximum stack size of a resource.
- Fixed potential crash when trying to build cable shapes.
- Fixed storage disk upgrade recipes not showing properly in recipe viewers.
- Protect against crashes from other mods when trying to build the cached Grid tooltip.
- Fixed charging energy items not working on Fabric.

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

### Added
Expand Down Expand Up @@ -814,7 +829,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.10...HEAD
[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.11...HEAD

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

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

Expand Down
1 change: 0 additions & 1 deletion config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
</module>
<module name="IllegalCatch"/>
<module name="IllegalInstantiation"/>
<module name="IllegalThrows"/>
<module name="IllegalToken"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
import com.refinedmods.refinedstorage.api.network.energy.EnergyStorage;
import com.refinedmods.refinedstorage.api.network.node.NetworkNode;
import com.refinedmods.refinedstorage.api.network.security.SecurityPolicy;
import com.refinedmods.refinedstorage.api.resource.ResourceAmount;
import com.refinedmods.refinedstorage.api.resource.ResourceKey;
import com.refinedmods.refinedstorage.common.api.constructordestructor.ConstructorStrategyFactory;
import com.refinedmods.refinedstorage.common.api.constructordestructor.DestructorStrategyFactory;
import com.refinedmods.refinedstorage.common.api.exporter.ExporterTransferStrategyFactory;
import com.refinedmods.refinedstorage.common.api.grid.Grid;
import com.refinedmods.refinedstorage.common.api.grid.GridInsertionHint;
import com.refinedmods.refinedstorage.common.api.grid.GridInsertionHints;
import com.refinedmods.refinedstorage.common.api.grid.GridSynchronizer;
import com.refinedmods.refinedstorage.common.api.grid.strategy.GridExtractionStrategy;
import com.refinedmods.refinedstorage.common.api.grid.strategy.GridExtractionStrategyFactory;
Expand All @@ -24,21 +20,23 @@
import com.refinedmods.refinedstorage.common.api.grid.strategy.GridScrollingStrategyFactory;
import com.refinedmods.refinedstorage.common.api.importer.ImporterTransferStrategyFactory;
import com.refinedmods.refinedstorage.common.api.security.PlatformPermission;
import com.refinedmods.refinedstorage.common.api.storage.StorageBlockData;
import com.refinedmods.refinedstorage.common.api.storage.StorageBlockProvider;
import com.refinedmods.refinedstorage.common.api.storage.StorageContainerItemHelper;
import com.refinedmods.refinedstorage.common.api.storage.StorageRepository;
import com.refinedmods.refinedstorage.common.api.storage.StorageType;
import com.refinedmods.refinedstorage.common.api.storage.externalstorage.PlatformExternalStorageProviderFactory;
import com.refinedmods.refinedstorage.common.api.storagemonitor.StorageMonitorExtractionStrategy;
import com.refinedmods.refinedstorage.common.api.storagemonitor.StorageMonitorInsertionStrategy;
import com.refinedmods.refinedstorage.common.api.support.energy.EnergyItemHelper;
import com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity;
import com.refinedmods.refinedstorage.common.api.support.network.InWorldNetworkNodeContainer;
import com.refinedmods.refinedstorage.common.api.support.network.NetworkNodeContainerProvider;
import com.refinedmods.refinedstorage.common.api.support.network.item.NetworkItemHelper;
import com.refinedmods.refinedstorage.common.api.support.registry.PlatformRegistry;
import com.refinedmods.refinedstorage.common.api.support.resource.RecipeModIngredientConverter;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceContainerInsertStrategy;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceFactory;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceType;
import com.refinedmods.refinedstorage.common.api.support.slotreference.SlotReference;
import com.refinedmods.refinedstorage.common.api.support.slotreference.SlotReferenceFactory;
Expand All @@ -47,23 +45,27 @@
import com.refinedmods.refinedstorage.common.api.wirelesstransmitter.WirelessTransmitterRangeModifier;

import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;

import net.minecraft.core.BlockPos;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;
import org.apiguardian.api.API;

Expand Down Expand Up @@ -133,10 +135,6 @@ GridInsertionStrategy createGridInsertionStrategy(AbstractContainerMenu containe

Collection<ResourceContainerInsertStrategy> getResourceContainerInsertStrategies();

void addAlternativeGridInsertionHint(GridInsertionHint hint);

GridInsertionHints getGridInsertionHints();

GridExtractionStrategy createGridExtractionStrategy(AbstractContainerMenu containerMenu,
ServerPlayer player,
Grid grid);
Expand All @@ -161,10 +159,6 @@ GridScrollingStrategy createGridScrollingStrategy(AbstractContainerMenu containe

Set<ResourceFactory> getAlternativeResourceFactories();

<T extends ResourceKey> void registerResourceRendering(Class<T> resourceClass, ResourceRendering rendering);

<T extends ResourceKey> ResourceRendering getResourceRendering(Class<T> resourceClass);

void addIngredientConverter(RecipeModIngredientConverter converter);

RecipeModIngredientConverter getIngredientConverter();
Expand Down Expand Up @@ -207,7 +201,19 @@ EnergyStorage asBlockItemEnergyStorage(

Optional<Pattern> getPattern(ItemStack stack, Level level);

void openAutocraftingPreview(List<ResourceAmount> requests, @Nullable Object parentScreen);

ResourceLocation getCreativeModeTabId();

AbstractNetworkNodeContainerBlockEntity<?> createStorageBlockEntity(BlockPos pos,
BlockState state,
StorageBlockProvider provider);

Block createStorageBlock(BlockBehaviour.Properties properties, StorageBlockProvider provider);

AbstractContainerMenu createStorageBlockContainerMenu(int syncId,
Player player,
StorageBlockData data,
ResourceFactory resourceFactory,
MenuType<?> menuType);

StreamCodec<RegistryFriendlyByteBuf, StorageBlockData> getStorageBlockDataStreamCodec();
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
import com.refinedmods.refinedstorage.api.network.energy.EnergyStorage;
import com.refinedmods.refinedstorage.api.network.node.NetworkNode;
import com.refinedmods.refinedstorage.api.network.security.SecurityPolicy;
import com.refinedmods.refinedstorage.api.resource.ResourceAmount;
import com.refinedmods.refinedstorage.api.resource.ResourceKey;
import com.refinedmods.refinedstorage.common.api.constructordestructor.ConstructorStrategyFactory;
import com.refinedmods.refinedstorage.common.api.constructordestructor.DestructorStrategyFactory;
import com.refinedmods.refinedstorage.common.api.exporter.ExporterTransferStrategyFactory;
import com.refinedmods.refinedstorage.common.api.grid.Grid;
import com.refinedmods.refinedstorage.common.api.grid.GridInsertionHint;
import com.refinedmods.refinedstorage.common.api.grid.GridInsertionHints;
import com.refinedmods.refinedstorage.common.api.grid.GridSynchronizer;
import com.refinedmods.refinedstorage.common.api.grid.strategy.GridExtractionStrategy;
import com.refinedmods.refinedstorage.common.api.grid.strategy.GridExtractionStrategyFactory;
Expand All @@ -24,21 +20,23 @@
import com.refinedmods.refinedstorage.common.api.grid.strategy.GridScrollingStrategyFactory;
import com.refinedmods.refinedstorage.common.api.importer.ImporterTransferStrategyFactory;
import com.refinedmods.refinedstorage.common.api.security.PlatformPermission;
import com.refinedmods.refinedstorage.common.api.storage.StorageBlockData;
import com.refinedmods.refinedstorage.common.api.storage.StorageBlockProvider;
import com.refinedmods.refinedstorage.common.api.storage.StorageContainerItemHelper;
import com.refinedmods.refinedstorage.common.api.storage.StorageRepository;
import com.refinedmods.refinedstorage.common.api.storage.StorageType;
import com.refinedmods.refinedstorage.common.api.storage.externalstorage.PlatformExternalStorageProviderFactory;
import com.refinedmods.refinedstorage.common.api.storagemonitor.StorageMonitorExtractionStrategy;
import com.refinedmods.refinedstorage.common.api.storagemonitor.StorageMonitorInsertionStrategy;
import com.refinedmods.refinedstorage.common.api.support.energy.EnergyItemHelper;
import com.refinedmods.refinedstorage.common.api.support.network.AbstractNetworkNodeContainerBlockEntity;
import com.refinedmods.refinedstorage.common.api.support.network.InWorldNetworkNodeContainer;
import com.refinedmods.refinedstorage.common.api.support.network.NetworkNodeContainerProvider;
import com.refinedmods.refinedstorage.common.api.support.network.item.NetworkItemHelper;
import com.refinedmods.refinedstorage.common.api.support.registry.PlatformRegistry;
import com.refinedmods.refinedstorage.common.api.support.resource.RecipeModIngredientConverter;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceContainerInsertStrategy;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceFactory;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceType;
import com.refinedmods.refinedstorage.common.api.support.slotreference.SlotReference;
import com.refinedmods.refinedstorage.common.api.support.slotreference.SlotReferenceFactory;
Expand All @@ -47,23 +45,27 @@
import com.refinedmods.refinedstorage.common.api.wirelesstransmitter.WirelessTransmitterRangeModifier;

import java.util.Collection;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;

import net.minecraft.core.BlockPos;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.state.BlockState;

public class RefinedStorageApiProxy implements RefinedStorageApi {
Expand Down Expand Up @@ -229,16 +231,6 @@ public Collection<ResourceContainerInsertStrategy> getResourceContainerInsertStr
return ensureLoaded().getResourceContainerInsertStrategies();
}

@Override
public void addAlternativeGridInsertionHint(final GridInsertionHint hint) {
ensureLoaded().addAlternativeGridInsertionHint(hint);
}

@Override
public GridInsertionHints getGridInsertionHints() {
return ensureLoaded().getGridInsertionHints();
}

@Override
public GridExtractionStrategy createGridExtractionStrategy(final AbstractContainerMenu containerMenu,
final ServerPlayer player,
Expand Down Expand Up @@ -293,17 +285,6 @@ public Set<ResourceFactory> getAlternativeResourceFactories() {
return ensureLoaded().getAlternativeResourceFactories();
}

@Override
public <T extends ResourceKey> void registerResourceRendering(final Class<T> resourceClass,
final ResourceRendering rendering) {
ensureLoaded().registerResourceRendering(resourceClass, rendering);
}

@Override
public <T extends ResourceKey> ResourceRendering getResourceRendering(final Class<T> resourceClass) {
return ensureLoaded().getResourceRendering(resourceClass);
}

@Override
public void addIngredientConverter(final RecipeModIngredientConverter converter) {
ensureLoaded().addIngredientConverter(converter);
Expand Down Expand Up @@ -405,13 +386,34 @@ public Optional<Pattern> getPattern(final ItemStack stack, final Level level) {
}

@Override
public void openAutocraftingPreview(final List<ResourceAmount> requests, @Nullable final Object parentScreen) {
ensureLoaded().openAutocraftingPreview(requests, parentScreen);
public ResourceLocation getCreativeModeTabId() {
return ensureLoaded().getCreativeModeTabId();
}

@Override
public ResourceLocation getCreativeModeTabId() {
return ensureLoaded().getCreativeModeTabId();
public AbstractNetworkNodeContainerBlockEntity<?> createStorageBlockEntity(final BlockPos pos,
final BlockState state,
final StorageBlockProvider provider) {
return ensureLoaded().createStorageBlockEntity(pos, state, provider);
}

@Override
public Block createStorageBlock(final BlockBehaviour.Properties properties, final StorageBlockProvider provider) {
return ensureLoaded().createStorageBlock(properties, provider);
}

@Override
public AbstractContainerMenu createStorageBlockContainerMenu(final int syncId,
final Player player,
final StorageBlockData data,
final ResourceFactory resourceFactory,
final MenuType<?> menuType) {
return ensureLoaded().createStorageBlockContainerMenu(syncId, player, data, resourceFactory, menuType);
}

@Override
public StreamCodec<RegistryFriendlyByteBuf, StorageBlockData> getStorageBlockDataStreamCodec() {
return ensureLoaded().getStorageBlockDataStreamCodec();
}

private RefinedStorageApi ensureLoaded() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.refinedmods.refinedstorage.common.api;

import com.refinedmods.refinedstorage.api.resource.ResourceAmount;
import com.refinedmods.refinedstorage.api.resource.ResourceKey;
import com.refinedmods.refinedstorage.common.api.grid.GridInsertionHint;
import com.refinedmods.refinedstorage.common.api.grid.GridInsertionHints;
import com.refinedmods.refinedstorage.common.api.support.resource.ResourceRendering;

import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;

import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.item.Item;
import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.11")
public interface RefinedStorageClientApi {
RefinedStorageClientApi INSTANCE = new RefinedStorageClientApiProxy();

AbstractContainerScreen<AbstractContainerMenu> createStorageBlockScreen(
AbstractContainerMenu menu,
Inventory inventory,
Component title,
Class<? extends ResourceKey> resourceClass
);

void openAutocraftingPreview(List<ResourceAmount> requests, @Nullable Screen parentScreen);

<T extends ResourceKey> void registerResourceRendering(Class<T> resourceClass, ResourceRendering rendering);

<T extends ResourceKey> ResourceRendering getResourceRendering(Class<T> resourceClass);

void addAlternativeGridInsertionHint(GridInsertionHint hint);

GridInsertionHints getGridInsertionHints();

void registerDiskModel(Item item, ResourceLocation model);

Set<ResourceLocation> getDiskModels();

Map<Item, ResourceLocation> getDiskModelsByItem();
}
Loading
Loading