Skip to content

Commit

Permalink
Fix a crash when attempting to place a fresh bulk cell in a cell work…
Browse files Browse the repository at this point in the history
…bench
  • Loading branch information
62832 committed Nov 19, 2024
1 parent ee94572 commit b0d6ce5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ protected void updateBeforeRender() {
fuzzyMode.setVisibility(menu.getUpgrades().isInstalled(AEItems.FUZZY_CARD));

if (BulkCellItem.HANDLER.getCellInventory(menu.getHost().mega$getContainedStack(), null)
instanceof BulkCellInventory bulkCell) {
compressionCutoff.setVisibility(bulkCell.isCompressionEnabled()
&& !bulkCell.getCompressionChain().isEmpty());
instanceof BulkCellInventory bulkCell
&& !bulkCell.getCompressionChain().isEmpty()) {
compressionCutoff.setVisibility(bulkCell.isCompressionEnabled());
compressionCutoff.setItem(bulkCell.getCompressionChain().get(bulkCell.getCompressionCutoff() - 1));
} else {
compressionCutoff.setVisibility(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ private void initCutoffButton(
@Inject(method = "updateBeforeRender", at = @At("RETURN"))
private void updateCutoffButton(CallbackInfo ci) {
if (BulkCellItem.HANDLER.getCellInventory(((CellWorkbenchHost) menu.getHost()).mega$getContainedStack(), null)
instanceof BulkCellInventory bulkCell) {
mega$compressionCutoff.setVisibility(bulkCell.isCompressionEnabled()
&& !bulkCell.getCompressionChain().isEmpty());
instanceof BulkCellInventory bulkCell
&& !bulkCell.getCompressionChain().isEmpty()) {
mega$compressionCutoff.setVisibility(bulkCell.isCompressionEnabled());
mega$compressionCutoff.setItem(bulkCell.getCompressionChain().get(bulkCell.getCompressionCutoff() - 1));
} else {
mega$compressionCutoff.setVisibility(false);
Expand Down

0 comments on commit b0d6ce5

Please sign in to comment.