Ejemplo n.º 1
0
        private void UpdateTube(float dt)
        {
            //setup the north mask
            BlockEntityContainer check = Api.World.BlockAccessor.GetBlockEntity(Pos.NorthCopy()) as BlockEntityContainer;

            if (check != null)
            {
                AttachmentMask[0] = check.Inventory is InventoryGeneric;
            }

            //setup the attachment mask
            check = Api.World.BlockAccessor.GetBlockEntity(Pos.SouthCopy()) as BlockEntityContainer;
            if (check != null)
            {
                AttachmentMask[1] = check.Inventory is InventoryGeneric;
            }

            //setup the attachment mask
            check = Api.World.BlockAccessor.GetBlockEntity(Pos.EastCopy()) as BlockEntityContainer;
            if (check != null)
            {
                AttachmentMask[2] = check.Inventory is InventoryGeneric;
            }

            //setup the attachment mask
            check = Api.World.BlockAccessor.GetBlockEntity(Pos.WestCopy()) as BlockEntityContainer;
            if (check != null)
            {
                AttachmentMask[3] = check.Inventory is InventoryGeneric;
            }

            //setup the attachment mask
            check = Api.World.BlockAccessor.GetBlockEntity(Pos.UpCopy()) as BlockEntityContainer;
            if (check != null)
            {
                AttachmentMask[4] = check.Inventory is InventoryGeneric;
            }

            //setup the attachment mask
            check = Api.World.BlockAccessor.GetBlockEntity(Pos.DownCopy()) as BlockEntityContainer;
            if (check != null)
            {
                AttachmentMask[5] = check.Inventory is InventoryGeneric;
            }

            //Elbow default is West and Up
            //3way default is West, South and Up
            //4way default is west, east, south and Up
            //5 way default is NOT down.
            //6 way is yes.
            //cross default is up east down west
            //straight default is east-west
            //T default is East, west, up

            //orient from west as the origin (-x)
        }