6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -83,3 +83,9 @@ jobs:
|
|||||||
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
|
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
|
||||||
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
||||||
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
||||||
|
- name: Announce to Mastodon
|
||||||
|
uses: rzr/fediverse-action@master
|
||||||
|
with:
|
||||||
|
access-token: ${{ secrets.MASTODON_TOKEN }}
|
||||||
|
host: 'anvil.social'
|
||||||
|
message: "Refined Storage ${{ env.GIT_TAG_NAME }} has been released! ${{ env.RELEASE_URL }}"
|
||||||
|
|||||||
13
.github/workflows/resolved-issue-locking.yml
vendored
Normal file
13
.github/workflows/resolved-issue-locking.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
name: Lock resolved issues and PRs
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
jobs:
|
||||||
|
lock:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: dessant/lock-threads@v2
|
||||||
|
with:
|
||||||
|
github-token: ${{ github.token }}
|
||||||
|
issue-lock-inactive-days: '30'
|
||||||
|
pr-lock-inactive-days: '30'
|
||||||
23
CHANGELOG.md
23
CHANGELOG.md
@@ -9,6 +9,15 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed some craftable items not showing as craftable in JEI
|
||||||
|
- Fixed Grid crashing on exit if JEI mod is not used
|
||||||
|
- Fixed rare multithreading crash
|
||||||
|
- Fixed Constructor being able to drop more than the maximum stack size for an item
|
||||||
|
|
||||||
|
## [v1.11.4] - 2022-12-20
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
- Fixed duplication bug in the Interface.
|
- Fixed duplication bug in the Interface.
|
||||||
|
|
||||||
## [v1.11.3] - 2022-12-20
|
## [v1.11.3] - 2022-12-20
|
||||||
@@ -48,6 +57,20 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
|
|
||||||
- Ported to Minecraft 1.19.2.
|
- Ported to Minecraft 1.19.2.
|
||||||
|
|
||||||
|
## [v1.10.4] - 2022-12-20
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed external storage cache being de-synced from the network cache.
|
||||||
|
- Fixed external storage using an out of date block entity for getting handler.
|
||||||
|
- Fixed chained crafters not taking over the name of the root crafter.
|
||||||
|
- Made Refined Storage more robust against crashes when moving network blocks by unconventional means.
|
||||||
|
- Fixed duplication bug in the Interface.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Increased packet size limit.
|
||||||
|
|
||||||
## [v1.10.3] - 2022-08-06
|
## [v1.10.3] - 2022-08-06
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# The MIT License (MIT)
|
# The MIT License (MIT)
|
||||||
|
|
||||||
Copyright © 2015 - 2022 Refined Mods
|
Copyright © 2015 - 2023 Refined Mods
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ apply plugin: 'maven-publish'
|
|||||||
|
|
||||||
group = 'com.refinedmods'
|
group = 'com.refinedmods'
|
||||||
archivesBaseName = 'refinedstorage'
|
archivesBaseName = 'refinedstorage'
|
||||||
version = '1.11.4'
|
version = '1.11.5'
|
||||||
|
|
||||||
if (System.getenv('GITHUB_SHA') != null) {
|
if (System.getenv('GITHUB_SHA') != null) {
|
||||||
version += '+' + System.getenv('GITHUB_SHA').substring(0, 7)
|
version += '+' + System.getenv('GITHUB_SHA').substring(0, 7)
|
||||||
|
|||||||
@@ -134,7 +134,8 @@ public class ConstructorNetworkNode extends NetworkNode implements IComparable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void extractAndDropItem(ItemStack stack) {
|
private void extractAndDropItem(ItemStack stack) {
|
||||||
ItemStack took = network.extractItem(stack, upgrades.getStackInteractCount(), compare, Action.PERFORM);
|
int dropCount = Math.min(upgrades.getStackInteractCount(), stack.getMaxStackSize());
|
||||||
|
ItemStack took = network.extractItem(stack, dropCount, compare, Action.PERFORM);
|
||||||
|
|
||||||
if (!took.isEmpty()) {
|
if (!took.isEmpty()) {
|
||||||
DefaultDispenseItemBehavior.spawnItem(level, took, 6, getDirection(), new PositionImpl(getDispensePositionX(), getDispensePositionY(), getDispensePositionZ()));
|
DefaultDispenseItemBehavior.spawnItem(level, took, 6, getDirection(), new PositionImpl(getDispensePositionX(), getDispensePositionY(), getDispensePositionZ()));
|
||||||
|
|||||||
@@ -62,6 +62,10 @@ public class ItemExternalStorageCache {
|
|||||||
|
|
||||||
ItemStack cached = cache.get(i);
|
ItemStack cached = cache.get(i);
|
||||||
|
|
||||||
|
//ItemStack.EMPTY can be accidentally modified by other mods on any thread. This makes sure we ignore that.
|
||||||
|
if (actual == ItemStack.EMPTY && actual == cached)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (!cached.isEmpty() && actual.isEmpty()) { // REMOVED
|
if (!cached.isEmpty() && actual.isEmpty()) { // REMOVED
|
||||||
network.getItemStorageCache().remove(cached, cached.getCount(), true);
|
network.getItemStorageCache().remove(cached, cached.getCount(), true);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.refinedmods.refinedstorage.RSItems;
|
|||||||
import com.refinedmods.refinedstorage.apiimpl.network.node.cover.CoverManager;
|
import com.refinedmods.refinedstorage.apiimpl.network.node.cover.CoverManager;
|
||||||
import com.refinedmods.refinedstorage.item.CoverItem;
|
import com.refinedmods.refinedstorage.item.CoverItem;
|
||||||
import com.refinedmods.refinedstorage.recipe.CoverRecipe;
|
import com.refinedmods.refinedstorage.recipe.CoverRecipe;
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
|
||||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||||
import mezz.jei.api.gui.builder.IRecipeSlotBuilder;
|
import mezz.jei.api.gui.builder.IRecipeSlotBuilder;
|
||||||
import mezz.jei.api.gui.ingredient.ICraftingGridHelper;
|
import mezz.jei.api.gui.ingredient.ICraftingGridHelper;
|
||||||
@@ -55,8 +54,8 @@ public class CoverCraftingCategoryExtension implements ICraftingCategoryExtensio
|
|||||||
List<List<ItemStack>> inputs = new ArrayList<>(Collections.nCopies(9, new ArrayList<>()));
|
List<List<ItemStack>> inputs = new ArrayList<>(Collections.nCopies(9, new ArrayList<>()));
|
||||||
inputs.set(3, nuggets);
|
inputs.set(3, nuggets);
|
||||||
inputs.set(4, input);
|
inputs.set(4, input);
|
||||||
List<IRecipeSlotBuilder> inputSlots = craftingGridHelper.createAndSetInputs(builder, VanillaTypes.ITEM_STACK, inputs, 3, 3);
|
List<IRecipeSlotBuilder> inputSlots = craftingGridHelper.createAndSetInputs(builder, inputs, 3, 3);
|
||||||
IRecipeSlotBuilder outputSlot = craftingGridHelper.createAndSetOutputs(builder, VanillaTypes.ITEM_STACK, output);
|
IRecipeSlotBuilder outputSlot = craftingGridHelper.createAndSetOutputs(builder, output);
|
||||||
|
|
||||||
builder.createFocusLink(inputSlots.get(4), outputSlot);
|
builder.createFocusLink(inputSlots.get(4), outputSlot);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import com.refinedmods.refinedstorage.network.grid.GridCraftingPreviewRequestMes
|
|||||||
import com.refinedmods.refinedstorage.network.grid.GridProcessingTransferMessage;
|
import com.refinedmods.refinedstorage.network.grid.GridProcessingTransferMessage;
|
||||||
import com.refinedmods.refinedstorage.network.grid.GridTransferMessage;
|
import com.refinedmods.refinedstorage.network.grid.GridTransferMessage;
|
||||||
import com.refinedmods.refinedstorage.screen.grid.GridScreen;
|
import com.refinedmods.refinedstorage.screen.grid.GridScreen;
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
|
||||||
import mezz.jei.api.forge.ForgeTypes;
|
import mezz.jei.api.forge.ForgeTypes;
|
||||||
import mezz.jei.api.gui.ingredient.IRecipeSlotView;
|
import mezz.jei.api.gui.ingredient.IRecipeSlotView;
|
||||||
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
|
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
|
||||||
@@ -67,7 +66,7 @@ public class GridRecipeTransferHandler implements IRecipeTransferHandler<GridCon
|
|||||||
|
|
||||||
Ingredient.IngredientList ingredientList = new Ingredient.IngredientList();
|
Ingredient.IngredientList ingredientList = new Ingredient.IngredientList();
|
||||||
for (IRecipeSlotView slotView : recipeSlots.getSlotViews(RecipeIngredientRole.INPUT)) {
|
for (IRecipeSlotView slotView : recipeSlots.getSlotViews(RecipeIngredientRole.INPUT)) {
|
||||||
Optional<ItemStack> firstStack = slotView.getIngredients(VanillaTypes.ITEM_STACK).findAny();
|
Optional<ItemStack> firstStack = slotView.getItemStacks().findAny();
|
||||||
ingredientList.add(new Ingredient(slotView, firstStack.map(ItemStack::getCount).orElse(0)));
|
ingredientList.add(new Ingredient(slotView, firstStack.map(ItemStack::getCount).orElse(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,10 +138,10 @@ public class GridRecipeTransferHandler implements IRecipeTransferHandler<GridCon
|
|||||||
List<List<ItemStack>> inputs = recipeSlotsView.getSlotViews(RecipeIngredientRole.INPUT).stream().map(view -> {
|
List<List<ItemStack>> inputs = recipeSlotsView.getSlotViews(RecipeIngredientRole.INPUT).stream().map(view -> {
|
||||||
|
|
||||||
//Creating a mutable list
|
//Creating a mutable list
|
||||||
List<ItemStack> stacks = view.getIngredients(VanillaTypes.ITEM_STACK).collect(Collectors.toCollection(ArrayList::new));
|
List<ItemStack> stacks = view.getItemStacks().collect(Collectors.toCollection(ArrayList::new));
|
||||||
|
|
||||||
//moving the displayed stack to first
|
//moving the displayed stack to first
|
||||||
Optional<ItemStack> displayStack = view.getDisplayedIngredient(VanillaTypes.ITEM_STACK);
|
Optional<ItemStack> displayStack = view.getDisplayedItemStack();
|
||||||
displayStack.ifPresent(stack -> {
|
displayStack.ifPresent(stack -> {
|
||||||
int index = stacks.indexOf(stack);
|
int index = stacks.indexOf(stack);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
@@ -185,11 +184,11 @@ public class GridRecipeTransferHandler implements IRecipeTransferHandler<GridCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleItemIngredient(List<ItemStack> list, IRecipeSlotView slotView, GridContainerMenu gridContainer, Player player) {
|
private void handleItemIngredient(List<ItemStack> list, IRecipeSlotView slotView, GridContainerMenu gridContainer, Player player) {
|
||||||
if (slotView != null && slotView.getIngredients(VanillaTypes.ITEM_STACK).findAny().isPresent()) {
|
if (slotView != null && slotView.getItemStacks().findAny().isPresent()) {
|
||||||
ItemStack stack = IngredientTracker.getTracker(gridContainer).findBestMatch(gridContainer, player, slotView.getIngredients(VanillaTypes.ITEM_STACK).toList());
|
ItemStack stack = IngredientTracker.getTracker(gridContainer).findBestMatch(gridContainer, player, slotView.getItemStacks().toList());
|
||||||
|
|
||||||
if (stack.isEmpty() && slotView.getDisplayedIngredient(VanillaTypes.ITEM_STACK).isPresent()) {
|
if (stack.isEmpty() && slotView.getDisplayedItemStack().isPresent()) {
|
||||||
stack = slotView.getDisplayedIngredient(VanillaTypes.ITEM_STACK).get();
|
stack = slotView.getDisplayedItemStack().get();
|
||||||
}
|
}
|
||||||
if (!stack.isEmpty()) {
|
if (!stack.isEmpty()) {
|
||||||
list.add(stack);
|
list.add(stack);
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.refinedmods.refinedstorage.RSItems;
|
|||||||
import com.refinedmods.refinedstorage.apiimpl.network.node.cover.CoverManager;
|
import com.refinedmods.refinedstorage.apiimpl.network.node.cover.CoverManager;
|
||||||
import com.refinedmods.refinedstorage.item.CoverItem;
|
import com.refinedmods.refinedstorage.item.CoverItem;
|
||||||
import com.refinedmods.refinedstorage.recipe.HollowCoverRecipe;
|
import com.refinedmods.refinedstorage.recipe.HollowCoverRecipe;
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
|
||||||
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
import mezz.jei.api.gui.builder.IRecipeLayoutBuilder;
|
||||||
import mezz.jei.api.gui.builder.IRecipeSlotBuilder;
|
import mezz.jei.api.gui.builder.IRecipeSlotBuilder;
|
||||||
import mezz.jei.api.gui.ingredient.ICraftingGridHelper;
|
import mezz.jei.api.gui.ingredient.ICraftingGridHelper;
|
||||||
@@ -52,8 +51,8 @@ public class HollowCoverCraftingCategoryExtension implements ICraftingCategoryEx
|
|||||||
}
|
}
|
||||||
|
|
||||||
stacks.set(4, input);
|
stacks.set(4, input);
|
||||||
List<IRecipeSlotBuilder> inputSlots = craftingGridHelper.createAndSetInputs(builder, VanillaTypes.ITEM_STACK, stacks, 0, 0);
|
List<IRecipeSlotBuilder> inputSlots = craftingGridHelper.createAndSetInputs(builder, stacks, 0, 0);
|
||||||
IRecipeSlotBuilder outputSlot = craftingGridHelper.createAndSetOutputs(builder, VanillaTypes.ITEM_STACK, output);
|
IRecipeSlotBuilder outputSlot = craftingGridHelper.createAndSetOutputs(builder, output);
|
||||||
builder.createFocusLink(inputSlots.get(4), outputSlot);
|
builder.createFocusLink(inputSlots.get(4), outputSlot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import com.refinedmods.refinedstorage.screen.grid.stack.IGridStack;
|
|||||||
import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack;
|
import com.refinedmods.refinedstorage.screen.grid.stack.ItemGridStack;
|
||||||
import com.refinedmods.refinedstorage.screen.grid.view.IGridView;
|
import com.refinedmods.refinedstorage.screen.grid.view.IGridView;
|
||||||
import com.refinedmods.refinedstorage.util.ItemStackKey;
|
import com.refinedmods.refinedstorage.util.ItemStackKey;
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.inventory.CraftingContainer;
|
import net.minecraft.world.inventory.CraftingContainer;
|
||||||
@@ -162,9 +161,11 @@ public class IngredientTracker {
|
|||||||
|
|
||||||
//Gather available Stacks
|
//Gather available Stacks
|
||||||
for (Ingredient ingredient : ingredientList.ingredients) {
|
for (Ingredient ingredient : ingredientList.ingredients) {
|
||||||
ingredient.getSlotView().getIngredients(VanillaTypes.ITEM_STACK).takeWhile(stack -> !ingredient.isAvailable()).forEach(stack -> {
|
ingredient.getSlotView().getItemStacks().takeWhile(stack -> !ingredient.isAvailable()).forEach(stack -> {
|
||||||
|
|
||||||
|
if(ingredient.getCraftStackId() == null) {
|
||||||
ingredient.setCraftStackId(craftableItems.get(new ItemStackKey(stack)));
|
ingredient.setCraftStackId(craftableItems.get(new ItemStackKey(stack)));
|
||||||
|
}
|
||||||
// Check grid crafting slots
|
// Check grid crafting slots
|
||||||
if (gridContainer.getGrid().getGridType().equals(GridType.CRAFTING)) {
|
if (gridContainer.getGrid().getGridType().equals(GridType.CRAFTING)) {
|
||||||
CraftingContainer craftingMatrix = gridContainer.getGrid().getCraftingMatrix();
|
CraftingContainer craftingMatrix = gridContainer.getGrid().getCraftingMatrix();
|
||||||
|
|||||||
Reference in New Issue
Block a user