Applied Energistics 2

Applied Energistics 2

156M Downloads

"Crafting job completed" toasts do not work if the terminal is in a trinket / curio slot using ae2wtlib

Mari023 opened this issue ยท 1 comments

commented

originally reported on the ae2wtlib repo: Mari023/AE2WirelessTerminalLibrary#183
however, this isn't really fixable in ae2wtlib alone.

ae2wtlib would need some way to hook into PendingCraftingJobs#hasNotificationEnablingItem and check for wireless Terminals in trinket / curio slots

private static boolean hasNotificationEnablingItem(LocalPlayer player) {
var playerInv = player.getInventory();
for (int i = 0; i < playerInv.getContainerSize(); i++) {
var stack = playerInv.getItem(i);
if (!stack.isEmpty()
&& stack.getItem() instanceof WirelessTerminalItem wirelessTerminal
// Should have some power
&& wirelessTerminal.getAECurrentPower(stack) > 0
// Should be linked (we don't know if it's linked to the grid for which we get notifications)
&& wirelessTerminal.getGridKey(stack).isPresent()) {
return true;
}
}
return false;
}

commented

Idea: just add an event that AE2 uses to detect additional ItemStacks... Something like this: Technici4n/Powah@b265271 but on master and with a name more suited to AE2.