From 847f8aa35b5b9f0ef567f81235bea855684c9c6f Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Mon, 8 Sep 2014 13:08:57 -0500 Subject: [PATCH 1/3] Formation Plane can't store Fluids. --- parts/automation/PartFormationPlane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parts/automation/PartFormationPlane.java b/parts/automation/PartFormationPlane.java index 0dd60e22..c2de9e34 100644 --- a/parts/automation/PartFormationPlane.java +++ b/parts/automation/PartFormationPlane.java @@ -245,7 +245,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine @Override public List getCellArray(StorageChannel channel) { - if ( proxy.isActive() ) + if ( proxy.isActive() && channel == StorageChannel.ITEMS ) { List Handler = new ArrayList( 1 ); Handler.add( myHandler ); From 18ad8c59380c3e0861503ac2400fb135461f3659 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Mon, 8 Sep 2014 13:55:28 -0500 Subject: [PATCH 2/3] Fix CME when Updating P2P Tunnel. --- fmp/CableBusPart.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmp/CableBusPart.java b/fmp/CableBusPart.java index 162eb3e1..a59cc785 100644 --- a/fmp/CableBusPart.java +++ b/fmp/CableBusPart.java @@ -532,7 +532,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds ((TIInventoryTile) tile()).rebuildSlotMap(); if ( world() != null && world().blockExists( x(), y(), z() ) && !CableBusContainer.isLoading() ) - world().notifyBlocksOfNeighborChange( x(), y(), z(), Platform.air ); + Platform.notifyBlocksOfNeighbors(world(), x(), y(), z() ); } // @Override From f841334d72f003fc046d00053ebe33bad1f8d7bc Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Mon, 8 Sep 2014 14:22:15 -0500 Subject: [PATCH 3/3] Exposed Partitioning on tooltip. --- .../registries/entries/BasicCellHandler.java | 2 +- core/localization/GuiText.java | 4 +- items/storage/ItemBasicStorageCell.java | 39 ++++++++++++------- me/storage/CellInventoryHandler.java | 27 +++++++++++++ 4 files changed, 56 insertions(+), 16 deletions(-) diff --git a/core/features/registries/entries/BasicCellHandler.java b/core/features/registries/entries/BasicCellHandler.java index 2ff656fb..a8bb8df3 100644 --- a/core/features/registries/entries/BasicCellHandler.java +++ b/core/features/registries/entries/BasicCellHandler.java @@ -65,7 +65,7 @@ public class BasicCellHandler implements ICellHandler if ( handler instanceof CellInventoryHandler ) { CellInventoryHandler ci = (CellInventoryHandler) handler; - return ci.getCellInv().getStatusForCell(); + return ci.getStatusForCell(); } return 0; } diff --git a/core/localization/GuiText.java b/core/localization/GuiText.java index e41afcea..51879eca 100644 --- a/core/localization/GuiText.java +++ b/core/localization/GuiText.java @@ -48,7 +48,9 @@ public enum GuiText InterfaceTerminalHint, Range, TransparentFacades, TransparentFacadesHint, - NoCraftingJobs, CPUs, FacadeCrafting, inWorldCraftingPresses, ChargedQuartzFind; + NoCraftingJobs, CPUs, FacadeCrafting, inWorldCraftingPresses, ChargedQuartzFind, + + Included, Excluded, Partitioned, Precise, Fuzzy; String root; diff --git a/items/storage/ItemBasicStorageCell.java b/items/storage/ItemBasicStorageCell.java index 3ec5cfda..75483212 100644 --- a/items/storage/ItemBasicStorageCell.java +++ b/items/storage/ItemBasicStorageCell.java @@ -12,6 +12,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import appeng.api.AEApi; import appeng.api.config.FuzzyMode; +import appeng.api.config.IncludeExclude; import appeng.api.implementations.items.IItemGroup; import appeng.api.implementations.items.IStorageCell; import appeng.api.storage.ICellInventory; @@ -75,28 +76,38 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II { IMEInventory cdi = AEApi.instance().registries().cell().getCellInventory( i, null, StorageChannel.ITEMS ); - if ( cdi instanceof CellInventoryHandler ) + if ( cdi instanceof ICellInventoryHandler ) { + ICellInventoryHandler CI = (ICellInventoryHandler) cdi; + ICellInventory cd = ((ICellInventoryHandler) cdi).getCellInv(); - if ( cd != null ) + if (cd != null) { - l.add( cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalBytes() + " " + GuiText.BytesUsed.getLocal() ); - l.add( cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + " " + cd.getTotalItemTypes() + " " + GuiText.Types.getLocal() ); - /* - * if ( cd.isPreformatted() ) { String List = StatCollector.translateToLocal( cd.getListMode() == - * ListMode.WHITELIST ? "AppEng.Gui.Whitelisted" : "AppEng.Gui.Blacklisted" ); if ( - * cd.isFuzzyPreformatted() ) l.add( StatCollector.translateToLocal( "Appeng.GuiITooltip.Partitioned" ) - * + " - " + List + " " + StatCollector.translateToLocal( "Appeng.GuiITooltip.Fuzzy" ) ); else l.add( - * StatCollector.translateToLocal( "Appeng.GuiITooltip.Partitioned" ) + " - " + List + " " + - * StatCollector.translateToLocal( "Appeng.GuiITooltip.Precise" ) ); } - */ + l.add(cd.getUsedBytes() + " " + GuiText.Of.getLocal() + " " + + cd.getTotalBytes() + " " + + GuiText.BytesUsed.getLocal()); + + l.add(cd.getStoredItemTypes() + " " + GuiText.Of.getLocal() + + " " + cd.getTotalItemTypes() + " " + + GuiText.Types.getLocal()); + + if ( CI.isPreformatted() ) + { + String List = (CI.getIncludeExcludeMode() == IncludeExclude.WHITELIST ? GuiText.Included + : GuiText.Excluded ).getLocal(); + + if ( CI.isFuzzy() ) + l.add( GuiText.Partitioned.getLocal() + " - " + List + " " + GuiText.Fuzzy.getLocal() ); + else + l.add( GuiText.Partitioned.getLocal() + " - " + List + " " + GuiText.Precise.getLocal() ); + + } } } } @Override - public int getBytes(ItemStack cellItem) - { + public int getBytes(ItemStack cellItem) { return totalBytes; } diff --git a/me/storage/CellInventoryHandler.java b/me/storage/CellInventoryHandler.java index aa0604a0..e5f35a09 100644 --- a/me/storage/CellInventoryHandler.java +++ b/me/storage/CellInventoryHandler.java @@ -93,4 +93,31 @@ public class CellInventoryHandler extends MEInventoryHandler imple } } } + + public boolean isPreformatted() + { + return ! myPartitionList.isEmpty(); + } + + public boolean isFuzzy() + { + return myPartitionList instanceof FuzzyPriorityList; + } + + @Override + public IncludeExclude getIncludeExcludeMode() + { + return myWhitelist; + } + + public int getStatusForCell() + { + int val = getCellInv().getStatusForCell(); + + if ( val == 1 && isPreformatted() ) + val = 2; + + return val; + } + }