Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Fix gui for Mega Apiary and greenhouse #121

Merged
merged 3 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -870,18 +870,25 @@ protected String generateCurrentRecipeInfoString() {
.append("%)\n");

for (Map.Entry<ItemStack, Double> drop : GUIDropProgress.entrySet()) {
ret.append(
drop.getKey()
.getDisplayName())
.append(": ")
int outputSize = Arrays.stream(mOutputItems)
.filter(s -> s.isItemEqual(drop.getKey()))
.mapToInt(i -> i.stackSize)
.sum();
if (outputSize == 0) continue;
Dream-Master marked this conversation as resolved.
Show resolved Hide resolved

ret.append(EnumChatFormatting.AQUA)
.append(
drop.getKey()
.getDisplayName())
.append(EnumChatFormatting.WHITE)
.append(": ");
ret.append(EnumChatFormatting.GOLD)
.append(
String.format(
"%.2f (+%d)\n",
drop.getValue(),
Arrays.stream(mOutputItems)
.filter(s -> s.isItemEqual(drop.getKey()))
.mapToInt(i -> i.stackSize)
.sum()));
"x%d %s(+%.2f/sec)\n",
outputSize,
EnumChatFormatting.WHITE,
(double) outputSize / (mMaxProgresstime / 20)));
}

return ret.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -900,18 +900,25 @@ protected String generateCurrentRecipeInfoString() {
.append("%)\n");

for (Map.Entry<ItemStack, Double> drop : GUIDropProgress.entrySet()) {
ret.append(
drop.getKey()
.getDisplayName())
.append(": ")
int outputSize = Arrays.stream(mOutputItems)
.filter(s -> s.isItemEqual(drop.getKey()))
.mapToInt(i -> i.stackSize)
.sum();
if (outputSize == 0) continue;

ret.append(EnumChatFormatting.AQUA)
.append(
drop.getKey()
.getDisplayName())
.append(EnumChatFormatting.WHITE)
.append(": ");
ret.append(EnumChatFormatting.GOLD)
.append(
String.format(
"%.2f (+%d)\n",
drop.getValue(),
Arrays.stream(mOutputItems)
.filter(s -> s.isItemEqual(drop.getKey()))
.mapToInt(i -> i.stackSize)
.sum()));
"x%d %s(+%.2f/sec)\n",
outputSize,
EnumChatFormatting.WHITE,
(double) outputSize / (mMaxProgresstime / 20)));
}

return ret.toString();
Expand Down
Loading