Skip to content

Commit

Permalink
add upgrades in description
Browse files Browse the repository at this point in the history
  • Loading branch information
lordIcocain committed Jan 18, 2025
1 parent d1ddce7 commit 2bd601c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class HandlerItemEssentiaCell implements IMEInventoryHandler<IAEFluidStac

private boolean hasVoidOverflow = false;
private boolean hasDistribution = false;
private boolean isSticky = false;
private boolean hasSticky = false;

public HandlerItemEssentiaCell(final ItemStack storageStack, final ISaveProvider saveProvider) {
// Ensure we have a NBT tag
Expand Down Expand Up @@ -369,7 +369,7 @@ private void readCellData() {
switch (u) {
case VOID_OVERFLOW -> hasVoidOverflow = true;
case DISTRIBUTION -> hasDistribution = true;
case STICKY -> isSticky = true;
case STICKY -> hasSticky = true;
default -> {}
}
}
Expand Down Expand Up @@ -948,7 +948,15 @@ public TYPE getCellType() {

@Override
public boolean getSticky() {
return isSticky;
return hasSticky;
}

public boolean getVoidOverflow() {
return hasVoidOverflow;
}

public boolean getDistribution() {
return hasDistribution;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ public void addInformation(final ItemStack essentiaCell, final EntityPlayer play
displayList.add(bytesTip);
displayList.add(typesTip);

// Add upgrades
if (cellHandler.getDistribution()) {
displayList.add(GuiText.Sticky.getLocal());
}
if (cellHandler.getVoidOverflow()) {
displayList.add("Void Overflow");
}
if (cellHandler.getSticky()) {
displayList.add("Distribution");
}

// Is the cell pre-formated?
if (cellHandler.isPartitioned()) {
displayList.add(GuiText.Partitioned.getLocal());
Expand Down

0 comments on commit 2bd601c

Please sign in to comment.