public static bool ItemPushRequest(IMyConveyorEndpointBlock start, MyInventory srcInventory, long playerId, MyPhysicalInventoryItem toSend, MyFixedPoint? amount = null)
        {
            MyCubeBlock startingBlock = start as MyCubeBlock;
            if (startingBlock == null) return false;

            bool success = false;

            // Try and get the block from the cache
            MyGridConveyorSystem conveyorSystem = startingBlock.CubeGrid.GridSystems.ConveyorSystem;
            MyGridConveyorSystem.ConveyorEndpointMapping endpoints = conveyorSystem.GetConveyorEndpointMapping(start);
            if (endpoints.pushElements != null)
            {
                var toSendContentId = toSend.Content.GetId();

                MyFixedPoint remainingAmount = toSend.Amount;
                if (amount.HasValue)
                {
                    remainingAmount = amount.Value;
                }

                for (int i = 0; i<endpoints.pushElements.Count; i++)
                {
                    MyCubeBlock targetBlock = endpoints.pushElements[i] as MyCubeBlock;
                    if (targetBlock == null) continue;

                    int inventoryCount = targetBlock.InventoryCount;
                    for (int inventoryIndex = 0; inventoryIndex < inventoryCount; inventoryIndex++)
                    {
                        MyInventory inventory = targetBlock.GetInventory(inventoryIndex);

                        if ((inventory.GetFlags() & MyInventoryFlags.CanReceive) == 0)
                            continue;

                        if (inventory == srcInventory)
                            continue;

                        var fittingAmount = inventory.ComputeAmountThatFits(toSendContentId);
                        fittingAmount = MyFixedPoint.Min(fittingAmount, remainingAmount);
                        if (!inventory.CheckConstraint(toSendContentId))
                            continue;
                        if (fittingAmount == 0)
                            continue;

                        // Verify that this item can, in fact, make it past sorters, etc
                        if (!CanTransfer(start, endpoints.pushElements[i], toSend.GetDefinitionId(), true))
                            continue;

                        MyInventory.Transfer(srcInventory, inventory, toSend.ItemId, -1, fittingAmount);
                        success = true;

                        remainingAmount -= fittingAmount;
                    }

                    if (remainingAmount <= 0)
                        break;
                }
            }

            else
            {
                // Cache may need to be recomputed
                if (!conveyorSystem.m_isRecomputingGraph)
                    conveyorSystem.RecomputeConveyorEndpoints();
            }

            return success;
        }
        public override void Init(MyObjectBuilder_EntityBase objectBuilder)
        {
            var builder = objectBuilder as MyObjectBuilder_FloatingObject;
            if (builder.Item.Amount <= 0)
            {
                // I can only prevent creation of entity by throwing exception. This might cause crashes when thrown outside of MyEntities.CreateFromObjectBuilder().
                throw new ArgumentOutOfRangeException("MyPhysicalInventoryItem.Amount", string.Format("Creating floating object with invalid amount: {0}x '{1}'", builder.Item.Amount, builder.Item.PhysicalContent.GetId()));
            }
            base.Init(objectBuilder);

            this.Item = new MyPhysicalInventoryItem(builder.Item);
            this.m_modelVariant = builder.ModelVariant;

            InitInternal();

            NeedsUpdate |= MyEntityUpdateEnum.EACH_FRAME;

            UseDamageSystem = true;

            MyPhysicalItemDefinition itemDefinition = null;
            if (!MyDefinitionManager.Static.TryGetPhysicalItemDefinition(Item.GetDefinitionId(), out itemDefinition))
            {
                System.Diagnostics.Debug.Fail("Creating floating object, but it's physical item definition wasn't found! - " + Item.ItemId);
                ItemDefinition = null;
            }
            else
                ItemDefinition = itemDefinition;
            m_timeFromSpawn = MySession.Static.ElapsedPlayTime;
        }