Applied Energistics 2

Applied Energistics 2

137M Downloads

Wireless Crafting terminal doesn't return properly from CraftConfirmMenu

Mari023 opened this issue ยท 0 comments

commented

similar to #5684

returning from CraftConfirmMenu probably doesn't open the wireless crafting terminal, but the normal wireless terminal
I can't test it right now due to #5708, but looking at the code it shouldn't work properly

public void startJob() {
if (isClient()) {
sendClientAction(ACTION_START_JOB);
return;
}
MenuType<?> originalGui = null;
final IActionHost ah = this.getActionHost();
if (ah instanceof WirelessTerminalMenuHost) {
originalGui = WirelessTermMenu.TYPE;
}
if (ah instanceof ItemTerminalPart) {
originalGui = ItemTerminalMenu.TYPE;
}
if (ah instanceof CraftingTerminalPart) {
originalGui = CraftingTermMenu.TYPE;
}
if (ah instanceof PatternTerminalPart) {
originalGui = PatternTermMenu.TYPE;
}
if (this.result != null && !this.result.simulation()) {
final ICraftingService cc = this.getGrid().getCraftingService();
final ICraftingLink g = cc.submitJob(this.result, null, this.selectedCpu, true, this.getActionSrc());
this.setAutoStart(false);
if (g != null && originalGui != null && this.getLocator() != null) {
MenuOpener.open(originalGui, getPlayerInventory().player, getLocator());
}
}
}