mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-17 02:45:08 +00:00
refactor 6
This commit is contained in:
1 parent
5b62c4fdc8
commit
8d072f0c89
78 files changed
+525
-882
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package com.glodblock.github.common.tile;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.crafting.ICraftingGrid;
|
||||
@@ -134,7 +135,7 @@ public class TileFluidDiscretizer extends AENetworkTile implements IPriorityHost
|
||||
implements IMEInventory<IAEItemStack>, IMEMonitorHandlerReceiver<IAEFluidStack> {
|
||||
|
||||
private final MEInventoryHandler<IAEItemStack> invHandler = new MEInventoryHandler<>(this, getChannel());
|
||||
private List<IAEItemStack> itemCache = null;
|
||||
private IItemList<IAEItemStack> itemCache = null;
|
||||
|
||||
FluidDiscretizingInventory() {
|
||||
invHandler.setPriority(Integer.MAX_VALUE);
|
||||
@@ -185,7 +186,7 @@ public class TileFluidDiscretizer extends AENetworkTile implements IPriorityHost
|
||||
@Override
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList<IAEItemStack> out) {
|
||||
if (itemCache == null) {
|
||||
itemCache = new ArrayList<>();
|
||||
itemCache = AEApi.instance().storage().createItemList();
|
||||
IMEMonitor<IAEFluidStack> fluidGrid = getFluidGrid();
|
||||
if (fluidGrid != null) {
|
||||
for (IAEFluidStack fluid : fluidGrid.getStorageList()) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
|
||||
@Override
|
||||
public ImmutableSet<ICraftingLink> getRequestedJobs() {
|
||||
return ImmutableSet.copyOf(new NonNullArrayIterator<ICraftingLink>(this.requests.getLinks()));
|
||||
return ImmutableSet.copyOf(new NonNullArrayIterator<>(this.requests.getLinks()));
|
||||
}
|
||||
|
||||
private IAEItemStack setState(ICraftingLink link, IAEItemStack items) {
|
||||
@@ -176,8 +176,7 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (final GridAccessException e) {
|
||||
// :P
|
||||
} catch (final GridAccessException ignore) {
|
||||
}
|
||||
return didSomething ? TickRateModulation.FASTER : TickRateModulation.SLOWER;
|
||||
}
|
||||
@@ -245,8 +244,7 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
if (!this.requests.isDone(i)) this.requests.setState(i, State.Crafting);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// :P You don't have job to do XD
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,6 +329,7 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
private final ICraftingLink[] links;
|
||||
private final State[] state = new State[REQ_COUNT];
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public InventoryRequest(TileLevelMaintainer tile) {
|
||||
this.requestStacks = new AeStackInventoryImpl<>(StorageChannel.ITEMS, REQ_COUNT, tile);
|
||||
this.requestBatches = new AeStackInventoryImpl<>(StorageChannel.ITEMS, REQ_COUNT, tile);
|
||||
|
||||
Reference in new issue
Block a user