This commit is contained in:
raoulvdberge
2017-01-25 02:05:59 +01:00
parent 16c767e142
commit b34d9b91de
3 changed files with 27 additions and 10 deletions

View File

@@ -29,6 +29,7 @@
- Exposed the Network Card inventory of the Network Transmitter so other tiles can interact with it (raoulvdberge) - Exposed the Network Card inventory of the Network Transmitter so other tiles can interact with it (raoulvdberge)
- Increased size of Detector textbox (way2muchnoise) - Increased size of Detector textbox (way2muchnoise)
- Fixed stack upgrades not working in exporter when stack size is 16 (way2muchnoise) - Fixed stack upgrades not working in exporter when stack size is 16 (way2muchnoise)
- Fixed crash when rotating External Storage (raoulvdberge)
### 1.3.5 ### 1.3.5
- Fixed TPS lag on very large crafting tasks (way2muchnoise) - Fixed TPS lag on very large crafting tasks (way2muchnoise)

View File

@@ -5,11 +5,11 @@ import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawerGroup;
import com.raoulvdberge.refinedstorage.RS; import com.raoulvdberge.refinedstorage.RS;
import com.raoulvdberge.refinedstorage.RSUtils; import com.raoulvdberge.refinedstorage.RSUtils;
import com.raoulvdberge.refinedstorage.api.network.INetworkMaster; import com.raoulvdberge.refinedstorage.api.network.INetworkMaster;
import com.raoulvdberge.refinedstorage.apiimpl.network.node.INetworkNodeHolder;
import com.raoulvdberge.refinedstorage.api.storage.AccessType; import com.raoulvdberge.refinedstorage.api.storage.AccessType;
import com.raoulvdberge.refinedstorage.api.storage.IStorage; import com.raoulvdberge.refinedstorage.api.storage.IStorage;
import com.raoulvdberge.refinedstorage.api.storage.IStorageProvider; import com.raoulvdberge.refinedstorage.api.storage.IStorageProvider;
import com.raoulvdberge.refinedstorage.api.util.IComparer; import com.raoulvdberge.refinedstorage.api.util.IComparer;
import com.raoulvdberge.refinedstorage.apiimpl.network.node.INetworkNodeHolder;
import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNode; import com.raoulvdberge.refinedstorage.apiimpl.network.node.NetworkNode;
import com.raoulvdberge.refinedstorage.integration.cyclopscore.IntegrationCyclopsCore; import com.raoulvdberge.refinedstorage.integration.cyclopscore.IntegrationCyclopsCore;
import com.raoulvdberge.refinedstorage.inventory.ItemHandlerBasic; import com.raoulvdberge.refinedstorage.inventory.ItemHandlerBasic;
@@ -192,11 +192,23 @@ public class NetworkNodeExternalStorage extends NetworkNode implements IStorageP
if (type == IType.ITEMS) { if (type == IType.ITEMS) {
if (facing instanceof IDrawerGroup) { if (facing instanceof IDrawerGroup) {
itemStorages.add(new StorageItemDrawerGroup(this, () -> (IDrawerGroup) getFacingTile())); itemStorages.add(new StorageItemDrawerGroup(this, () -> {
TileEntity f = getFacingTile();
return f instanceof IDrawerGroup ? (IDrawerGroup) f : null;
}));
} else if (facing instanceof IDrawer) { } else if (facing instanceof IDrawer) {
itemStorages.add(new StorageItemDrawer(this, () -> (IDrawer) getFacingTile())); itemStorages.add(new StorageItemDrawer(this, () -> {
TileEntity f = getFacingTile();
return f instanceof IDrawer ? (IDrawer) f : null;
}));
} else if (facing instanceof IDeepStorageUnit) { } else if (facing instanceof IDeepStorageUnit) {
itemStorages.add(new StorageItemDSU(this, () -> (IDeepStorageUnit) getFacingTile())); itemStorages.add(new StorageItemDSU(this, () -> {
TileEntity f = getFacingTile();
return f instanceof IDeepStorageUnit ? (IDeepStorageUnit) f : null;
}));
} else if (IntegrationCyclopsCore.isLoaded() && StorageItemCyclops.isValid(facing, holder.getDirection().getOpposite())) { } else if (IntegrationCyclopsCore.isLoaded() && StorageItemCyclops.isValid(facing, holder.getDirection().getOpposite())) {
itemStorages.add(new StorageItemCyclops(this)); itemStorages.add(new StorageItemCyclops(this));
} else if (!(facing instanceof TileNode)) { } else if (!(facing instanceof TileNode)) {

View File

@@ -15,7 +15,7 @@ import org.cyclops.cyclopscore.tileentity.InventoryTileEntityBase;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.*; import java.util.Arrays;
import java.util.function.Supplier; import java.util.function.Supplier;
public class StorageItemCyclops extends StorageItemExternal { public class StorageItemCyclops extends StorageItemExternal {
@@ -27,7 +27,11 @@ public class StorageItemCyclops extends StorageItemExternal {
public StorageItemCyclops(NetworkNodeExternalStorage externalStorage) { public StorageItemCyclops(NetworkNodeExternalStorage externalStorage) {
this.externalStorage = externalStorage; this.externalStorage = externalStorage;
this.opposite = externalStorage.getHolder().getDirection().getOpposite(); this.opposite = externalStorage.getHolder().getDirection().getOpposite();
this.cyclopsInv = () -> (InventoryTileEntityBase) externalStorage.getFacingTile(); this.cyclopsInv = () -> {
TileEntity f = externalStorage.getFacingTile();
return f instanceof InventoryTileEntityBase ? (InventoryTileEntityBase) f : null;
};
} }
@Override @Override
@@ -89,7 +93,7 @@ public class StorageItemCyclops extends StorageItemExternal {
return ((IndexedSlotlessItemHandlerWrapper.IInventoryIndexReference) inv.getInventory()) return ((IndexedSlotlessItemHandlerWrapper.IInventoryIndexReference) inv.getInventory())
.getIndex().values().stream().flatMap(m -> m.valueCollection().stream()).map(ItemStack::copy).collect(RSUtils.toNonNullList()); .getIndex().values().stream().flatMap(m -> m.valueCollection().stream()).map(ItemStack::copy).collect(RSUtils.toNonNullList());
} else { } else {
return Arrays.stream(((SimpleInventory)inv.getInventory()).getItemStacks()).map(ItemStack::copy).collect(RSUtils.toNonNullList()); return Arrays.stream(((SimpleInventory) inv.getInventory()).getItemStacks()).map(ItemStack::copy).collect(RSUtils.toNonNullList());
} }
} else { } else {
return RSUtils.emptyNonNullList(); return RSUtils.emptyNonNullList();