Fixed crafting task losing internal buffer when network runs out of energy. Fixes #1995
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
- Fixed a duplication bug when pressing clear on a Wireless Crafting Grid (raoulvdberge)
|
- Fixed a duplication bug when pressing clear on a Wireless Crafting Grid (raoulvdberge)
|
||||||
- Fixed duplication bug with autocrafting and External Storages (raoulvdberge)
|
- Fixed duplication bug with autocrafting and External Storages (raoulvdberge)
|
||||||
- Fixed Crafting Manager displaying wrong name for chained crafters connected to some blocks (raoulvdberge)
|
- Fixed Crafting Manager displaying wrong name for chained crafters connected to some blocks (raoulvdberge)
|
||||||
|
- Fixed crafting task losing internal buffer when network runs out of energy (raoulvdberge)
|
||||||
- Removed handling of reusable items in autocrafting, to avoid problems (raoulvdberge)
|
- Removed handling of reusable items in autocrafting, to avoid problems (raoulvdberge)
|
||||||
- You can no longer start a crafting task if it has missing items or fluids (raoulvdberge)
|
- You can no longer start a crafting task if it has missing items or fluids (raoulvdberge)
|
||||||
- The Security Manager now supports Security Cards that have no player assigned to them. It is the default security card for players that aren't configured (raoulvdberge)
|
- The Security Manager now supports Security Cards that have no player assigned to them. It is the default security card for players that aren't configured (raoulvdberge)
|
||||||
|
@@ -148,15 +148,18 @@ public class NetworkNodeCrafter extends NetworkNode implements ICraftingPatternC
|
|||||||
protected void onConnectedStateChange(INetwork network, boolean state) {
|
protected void onConnectedStateChange(INetwork network, boolean state) {
|
||||||
super.onConnectedStateChange(network, state);
|
super.onConnectedStateChange(network, state);
|
||||||
|
|
||||||
if (!state) {
|
|
||||||
network.getCraftingManager().getTasks().stream()
|
|
||||||
.filter(task -> task.getPattern().getContainer().getPosition().equals(pos))
|
|
||||||
.forEach(task -> network.getCraftingManager().cancel(task.getId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
network.getCraftingManager().rebuild();
|
network.getCraftingManager().rebuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDisconnected(INetwork network) {
|
||||||
|
super.onDisconnected(network);
|
||||||
|
|
||||||
|
network.getCraftingManager().getTasks().stream()
|
||||||
|
.filter(task -> task.getPattern().getContainer().getPosition().equals(pos))
|
||||||
|
.forEach(task -> network.getCraftingManager().cancel(task.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDirectionChanged() {
|
protected void onDirectionChanged() {
|
||||||
if (network != null) {
|
if (network != null) {
|
||||||
|
Reference in New Issue
Block a user