mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-26 06:53:33 +00:00
Fix level emitter crafting mode for fluid (#1420)
Co-authored-by: Martin Robertz <[email protected]> Co-authored-by: UltraProdigy <[email protected]>
This commit is contained in:
3 files changed
+18
-3
No files matched your search
@@ -13,7 +13,10 @@
|
||||
|
||||
package appeng.api.networking.crafting;
|
||||
|
||||
import static appeng.util.Platform.stackConvert;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
|
||||
public interface ICraftingWatcherHost {
|
||||
|
||||
@@ -25,11 +28,19 @@ public interface ICraftingWatcherHost {
|
||||
*/
|
||||
void updateWatcher(ICraftingWatcher newWatcher);
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #onRequestChange(ICraftingGrid, IAEStack)}
|
||||
*/
|
||||
@Deprecated
|
||||
void onRequestChange(ICraftingGrid craftingGrid, IAEItemStack what);
|
||||
|
||||
/**
|
||||
* Called when a crafting status changes.
|
||||
*
|
||||
* @param craftingGrid current crafting grid
|
||||
* @param what change
|
||||
*/
|
||||
void onRequestChange(ICraftingGrid craftingGrid, IAEItemStack what);
|
||||
default void onRequestChange(ICraftingGrid craftingGrid, IAEStack<?> what) {
|
||||
onRequestChange(craftingGrid, stackConvert(what));
|
||||
}
|
||||
}
|
||||
@@ -542,8 +542,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
this.getCore().markDirty();
|
||||
}
|
||||
|
||||
protected void postCraftingStatusChange(final IAEStack<?> aeDiff) {
|
||||
IAEItemStack diff = stackConvert(aeDiff); // emitters
|
||||
protected void postCraftingStatusChange(final IAEStack<?> diff) {
|
||||
if (this.getGrid() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -204,6 +204,11 @@ public class PartLevelEmitter extends PartUpgradeable implements ILevelEmitter {
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestChange(final ICraftingGrid craftingGrid, final IAEStack<?> what) {
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
// update the system...
|
||||
private void configureWatchers() {
|
||||
final IAEStack<?> myStack = this.config.getAEStackInSlot(0);
|
||||
|
||||
Reference in new issue
Block a user