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.7 #663

Merged
merged 27 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c1526e2
Merge pull request #653 from refinedmods/main
raoulvdberge Aug 8, 2024
12f1737
docs: add missing changelog entries for milestone 4.6
raoulvdberge Aug 8, 2024
e508ab8
feat: port to 1.21.1, use new slimeballs tag
raoulvdberge Aug 8, 2024
fdf2418
Merge pull request #654 from refinedmods/fix/GH-644/slimeballs
raoulvdberge Aug 8, 2024
9d52462
fix: move crafting matrix highlight to sprite
raoulvdberge Aug 8, 2024
332d0ea
chore: remove side button sprite sheet
raoulvdberge Aug 8, 2024
68552e6
fix: search bar being positioned wrongly on portable grid
raoulvdberge Aug 8, 2024
004bdac
fix: external storage screen showing upgrade slots
raoulvdberge Aug 8, 2024
44182f2
Merge pull request #655 from refinedmods/fix/GH-646/side-button-sprites
raoulvdberge Aug 8, 2024
cc70d44
fix: grid setting changes not persisting after restart
raoulvdberge Aug 8, 2024
f5f8322
refactor: fluid amount formatting is no longer static
raoulvdberge Aug 10, 2024
a78224c
refactor: move amount formatting from api to common
raoulvdberge Aug 10, 2024
400bd30
refactor: move security toast helper to client helper
raoulvdberge Aug 10, 2024
6a7783e
chore: remove useless test
raoulvdberge Aug 10, 2024
0b94698
fix: game tests should now detect duplicate resources
raoulvdberge Aug 10, 2024
42bd967
fix: regulator upgrade tooltip shouldn't use unit in tooltip
raoulvdberge Aug 10, 2024
50f3523
refactor: rename InMemoryStorageImpl to StorageImpl
raoulvdberge Aug 10, 2024
71d332b
build: manually update name as intellij failed to refactor
raoulvdberge Aug 10, 2024
8e3b1f2
feat: add transmitting icon for wireless transmitter and network tran…
raoulvdberge Aug 10, 2024
a54f1f4
Merge pull request #657 from refinedmods/fix/GH-645/save-grid
raoulvdberge Aug 10, 2024
6e76079
feat: upgrading storage disks and storage blocks
raoulvdberge Aug 10, 2024
504769b
Merge pull request #659 from refinedmods/feat/GH-658/storage-upgrading
raoulvdberge Aug 11, 2024
abff958
fix: can't extract fluids in grid if using an empty fluid container
starforcraft Jul 14, 2024
68798f4
Merge pull request #624 from starforcraft/fix/GH-617/draggingcontr
raoulvdberge Aug 11, 2024
4b18690
fix: retain and use custom names
raoulvdberge Aug 11, 2024
1e92b54
Merge pull request #662 from refinedmods/fix/GH-660/custom-name
raoulvdberge Aug 11, 2024
fcd24af
chore: prepare release v2.0.0-milestone.4.7
raoulvdberge Aug 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ body:
description: |
If your Minecraft version isn't listed here, it means that it isn't supported. In that case, don't create an issue.
options:
- Minecraft 1.21
- Minecraft 1.21.1
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types: [ opened, synchronize, reopened ]
jobs:
build:
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.16.9
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.17.1
with:
gametests: true
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
type: string
jobs:
draft:
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.16.9
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.17.1
with:
release-type: ${{ inputs.release-type }}
version-number-override: ${{ inputs.version-number-override }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-for-unsupported-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
types: [ labeled, unlabeled, reopened ]
jobs:
unsupported-labeler:
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.16.9
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.17.1
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- closed
jobs:
publish-release:
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.9
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.17.1
secrets: inherit
with:
project-name: 'Refined Storage'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resolved-issue-locking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
- cron: '0 0 * * 1'
jobs:
lock:
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.16.9
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.17.1
2 changes: 1 addition & 1 deletion .github/workflows/validate-branch-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Validate branch name
on: [ pull_request ]
jobs:
validate-branch-name:
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.16.9
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.17.1
2 changes: 1 addition & 1 deletion .github/workflows/validate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]
jobs:
validate-changelog:
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.16.9
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.17.1
2 changes: 1 addition & 1 deletion .github/workflows/validate-commit-messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Validate commit messages
on: [ pull_request ]
jobs:
validate-commit-messages:
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.16.9
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.17.1
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0-milestone.4.7] - 2024-08-11

### Added

- You can now upgrade Storage Disks and Storage Blocks to a higher tier by combining with a higher tier Storage Part. The original Storage Part will be returned.

### Changed

- Updated to Minecraft 1.21.1.
- The Network Transmitter and Wireless Transmitter GUI now has an inactive and active GUI animation.
- The Wireless Transmitter now shows whether it's inactive in GUI instead of always showing the range.

### Fixed

- Use new slimeballs convention tag for Processor Binding.
- Portable Grid search bar texture being positioned in the wrong way.
- External Storage screen unnecessarily showing upgrade slots.
- Grid setting changes not persisting after restarting Minecraft.
- Fixed not being able to extract fluids from the Grid with an empty bucket or other empty fluid container.
- All blocks and items now correctly retain their custom name.

## [2.0.0-milestone.4.6] - 2024-08-08

### Added
Expand All @@ -20,6 +41,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- When a Pattern is created for a recipe, the Pattern will have a different texture and name to differentiate between empty patterns.
- The Pattern Grid now has additional support for encoding stonecutter and smithing table recipes.
- The Pattern output is now always rendered in the Pattern Grid result slot.
- You can now search in the Pattern Grid alternatives screen.
- In the Pattern Grid alternatives screen, all resources belonging to a tag or no longer shown at once. You can expand or collapse them.
- The tag names in the Pattern Grid alternatives screen will now be translated.
- "Exact mode" in the Pattern Grid has been replaced with "Fuzzy mode" (inverse).

### Fixed

Expand Down Expand Up @@ -712,7 +737,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.6...HEAD
[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.7...HEAD

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

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

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
refinedarchitectVersion=0.16.9
refinedarchitectVersion=0.17.1
# Gradle
org.gradle.jvmargs=-Xmx1G
6 changes: 0 additions & 6 deletions refinedstorage-common-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {

refinedarchitect {
common()
testing()
javadoc()
publishing {
maven = true
Expand All @@ -22,9 +21,4 @@ dependencies {
api(project(":refinedstorage-resource-api"))
api(project(":refinedstorage-network-api"))
api(project(":refinedstorage-grid-api"))
testImplementation(libs.junit.api)
testImplementation(libs.junit.params)
testImplementation(libs.assertj)
testImplementation(libs.equalsverifier)
testRuntimeOnly(libs.junit.engine)
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ GridScrollingStrategy createGridScrollingStrategy(AbstractContainerMenu containe

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

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

void addIngredientConverter(RecipeModIngredientConverter converter);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ public <T extends ResourceKey> void registerResourceRendering(final Class<T> res
}

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

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,5 @@ public interface GridSynchronizer {
@Nullable
String getTextToSynchronizeToGrid();

ResourceLocation getTextureIdentifier();

int getXTexture();

int getYTexture();
ResourceLocation getSprite();
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@
import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.world.inventory.tooltip.TooltipComponent;
import net.minecraft.world.item.ItemStack;
import org.apiguardian.api.API;

@API(status = API.Status.STABLE, since = "2.0.0-milestone.2.6")
public interface PlatformGridResource extends GridResource {
boolean canExtract(ItemStack carriedStack, GridView view);

void onExtract(GridExtractMode extractMode,
boolean cursor,
GridExtractionStrategy extractionStrategy);
Expand All @@ -42,7 +45,7 @@ void onScroll(GridScrollMode scrollMode,

int getRegistryId();

List<ClientTooltipComponent> getExtractionHints(GridView view);
List<ClientTooltipComponent> getExtractionHints(ItemStack carriedStack, GridView view);

@Nullable
@API(status = API.Status.INTERNAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.minecraft.network.chat.Component;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
Expand All @@ -35,6 +36,16 @@ protected AbstractStorageContainerBlockItem(
this.helper = helper;
}

@Override
public void inventoryTick(final ItemStack stack,
final Level level,
final Entity entity,
final int slotId,
final boolean isSelected) {
super.inventoryTick(stack, level, entity, slotId, isSelected);
helper.transferStorageIfNecessary(stack, level, entity, this::createStorage);
}

@Override
public InteractionResultHolder<ItemStack> use(final Level level, final Player player, final InteractionHand hand) {
final ItemStack stack = player.getItemInHand(hand);
Expand Down Expand Up @@ -76,13 +87,16 @@ public void appendHoverText(final ItemStack stack,
final TooltipFlag flag) {
super.appendHoverText(stack, context, tooltip, flag);
final StorageRepository storageRepository = RefinedStorageApi.INSTANCE.getClientStorageRepository();
helper.appendToTooltip(stack, storageRepository, tooltip, flag, this::formatAmount, hasCapacity());
helper.appendToTooltip(stack, storageRepository, tooltip, flag, this::formatAmount, getCapacity());
}

protected abstract boolean hasCapacity();
@Nullable
protected abstract Long getCapacity();

protected abstract String formatAmount(long amount);

protected abstract SerializableStorage createStorage(StorageRepository storageRepository);

protected abstract ItemStack createPrimaryDisassemblyByproduct(int count);

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ public void inventoryTick(final ItemStack stack,
final int slot,
final boolean selected) {
super.inventoryTick(stack, level, entity, slot, selected);
if (!level.isClientSide() && !helper.hasStorage(stack) && entity instanceof Player) {
final StorageRepository storageRepository = RefinedStorageApi.INSTANCE.getStorageRepository(level);
helper.setStorage(storageRepository, stack, createStorage(storageRepository));
}
helper.transferStorageIfNecessary(stack, level, entity, this::createStorage);
helper.loadStorageIfNecessary(stack, level, entity, this::createStorage);
}

@Override
Expand All @@ -64,10 +62,11 @@ public void appendHoverText(final ItemStack stack,
final TooltipFlag flag) {
super.appendHoverText(stack, context, tooltip, flag);
final StorageRepository storageRepository = RefinedStorageApi.INSTANCE.getClientStorageRepository();
helper.appendToTooltip(stack, storageRepository, tooltip, flag, this::formatAmount, hasCapacity());
helper.appendToTooltip(stack, storageRepository, tooltip, flag, this::formatAmount, getCapacity());
}

protected abstract boolean hasCapacity();
@Nullable
protected abstract Long getCapacity();

protected abstract String formatAmount(long amount);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.function.LongFunction;
import javax.annotation.Nullable;

import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
Expand All @@ -21,9 +23,15 @@
public interface StorageContainerItemHelper {
Optional<SerializableStorage> resolveStorage(StorageRepository storageRepository, ItemStack stack);

void setStorage(StorageRepository storageRepository, ItemStack stack, SerializableStorage storage);
void loadStorageIfNecessary(ItemStack stack,
Level level,
Entity entity,
Function<StorageRepository, SerializableStorage> factory);

boolean hasStorage(ItemStack stack);
void transferStorageIfNecessary(ItemStack stack,
Level level,
Entity entity,
Function<StorageRepository, SerializableStorage> factory);

Optional<StorageInfo> getInfo(StorageRepository storageRepository, ItemStack stack);

Expand All @@ -38,7 +46,7 @@ void appendToTooltip(ItemStack stack,
List<Component> tooltip,
TooltipFlag context,
LongFunction<String> amountFormatter,
boolean hasCapacity);
@Nullable Long capacity);

void transferToBlockEntity(ItemStack stack, StorageBlockEntity blockEntity);

Expand All @@ -49,4 +57,6 @@ void appendToTooltip(ItemStack stack,
Set<ResourceLocation> getDiskModels();

Map<Item, ResourceLocation> getDiskModelsByItem();

void markAsToTransfer(ItemStack from, ItemStack to);
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ public interface StorageRepository {
*/
Optional<SerializableStorage> removeIfEmpty(UUID id);

/**
* Removes a storage by ID.
*
* @param id the id
*/
void remove(UUID id);

/**
* Retrieves info for a given storage ID.
*
Expand Down

This file was deleted.

Loading
Loading