Skip to content

Commit

Permalink
v2.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
tth05 committed Jun 14, 2021
1 parent 37d908e commit 2f5cac0
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ jobs:
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- Fixed importer using FluidHandler instead of tank properties when extracting. This fixes extracting from some GregTech machines
- Fixed holding shift in grid sometimes hiding all items
- Small performance improvement when importing items while a crafting task is running
- Fixed items with different capabilities stacking
- Improved the OC integration
draft: false
prerelease: false
- name: Upload jars to release
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# More Refined Storage Changelog

# 2.2.10
- Fixed items with different capabilities stacking
- Improved the OC integration

# 2.2.9
- Fixed importer using FluidHandler instead of tank properties when extracting. This fixes extracting from some GregTech machines
- Fixed holding shift in grid sometimes hiding all items
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'net.minecraftforge.gradle.forge'

version = "2.2.9"
version = "2.2.10"

group = "refinedstorage"
archivesBaseName = "morerefinedstorage"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,23 @@ public boolean equals(Object obj) {
return false;
}

@Override
public String toString() {
return "CraftingPattern{" +
"processing=" + processing +
", oredict=" + oredict +
", valid=" + valid +
", recipe=" + recipe +
", inputs=" + inputs +
", outputs=" + outputs +
", byproducts=" + byproducts +
", fluidInputs=" + fluidInputs +
", fluidOutputs=" + fluidOutputs +
", blacklistedItems=" + blacklistedItems +
", blacklistedFluids=" + blacklistedFluids +
'}';
}

private static class InventoryCraftingDummy extends InventoryCrafting {
public InventoryCraftingDummy() {
super(new Container() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,14 @@ public Task(@Nonnull ICraftingPattern pattern, ICraftingRequestInfo requestInfo)
}

if (outputStackSize < 1)
throw new IllegalStateException("This pattern does not seem to create the requested item!?");
throw new IllegalStateException(
String.format(
"This pattern does not seem to create the requested item!? outputStackSize: %d, requested: %s, my pattern: %s",
outputStackSize,
requestInfo.getFluid() != null ? requestInfo.getFluid().toString() : requestInfo.getItem().toString(),
this.pattern
)
);

//calculate actual needed amount, basically the amount of iterations that have to be run
this.amountNeeded = (long) Math.ceil((double) amountNeeded / (double) outputStackSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,11 @@ public Object[] getItems(final Context context, final Arguments args) {

@Callback(doc = "function():table -- Gets a list of all connected storage disks and blocks in this network.")
public Object[] getStorages(final Context context, final Arguments args) {
int totalItemStored = 0;
int totalItemCapacity = 0;
long totalItemStored = 0;
long totalItemCapacity = 0;

int totalFluidStored = 0;
int totalFluidCapacity = 0;
long totalFluidStored = 0;
long totalFluidCapacity = 0;

List<Map<String, Object>> devices = new ArrayList<>();

Expand Down Expand Up @@ -452,11 +452,11 @@ public Object[] getStorages(final Context context, final Arguments args) {
}
}

Map<String, Integer> itemTotals = new HashMap<>();
Map<String, Long> itemTotals = new HashMap<>();
itemTotals.put("usage", totalItemStored);
itemTotals.put("capacity", totalItemCapacity);

Map<String, Integer> fluidTotals = new HashMap<>();
Map<String, Long> fluidTotals = new HashMap<>();
fluidTotals.put("usage", totalFluidStored);
fluidTotals.put("capacity", totalFluidCapacity);

Expand Down

0 comments on commit 2f5cac0

Please sign in to comment.